[Web-SIG] Fwd: wsgiref.simple_server slow on slow network

Phillip J. Eby pje at telecommunity.com
Wed Jul 23 01:34:42 CEST 2008


At 12:21 AM 7/23/2008 +0200, Irmen de Jong wrote:
>Tibor Arpas wrote:
>>Hi,
>>I'm quite new to python and I ran into a performance problem with
>>wsgiref.simple_server. I'm running this little program.
>[...]
>>I get many hundreds of responses/second on my local computer, which is fine.
>>But when I access this server through our VPN it performs very bad.
>
>Could it be that the wsgiref is doing a reverse DNS lookup for every 
>incoming call?
>(for instance to determine the remote server hostname for some 
>reason such as logging)
>That could be a very slow operation.
>
>Just an idea, I have no idea about the workings of wsgiref, I've 
>just seen this happening in other situations.

It isn't really even wsgiref-related.  First, wsgiref.simple_server 
is based on the other stdlib HTTP server modules.

Second, it's not intended for production use.

Third, it's not multi-threaded, which is likely to be a factor if the 
performance tests are done using concurrent requests.



More information about the Web-SIG mailing list