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

Also, in Python what do you get if you run:

  import thread
  print thread.stack_size()

Finally what is your VPS memory limit and what sizes are you getting
for RES and VIRT for your web application processes?

Do you know how Slicehost calculates the memory limit?

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to