Page 1 of 1

Dynamic cache size

Posted: June 13th, 2011, 11:48 am
by thewiz
I almost downgraded from 0.6.4 to 0.5.6 because I didn't like how I lost the ability to control the location of the cache folder.  Thankfully I came across a post describing the RAM cache that I didn't know about:
shypike wrote: Much of the extra disk access can be avoided by setting an article cache in Config->General.
If you make the limit larger than 120% of the largest RAR segment file, everything can be done from memory.
If you're not strapped for memory, you should be using this.
Very nice, and I think this feature can be improved.  SABnzbd+ knows the size of the RAR segment file, so the optimal cache size can be calculated.  I've noticed that SABnzbd+ can change the cache size without restarting.

In my case, I usually download 20 MB RAR files.  But once every 2 weeks I download a batch of 95 MB RAR files.  For 13 out of 14 days I could free up 75 MB of RAM, but manually adjusting this value is a hassle.

I suggest introducing an second option for specifying the "Article Cache Limit".  Specify it in bytes (as currently) or specify it as a percentage of the largest RAR file.

Does this make sense?

Re: Dynamic cache size

Posted: June 13th, 2011, 12:29 pm
by shypike
If you set it to -1, it will just use what it needs.
The limit is for systems where you need some tight memory control
(mostly embedded systems).

Re: Dynamic cache size

Posted: June 13th, 2011, 12:43 pm
by thewiz
Thanks!  That make my request pointless.