[Twisted-Python] Scaling Twisted Web on multicore
Thomas Hervé
therve at twistedmatrix.com
Thu Oct 31 09:04:12 MDT 2013
On Thu, Oct 31, 2013 at 12:28 AM, Tobias Oberstein
<tobias.oberstein at tavendo.de> wrote:
> Hi,
>
> I have done some testing of scaling Twisted Web on multicore and wanted to share:
>
> https://github.com/oberstet/scratchbox/tree/master/python/twisted/sharedsocket
>
> For those that are running short in time or want to have a teaser first, here are the results, including comparison with Nginx:
>
> https://github.com/oberstet/scratchbox/raw/master/python/twisted/sharedsocket/results.pdf
>
> Personally, I think the results are quite encouraging. I'd love to hear any feedback and comments!
Looks nice. It's something that has been around in poor form for a
long time in several places (I'm thinking about
http://twistedmatrix.com/trac/browser/sandbox/exarkun/copyover/ which
inspired http://twistedmatrix.com/trac/browser/sandbox/therve/prefork/).
It would be good to have some documented examples. It would be even
better to have a proper Twisted API for that.
Note that for testing static files, sendfile may be an interesting
boost: https://tm.tl/585
Also, on BSDs (not sure about OS X) and recent Linux, you can use
SO_REUSEPORT which would make for an even simpler code.
--
Thomas
More information about the Twisted-Python
mailing list