Jump to content

[Solved] Swap space, cach drive and python scripts.....


Tybio

Recommended Posts

Greetings,

 

I was wondering if there was any way to use the cache disk to hold a swap partition?

 

The reason for this is that I'm running SABnzbd, Sick Bear and CouchPotato and the 2G of RAM that I thought was more than enough a few years back is quite gobbled up.  It would be handy to create a 4G swap partition on the cache disk and let things spill over into that rather than have processes just bomb out.

Link to comment

Perfect, I didn't know there was a package for a swap file in unmenu! 

Just remember that you'll need to disable the swap before stopping the array.  It will keep the cache drive busy and it will be unable to be un-mounted, and your array will not stop until you disable the swap file.

 

Joe L.

Link to comment

The reason for this is that I'm running SABnzbd, Sick Bear and CouchPotato and the 2G of RAM that I thought was more than enough a few years back is quite gobbled up.  It would be handy to create a 4G swap partition on the cache disk and let things spill over into that rather than have processes just bomb out.

 

Setting up the swap is easy enough so no harm in doing it - but are you sure your problems are stemming from the above?

 

-/+ buffers/cache:        870      3179

 

From my system only 870 megs used. Granted I have 4 gigs of memory, but with the following resident :

 

- unmenu

- sshd

- sickbeard

- airvideo

- transmission

- couchpotato

- cache_dirs

- SABnzbd

- Crashplan

- usual unraid with user shares and nfsd in the mix as well.

 

That's also a slightly higher than average figure, looks like airvideo has bumped it's memory usage for some reason (lsof is showing its still holding some media files open despite no client viewing them so looks like it's having a bit of an issue).

 

Uptime is currently : 09:46:48 up 66 days, 20:20,  4 users,  load average: 0.11, 0.14, 0.10 -  though all the python bits will have been restarted at various points (except SAB) to keep up to date.

 

I have more head room than you but my actual usage is still < 50% of 2G and that's with all the addons above running. And with Airvideo blackholing some memory for no reason.

 

I'd be concerned you have a memory leak somewhere so adding the swap, it just gets eaten into causing you performance degradation and constant swapping.

 

One possible issue which has historically caused people problems is having a log file / temp files or similar living on the unraid ramfs which is out of control and using up 'disk space' on the ramfs and thus filling the memory. I'd take a wager that's more likely to be the problem here than the applications you're running.

 

I'm not even sure if swap would help in that situation? Will the kernel swap out based on ramfs usage? Or will it not but try to swap out working memory from applications to keep the ramfs available? I don't  know what the bias would be - if any. Either way you'd end up chewing into the swap, slowing down your system and ultimately exhausting swap and ending up back where you are now.

 

In summary : double check your unraid filesystem (the memory fs, not your physical disks under /mnt) for large files that either shouldn't be there are or are growing faster than you expected. Log files and temp files from all the applications you listed would be a good place to start...

Link to comment

I wonder if the Sickbeard logs and cache directories are causing an issue. They get created in the directory where sickbeard was started. I opened the Sickbeard config.ini file and set the full paths for both since they were getting created on my flash drive. You can set the logs location in the Sickbeard interface but the cache setting is only available in the config file.

 

I should not that I believe it was the cache directory, I can't check right now.

 

Peter

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...