[web2py] Memory usage inspection

2010-04-09 Thread David Zejda
Hi,

I'm aggresively caching nearly everything.. it helped to reduce
database queries and increase performance in result. But I have
another problem now - memory usage slowly grows, during a day my
server eats about 2 GB. If I flush cache by clear() function, it does
not help much. Something it's leaking perhaps.

Please, do you use any tool to inspect what a hell is in the memory?

Thanks!

David


-- 
To unsubscribe, reply using remove me as the subject.


Re: [web2py] Memory usage inspection

2010-04-09 Thread Thadeus Burgess
heapy guppy can do this.

If you install it, a later version of web2py appadmin has cache
statistics in it using guppy-heapy, it can give you an overall feel
for what kinds of objects are taking up so much memory.

There are lots of other factors, such as what webserver, how are you
executing web2py (fcgi, mod_wsgi, etc. etc.). This might be an issue
with your server allocating the memory needed when the web2py app
requests it, and not doing any sort of de-allocation when the app no
longer needs it.

For example, when I was comparing apache+mod_wsgi to cherokee+uwsgi,
agressive caching was one of my tests to compare the memory usage. In
the end after caching ~100MB of random data and then clearing it.
Apache kept the reserved ram for well over several days before the ram
usage went down, whereas cherokee only kept the reserved ram around
for approx. 5 minutes, and then returned to normal levels.

-Thadeus





On Fri, Apr 9, 2010 at 4:28 PM, David Zejda d...@atlas.cz wrote:
 Hi,

 I'm aggresively caching nearly everything.. it helped to reduce
 database queries and increase performance in result. But I have
 another problem now - memory usage slowly grows, during a day my
 server eats about 2 GB. If I flush cache by clear() function, it does
 not help much. Something it's leaking perhaps.

 Please, do you use any tool to inspect what a hell is in the memory?

 Thanks!

 David


 --
 To unsubscribe, reply using remove me as the subject.