On 03/09/2013 03:07 AM, Wong Wah Meng-R32813 wrote:
Yes I have verified my python application is reusing the memory (just that it doesn't reduce once it has grown) and my python process doesn't have any issue to run even though it is seen taking up more than 2G in footprint. My problem is capacity planning on the server whereby since my python process doesn't release memory back to the OS, the OS wasn't able to allocate memory when a new process is spawn off>
So is the server running out of disk space? If not, why not increase the swapfile(s) size? That's what's being held onto, not RAM.
If you are short on disk space, and therefore cannot afford to increase the swapfile size, then you may want to plan the Python program's execution around that constraint.
Discounting the play-program that started this thread, is it possible that your actual app unnecessarily uses lots of space during one phase of execution, and therefore is saddled with that space at other times? For example, are you using a large list to hold a data file when an iterator would do just as well?
If that phase of execution cannot be eliminated, but it's a fleeting time, perhaps that part of the execution can be launched from the main app as a separate process. When the process ends, the memory is freed.
-- DaveA -- http://mail.python.org/mailman/listinfo/python-list