On Oct 29, 1:11 pm, iain duncan <[EMAIL PROTECTED]> wrote: > On Sun, 2007-28-10 at 23:04 +0000, Graham Dumpleton wrote: > > On Oct 29, 8:04 am, iain duncan <[EMAIL PROTECTED]> wrote: > > > Hi y'all, I have client sites deployed on VPS's from slicehost, and have > > > been really happy with them so far. My only concern is that CP seems to > > > use a lot of ram. What is a good guideline for how much ram to have per > > > running cherrypy? > > > > Will deploying with mod_wsgi change that? > > > If the memory use comes from the core of CherryPy/TurboGears, then > > moving to mod_wsgi wouldn't make much difference. > > > Now, are your memory concerns coming from the amount of private > > process memory (RES) or the amount of virtual memory (VIRT). For some > > VPS providers the amount of virtual memory can be used in calculations > > for the Memory Limit of your VPS even when the memory hasn't actually > > been allocated as physical memory. This can cause problems in Linux > > where a multithreaded web server is used, as Linux appears to use the > > process default stack size for any threads created as well. That is, > > the designated stack size for threads will be 8MB. Have enough threads > > and this can blow out virtual memory size and you might start hitting > > your VPS memory limit. Non Linux systems such as MacOS X are a bit > > more sensible and default to 8MB for main process thread and only > > 512KB for subsequent threads. > > So, what do you get if you run the following in your VPS? > > > ulimit -s > > 8192 > > > Also, in Python what do you get if you run: > > > import thread > > print thread.stack_size() > > Traceback (most recent call last): > File "<stdin>", line 1, in ? > AttributeError: 'module' object has no attribute 'stack_size'
Hmmm, not using Python 2.5, but something older. > > Finally what is your VPS memory limit and what sizes are you getting > > for RES and VIRT for your web application processes? > > It's supposed to be 256, and here is an edited print out of ps axu for > all the heavies: > > 1805 0.0 5.5 151748 14380 /usr/sbin/mysqld > 10259 0.0 14.5 203848 37876 /usr/bin/python ./start-tgcms.py > 16351 0.0 14.5 204952 38080 /usr/bin/python ./start-tgcms.py > 29588 0.0 6.1 80144 16004 /usr/sbin/apache2 -k start -DSSL > 30540 0.0 12.2 196688 31920 /usr/bin/python ./start-momcafe.py > 30725 0.0 4.5 80276 11920 /usr/sbin/apache2 -k start -DSSL > 30726 0.0 4.5 80276 11912 /usr/sbin/apache2 -k start -DSSL > 30727 0.0 4.5 80276 11912 /usr/sbin/apache2 -k start -DSSL > 30728 0.0 4.3 80144 11356 /usr/sbin/apache2 -k start -DSSL > 30729 0.0 4.3 80144 11344 /usr/sbin/apache2 -k start -DSSL > 30743 0.0 4.3 80144 11344 /usr/sbin/apache2 -k start -DSSL Looks like prefork MPM. Yes/No? > Output of free -m: > total used free shared buffers > cached > Mem: 254 202 52 0 2 > 29 > -/+ buffers/cache: 171 83 > Swap: 511 78 433 > > I really don't know much about servers so if you can tell me if this > looks right or I am doing something wrong, that would be very much > appreciated. I'll dig around on Slicehost site and see what I can find. Graham --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

