[Twisted-Python] Twisted reactor cpu usage
me at ilyabiin.com
Fri Mar 2 15:24:08 EST 2012
httperf on "twistd -n web --path /tmp" does 1200 rps
as with my code it does 400 rps only which fits to ~10percent load on 30rps
2012/3/2 Itamar Turner-Trauring <itamar at itamarst.org>:
>> I'm using epoll reactor and sample HTTP Proxy realization.
>> From another process i'm executing ~30 HTTP requests per second and
>> twisted process is consuming 10% cpu
>> What is wrong? Why twisted perfomance is so poor here?
> The profile output you included doesn't particularly show anything useful,
> On my laptop ab claims twisted.web is doing 1000 requests/sec listing the
> contents of a folder ("twistd -n web --path /tmp"). httperf claims 2500
> request/sec. So unless your computer is dramatically slower than my
> laptop, that does seem like high CPU usage.
> 1. What performance do you get out of twisted.web doing a simpler request?
> 2. What version of Twisted?
> 3. Was the 10% CPU while running under the profiler?
> 4. What profiler did you use? cProfile is often better than profile.
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
More information about the Twisted-Python