[Twisted-Python] Twisted webserver performance issues

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Sun Nov 8 09:02:13 EST 2009

On 04:26 am, foom at fuhm.net wrote:
>When I last looked into the performance issues, I found that sometimes
>trac appears to block for long periods of time without releasing the
>GIL. That seems to be the core of the performance issues, currently.
>When it's responding normally, it's perfectly snappy. But, sometimes,
>it blocks for 10sec at a time.

How were you detecting these times?  Can we attach gdb to the process 
and trigger an all-threads stack dump when it happens?
>My next attempt to improve performance was going to be to run trac in
>subprocesses instead of threads. That would hopefully substantially
>fix the delay problem.

That would be interesting.  I thought it would be easy to add 
multiprocess support to the Twisted Web WSGI container, but I have since 
realized that was a pretty stupidly naive belief. :/  Still, perhaps it 
won't be impossible.

Could we start off just running multiple twistds, though?


More information about the Twisted-Python mailing list