Hmm. Linux does look like having a poor memory manager here, compared
to Python's footprint on Windows but I can not blame everything on
Linux because I'm also running lighttpd, squid, squidGuard, etc. on
the box and they only take minimum memory, 10% - 15% of what Python does.

> It is not Python's fault, it is Linux. But then, you are also perhaps
> misunderstanding what virtual memory (VIRT) is and how that is
> different to resident memory (RES or RSS).

> For a discussion of the problem, read my posts in the thread:

>  
> http://groups.google.com/group/pylons-discuss/browse_frm/thread/b289e7ccb006448

> Also see:

>  
> http://groups.google.com/group/modwsgi/browse_frm/thread/5ace4e1c77214b43

> In summary, it is because Linux uses a stupid default value for per
> thread stack size. This can be a problem in memory constrained VPS
> systems when running multithreaded servers.

> Graham

> On Dec 10, 6:43 am, JLIST <[EMAIL PROTECTED]> wrote:
>> I find something interesting - Python takes a lot of memory on Linux,
>> much more than it does on Windows.
>>
>> I'm running a web.py app on Linux with lighttpd + FCGI. I specify 10
>> fastcgi instances in lighttpd.conf. The "top" command shows that each
>> Python process takes from 60-90MB memory (the VIRT field.) Is this normal?
>> The server has about 1.5GB memory and I can only start at most 15 Python
>> processes this way. I tried 20 and I got frequent memory errors. This
>> server does import some modules but mostly the ordinary ones such as os,
>> sys, urllib2, time, etc. and nothing too much memory consuming that
>> I'm aware of.
>>
>> The same web.py app, when running in stand-alone mode with its
>> built-in web server, takes even more memory (108MB), upon start up,
>> before even serving any requests. The number does not drop after
>> starting up.
>>
>> However, when this server runs on Windows - which is my dev environment -
>> in stand-alone mode, it only takes 8MB memory. Doesn't this sound like a
>> serious memory management issue with Python on Linux? I used to run
>> php with lighttpd + FCGI on servers with similar configuration. I was
>> able to run 100-200 PHP processes this way. PHP's behavior on Linux
>> is close to that on Windows.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to