[Twisted-web] 100% CPU; what are my options?

Alex Clemesha clemesha at gmail.com
Sun Jan 3 04:10:02 EST 2010

On Sun, Jan 3, 2010 at 7:32 AM, Andrew Bennetts <andrew at bemusement.org> wrote:
> Leif K-Brooks wrote:
> [...]
>> - EPollReactor
>> Omegle currently runs at close to 100% CPU for most of the day, and
I really hope us people on this mailing list can help you fix this issue,
instead of you re-writing your (very cool) app in Erlang or whatever.
In my opinion, then we will have a success story.

Load-balancing over several twisted.web instances seems like something
easy to try,
have you looked harder into that yet? Maybe because you are running the entire
app on just one machine you are seeing some sort of contention between

More statistics/benchmarks could really help us pin-point the issue.

> 100% CPU with epoll sounds like <http://twistedmatrix.com/trac/ticket/2809>,
> which was fixed in Twisted 8.0.0.  Which version of Twisted are you using?
It looks like he is using version "TwistedWeb/8.1.0". (from the
Firefox 'server spy' plugin I have).


> [...]
>> - I've looked at my code pretty closely, and it doesn't seem to be
>> doing anything particularly inefficient, but are there any tricks I
>> might be able to use to increase performance? Tweaking settings, etc.?
> Run it under a profiler.  You can't know where the time is going if you
> don't measure.  Guesses about this sort of thing are usually wrong, so
> measurement is vital.
> -Andrew.
> _______________________________________________
> Twisted-web mailing list
> Twisted-web at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web

Alex Clemesha

More information about the Twisted-web mailing list