[pylons-discuss] Tuning the number of waitress threads for production

2016-03-11 Thread Tom Wiltzius
Hi there, Recently I've been going through a round of (attempted) performance tuning of our Pyramid/waitress application (we use it as an API server, with SqlAlchemy as the ORM and nginx sitting in front of waitress as an SSL proxy), and this has left me with a few questions about the nature of

Re: [pylons-discuss] Tuning the number of waitress threads for production

2016-03-11 Thread Michael Merickel
Waitress is multithreaded (it does not fork) with the main thread using asyncore to accept new sockets. A new socket is accepted and dispatched to a free thread in the threadpool. The configured WSGI app is shared between all threads. Since each request is managed in its own thread it is synchronou

Re: [pylons-discuss] Tuning the number of waitress threads for production

2016-03-12 Thread Bert JW Regeer
> On Mar 12, 2016, at 17:02, Tom Wiltzius wrote: > > Thank you both for the information! > > It sounds like there isn't any significant downside the increasing the number > of waitress threads beyond the number of available CPU cores if we expect > them to be I/O bound rather than CPU bound.

Re: [pylons-discuss] Tuning the number of waitress threads for production

2016-04-28 Thread Bert JW Regeer
Your system will schedule each thread as it sees fit. There is nothing that will “happen”. If you are waiting on IO completion, having more threads than cores could be a way to handle more requests. Bert > On Apr 22, 2016, at 19:09, pnkk2...@gmail.com wrote: > > What can happen if we increase