[Web-SIG] Fwd: Fwd: wsgiref.simple_server slow on slow network
tibor at infinit.sk
Mon Jul 21 19:58:02 CEST 2008
I can see the 3 seconds / 150 miliseconds difference in a browser and
to get exact numbers I use Apache ab .
On Mon, Jul 21, 2008 at 6:26 PM, Ionel Maries Cristian
<ionel.mc at gmail.com> wrote:
> how are you benchmarking?
> On Mon, Jul 21, 2008 at 18:40, Tibor Arpas <tibor at infinit.sk> wrote:
>> I'm quite new to python and I ran into a performance problem with
>> wsgiref.simple_server. I'm running this little program.
>> from wsgiref import simple_server
>> def app(environ, start_response):
>> start_response('200 OK', [('content-type', 'text/html')])
>> return ['*'*50000]
>> httpd = simple_server.make_server('',8080,app)
>> except KeyboardInterrupt:
>> I get many hundreds of responses/second on my local computer, which is
>> But when I access this server through our VPN it performs very bad.
>> I get 0.33 requests/second as compared to 7 responses/second when
>> accessing 50kB static file served by IIS.
>> I also tried the same little program using paste.httpserver and that
>> version works fast as expected.
>> I cannot really understand this behavior. My only thought is that the
>> wsgiref version is sending the data in many chunks, and therefore the
>> latency of the VPN comes into play. But I don't really know how to
>> test this.
>> This is Python 2.5.2 on Windows Server 2003 (same behavior on Windows
>> XP), testing with Apache AB as well as Firefox...
>> Any help would be appriciated.
>> Web-SIG mailing list
>> Web-SIG at python.org
>> Web SIG: http://www.python.org/sigs/web-sig
> ionel maries cristian
More information about the Web-SIG