[Stackless] Stackless networking example takes 10 seconds to respond to each request.

Chris Dew cmsdew at googlemail.com
Sat Mar 1 12:57:15 CET 2008


The concept of Stackless is very interesting, so I'm looking at the
viability of using Stackless Python for a specialised webserver.

I'm running the Simple HTTP Server (basicWebserver.py,
http://code.google.com/p/stacklessexamples/wiki/StacklessNetworking) with
the corrected stacklesssocket (
http://omake.accense.com/browser/python/stackless/stacklesssocket.py).

I'm using Stackless Python 2.5.1 with Ubuntu 7.10 on a single core Pentium
M.

(The uncorrected version of stacklesssocket.py was producing stacktraces on
each request.)

A couple of http requests to the server produce the following output on
stdout:

localhost - - [23/Feb/2008 09:23:31] "GET / HTTP/1.1" 200 -
<stackless.tasklet object at 0xb7cfe614> blocked 1 delay 20
<stackless.tasklet object at 0xb7cfe614> done
localhost - - [23/Feb/2008 09:23:52] "GET /favicon.ico HTTP/1.1" 200 -
<stackless.tasklet object at 0x824a17c> blocked 2 delay 5
<stackless.tasklet object at 0x824a17c> done
localhost - - [23/Feb/2008 09:24:24] "GET / HTTP/1.1" 200 -
<stackless.tasklet object at 0x824a2cc> blocked 3 delay 20
<stackless.tasklet object at 0x824a2cc> done

Http requests (from firefox 2.0.0.12 on ubuntu 7.10) take around ten seconds
to be serviced (locally, while at a loadaverage <0.1).

Can I make this run at acceptable speeds (i.e. <100ms per request), or is
good network performance not possible with stackless?  I already use
Twisted, which would do the job, but Stackless looks interesting.

Regards,

Chris.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.stackless.com/pipermail/stackless/attachments/20080301/a6300bdf/attachment.htm 


More information about the Stackless mailing list