[Twisted-web] performance of web2

Manlio Perillo manlio_perillo at libero.it
Mon Jan 8 04:26:16 CST 2007


glyph at divmod.com ha scritto:
> On 7 Jan, 05:53 pm, manlio_perillo at libero.it wrote:
> 
>  >This is not a problem (and maybe the tests are not so accurate), but I 
> would
>  >like to known if there are still some areas that can be optimized in
>  >twisted.web2 or the development is stable.
> 
> twisted.web2 is still officially unstable.  One of the *requirements* 
> for it to be declared officially stable is, in fact, optimization to be 
> as fast as web1 :-).
> 

Ok, I *just* have read the ticket. Thanks.

> Patches, especially those which would add some performance tests, would 
> be appreciated.

This is a complex task...

However there are good news.

1) Directory listing is much faster in web2.
    static.File('/usr/bin')

    ab -n 100 -c 1

    web: 0.63 req/sec
    web2: 17.25 req/sec


    ab -n 100 -c 25

    web: timed out
    web2 17.34


2) With keep alive enabled, web2 performs better
    (the same code as in the original post)

    ab -n 100 -c 1

    web: 1398 req/sec
    nevow: 1049 req/sec
    web2: 1186 req/sec

    ab -n 500 -c 50

    web: 1756 req/sec
    nevow: 1202 req/sec
    web2: 1273 req/sec


The result, here, is that web2 is as fast as Nevow.



Regards  Manlio Perillo



More information about the Twisted-web mailing list