[Twisted-Python] Twisted webserver performance issues

Tom Leys leyssw at ihug.co.nz
Sun Nov 8 01:26:22 EST 2009


Neither of the below issues will be a problem

Jean-Paul
Logged in users have a cookie set (I imagine). by default Varnish will not present cached results to users with a cookie, nor will it cache their results for others to see. So the 10% of hits (totally my guess) that are for authenticated users will not be cached. However, some more static assets could be cached regardless of cookies if we so desire.

James:
Varnish has an option to serve an old result out of cache if the server is being non-responsive, it is a feature they call "Grace"

-Tom



Where this gets hard is that the front page looks different depending on 
whether the person requesting it is anonymous or authenticated.  If 
they're anonymous, various links are not presented.  If they're 
authenticated, they get the extra links and their username is part of 
the page.

Jean-Paul

------------------------------


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.

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.

James




More information about the Twisted-Python mailing list