On Sun, Oct 12, 2008 at 8:53 PM, Mike Orr <[EMAIL PROTECTED]> wrote: > > On Sun, Oct 12, 2008 at 10:46 AM, Kamil Gorlo <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >> I am running quite big application using Pylons and now I am in the >> moment on performance tuning etc. I have some questions about your >> experiences and best practices. >> >> My first configuration is something like that: >> >> I have one machine with e.g. 4 paster instances and haproxy in front >> wchich works as load balancer before those Paster backends. Haproxy >> have a nice feature, where I can set maxconnections to backends >> parameter. Since Paster is multi-threaded server I can set this >> parameter to value graeater than 1 (this parameter set to 1 is >> especailly useful with Mongrel/Thin in Rails since it is single >> threaded server). When this value is set, haproxy does not sends >> requests to particular backend if it see that backend is handling >> 'maxconnections' requests and tries with another backend (so It is >> more sofisticated balancing than simple round-robin). >> >> And my question is: how many should one instance of Paster handle >> requests simultanously? Is it better to run more paster instances on >> single machine (for example allowing only one request go to one paster >> in particular moment, you know - GIL problem or sth) or allowing 10 >> requests in one moment, or even 100 is not problem for single >> instance?? I noticed that Paster have default worker number set to >> value near 10. I am also considering CherryPy as backend server or >> maybe something else which you suggest? If there are better servers in >> your opinion than Paster, how this situation looks in there? > > There are people using CherryPy with Pylons, and they say it scales > well to high demand, better than PasteHTTPServer. > > I don't see the point in having multiple paster instances on the same > machine unless they're serving different sites. Four instances with > 10 threads each is the same as one instance with 40 threads. Paster > is not usually the bottleneck, it's database access in a worker > thread. Load balancing makes more sense when you have multiple > servers. >
So there is no problem, that for one Paster there is only one Python interpreter (maybe I do not understand GIL correctly)? Using processes despite Python threads is not better in your opinion? I'll try do some test, but I wanted to hear your opinions first. Thanks, Kamil --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
