On Thu, Oct 31, 2013 at 12:28 AM, Tobias Oberstein <tobias.oberstein@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/sharedsock...
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/sharedsocke...
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