Anton V. Belyaev | 22 Nov 12:58

Number of CherryPy instances on a single-core machine


Hello,

Does it make sense to spawn several CherryPy processes (behind
frontend) on a single core machine? Or this technique is only useful
on multi core servers?

Thanks.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users@...
To unsubscribe from this group, send email to cherrypy-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Tim Roberts | 24 Nov 18:59

Re: Number of CherryPy instances on a single-core machine


Anton V. Belyaev wrote:
> Does it make sense to spawn several CherryPy processes (behind
> frontend) on a single core machine? Or this technique is only useful
> on multi core servers?
>   

I'm not sure it makes sense on ANY server.  The CherryPy server spawns
multiple threads to handle the individual requests.  One process with 20
threads is just as good as two processes with 10 threads each, and you
don't have to worry about channeling to different ports.

However, I'd be curious to know if others have tried this with good results.

--

-- 
Tim Roberts, timr@...
Providenza & Boekelheide, Inc.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users@...
To unsubscribe from this group, send email to cherrypy-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Gravatar

Re: Number of CherryPy instances on a single-core machine


On Mon, Nov 24, 2008 at 12:59 PM, Tim Roberts <timr@...> wrote:
>
> Anton V. Belyaev wrote:
>> Does it make sense to spawn several CherryPy processes (behind
>> frontend) on a single core machine? Or this technique is only useful
>> on multi core servers?
>>
>
> I'm not sure it makes sense on ANY server.  The CherryPy server spawns
> multiple threads to handle the individual requests.  One process with 20
> threads is just as good as two processes with 10 threads each, and you
> don't have to worry about channeling to different ports.
>
> However, I'd be curious to know if others have tried this with good results.

Yeah, we've definitely used multiple CherryPy processes with good
results.  Since Python's threaded performance is limited by the GIL
(Global Interpreter Lock), we usually devote a process-per-core on a
server.  This allows for more efficient use of the hardware under high
load.

If you only have a single-core machine, I wouldn't think there would
be any benefit, but I could be wrong.

Christian
http://www.dowski.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
(Continue reading)


Gmane