Page 1 of 1

Keeping large amount of memory in threads

Posted: March 31st, 2011, 5:46 am
by Bascy
I'm using Sabnzb 0.5 on my ReadyNas Duo and it is working well. Memory on the nas is upgrade to 1Gb
It startled me a bit at first  that it initiated over 20 threads, but that shouldnt be a problem. Neither do I have any problem with Sabnzb using large amounts of memory when its very busy downloading lots of files.

What i do find problematic is that after a download is finished, and sabnzb is turning idle, empty queue and such, all the threads keep the memory they reserved for when they were busy. The 20+ threads keep 100k virtual mem reserved EACH!

Any way to tell them to let go of that memory (besides restarting of course!)?

Re: Keeping large amount of memory in threads

Posted: March 31st, 2011, 6:32 am
by shypike
This is a generic problem with Python on Linux systems.
It's very reluctant to return memory to the OS.
BTW: any decent OS will swap out unused memory to disk,
so it shouldn't be a real problem.
On Windows and OSX we don't see this issue.

There's a very long discussion on this subject here:
http://forums.sabnzbd.org/index.php?topic=4713.45

Re: Keeping large amount of memory in threads

Posted: March 31st, 2011, 6:35 am
by Bascy
Ok, thanks for the reply