Keep cache data in memory

Want something added? Ask for it here.
Post Reply
dlmh
Newbie
Newbie
Posts: 3
Joined: November 23rd, 2010, 6:45 am

Keep cache data in memory

Post by dlmh »

Hi,

I've been a happy SabNZBd user for quite some years now, and there's very few I would like see improved in SAB. However, there's one small nuisance that's been bugging me.

I'm running SAB on a unRAID fileserver, a Linux based NAS application. This Linux distribution is run from an image on a flash drive and get's loaded into memory on every boot, so there's no persistent filesystem for the OS. However, you can just copy over the SAB python files to the flash drive and start it from there.

I've setup SAB to save the (in)complete downloads to the cache disk, but write the logs and cache files to the flash drive, otherwise SAB would prevent the cache disk to spin down, and eventually put the system to sleep. At first I thought that there were only 5 files, of which only 3 where actively used in my configuration (RSS data, etc.). But when I added some NZB's to the queue, I noticed that a lot of new files were created (SABnzbd_nzf_xxxxxxx). This greatly increases the number of read/writes to the flash drive, eventually leading to defective memory cells on the flash drive.

Would it be possible to have a switch for saving the cache files to memory instead of the disk? Or saving those weird temporary files to a different location than the admin files (.sab)?
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Keep cache data in memory

Post by shypike »

In Config->General you set a article cache in memory.
If you can spare the memory, set it to about 150% of the typical file you download.
(Where file is your average rar segment file.)
dlmh
Newbie
Newbie
Posts: 3
Joined: November 23rd, 2010, 6:45 am

Re: Keep cache data in memory

Post by dlmh »

shypike wrote: In Config->General you set a article cache in memory.
If you can spare the memory, set it to about 150% of the typical file you download.
(Where file is your average rar segment file.)
Thanks! This value was already set to 256M, but I still get those temporary files on the flash drive.

I'd prefer if the article cache files, which are only created while downloading, could be written to one location, and have those 5 persistent files on a different location. This way my cache disk can spin down when not downloading, and spares my flash drive some write cycles...
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Keep cache data in memory

Post by shypike »

This will change in the next major release.
Job admin will go to the "temporary download folder"
and the persistent files to a separate admin folder.
dlmh
Newbie
Newbie
Posts: 3
Joined: November 23rd, 2010, 6:45 am

Re: Keep cache data in memory

Post by dlmh »

shypike wrote: This will change in the next major release.
Job admin will go to the "temporary download folder"
and the persistent files to a separate admin folder.
That sounds great! :)

Next major release is 0.5.7 or 0.6.0?
Post Reply