Python memory management <-> virtualized server environments

Martin P. Hellwig martin.hellwig at dcuktec.org
Tue Aug 25 04:09:06 EDT 2009


gravityzoo-dmo wrote:
> On 24 aug, 20:35, "Martin P. Hellwig" <martin.hell... at dcuktec.org>
> wrote:
>> gravityzoo-dmo wrote:
>>> Hello everyone,
>>> I was wondering if anyone here has had any experience in running
>>> Python in a virtualized server environment?
>>> The reason I'm asking is the recent thing I noticed when running my
>>> server application (written in Python + Twisted);
>>> The memory of the server application seems to only grow, and not give
>>> back memory space to the OS. I realize that this won't be a problem on
>>> a single physical server, but I'm curious of the effect this behaviour
>>> has on a virtualized environment.
>>> Could anyone provide me with a little more insight please?
>>> Thanks in advance!
>>> Dirk
>> Might help if you say which version of Python you are running, although
>> I'm not a memory expert I do know there have been some changes between
>> the versions.
>>
>> --
>> MPHhttp://blog.dcuktec.com
>> 'If consumed, best digested with added seasoning to own preference.'
> 
> Hi, I'm sorry, I forgot to post the version indeed.
> 
> The Python version I'm running is 2.5.2 (r252:60911, January 4 2009)
> The Twisted version I'm running is 8.2.0, and I'm using the EPOLL-
> Reactor (don't know if that matters)
> The OS I'm running on is Debian version 2.6.26-2-686 (i686 GNU/Linux)
> 
> Is that enough info?
> 
> Best regards,
> Dirk


According to Python 2.6 release document:
"To reduce memory usage, the garbage collector will now clear internal 
free lists when garbage-collecting the highest generation of objects. 
This may return memory to the operating system sooner."

Which might apply to your situation, but to be really sure you can only 
try it out :-)

-- 
MPH
http://blog.dcuktec.com
'If consumed, best digested with added seasoning to own preference.'



More information about the Python-list mailing list