[Twisted-Python] Twisted performance?
twisted at itamarst.org
Mon Oct 7 12:06:10 EDT 2002
On Mon, 7 Oct 2002 09:08:08 -0700 (PDT)
dave at pythonapocrypha.com wrote:
> I'd love to hear comments and performance numbers, even if they're just
Twisted sustained performance is not all that great, especially from disk, but then we haven't really tried to optimize it that much. On the other hand, on my laptop (866 crusoe) it can do 160Mbit from disk (100 concurrent connections over loopback, using ab), but then it's a pretty slow machine. On a decent machine it'd probably do much better, and there are clear paths towards optimization - certainly we'd love it if you ported your optimizations to Twisted.
> Additionally (or as an alternative), if anyone can point me to
> some sample code I can run it against our internal performance tests - I'd
> be interested in (1) an HTTP server that serves just from memory (i.e.
> returns a valid but large HTTP response of just random or junk data) and
> (2) an HTTP server that just serves a file or two from disk. In both cases
> the emphasis is on total throughput at varying numbers of concurrent
1. $ cp largefile /var/www/
$ mktap web --path=/var/www
$ twistd -f web.tap
$ ab -n 300 -c 20 http://localhost:8080/largefile
2. Run attached script and run benchmarks against it. Seems rather slow, actually, compared to (1).
> P.S. Does Twisted support any sort of throughput throttling? (i.e. the
> ability to cap [average] throughput at a certain level)
No, but it could be added pretty easily to things that use producer/consumer, I think (e.g. serving files).
Itamar Shtull-Trauring http://itamarst.org/
Available for Python, Twisted, Zope and Java consulting
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1060 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20021007/81cad21b/attachment.obj
More information about the Twisted-Python