[Twisted-web] Re: static file performance

David Bolen db3l.net at gmail.com
Thu Mar 6 13:38:20 EST 2008


Phil Christensen <phil at bubblehouse.org> writes:

> Thanks for the tips, but I'm pretty well up to speed on the existing
> static file mechanisms. My big concern was performance, though.

Ah, sorry - didn't interpret your post quite right then.

> Obviously it depends on the site in question. My current project has
> a large number of external assets of varying kinds, and informal
> JMeter testing is showing that serving static content separately
> improves throughput greatly, almost by an order of magnitude.

Yep, I would certainly expect that large numbers of small to medium
files will have significantly higher overhead through Twisted.

> This actually makes me question whether sendfile would make much of a
> difference; considering it would only be used for files over 5MB. The
> external assets that I'm serving with Apache are all Javascript/CSS/
> images, with some miscellaneous PDF/PPT/DOC/etc files.

Yeah, I'm not sure either.  At larger file size, it would seem more
likely to me that you'd be I/O bound more than CPU, barring a really
large server pipe.  Lots of Javascript/CSS/images are going to have
lots of round trips through the request processing path, which it
seems to me will always be beat by some compiled application path,
like an external web server.

-- David




More information about the Twisted-web mailing list