Dev Web Server - slower on Windows Vista?

5 views
Skip to first unread message

Mike Koss

unread,
Jun 25, 2008, 1:07:26 PM6/25/08
to Google App Engine
Is it just me, or does the (local) Dev Web Server run significantly
slower on Vista. When I run it on my XP machine, it seems relatively
zippy. But even status files are served at a rate of about 1 per
second when using the Dev Web Server on Vista.

I'm wondering if I have some configuration problem, where the web
server is search some long path or something on each http request. It
makes it pretty difficult to test AppEngine locally at such glacial
speeds.

Mike Koss

unread,
Jun 25, 2008, 3:49:17 PM6/25/08
to Google App Engine
sorry, I meant *static* files only serve at a rate of 1 per second.

Mike Koss

unread,
Jun 26, 2008, 12:39:00 PM6/26/08
to Google App Engine
It seems that the Dev Web Server is **10** times slower on my Vista
desktop, than my puny XP laptop. What gives, I'm not sure. But I can
return static files in 100ms on XP that take over 1000ms on Vista. Is
anyone else seeing this behavior on Windows?

Andrew Badera

unread,
Jun 26, 2008, 12:46:34 PM6/26/08
to google-a...@googlegroups.com

WallyDD

unread,
Jun 26, 2008, 1:43:56 PM6/26/08
to Google App Engine
With sp1 it's quite slow.

1000ms times are pretty normal. It's faster to upload to appspot and
use that server than local for some testing.
> --Andy Baderahttp://higherefficiency.nethttp://flipbitsnotburgers.blogspot.com/http://andrew.badera.us/http://changeroundup.com/

Andrew Badera

unread,
Jun 26, 2008, 1:45:29 PM6/26/08
to google-a...@googlegroups.com
Anyone care to share some code? I haven't seen these issues on a Vista x64 notebook, 2.0 Core 2 Duo, 4GB of RAM, but then, I haven't done anything highly iterative ...

Mike Koss

unread,
Jun 26, 2008, 4:57:53 PM6/26/08
to Google App Engine
Update: This is likely not an AppEngine issue at all (though, it
makes it miserable to test on the local Web Server). I'm testing the
generic python server module, BaseHTTPServer, and I am seeing 1 second
response times there as well.

Next step is to see if anyone has reported issues with that on Vista
or break out a profiler to see where all the time is being spent (BTW,
this is running on Windows Vista Ultimate SP1).

On Jun 26, 10:45 am, "Andrew Badera" <and...@badera.us> wrote:
> Anyone care to share some code? I haven't seen these issues on a Vista x64
> notebook, 2.0 Core 2 Duo, 4GB of RAM, but then, I haven't done anything
> highly iterative ...
>

Mike Koss

unread,
Jun 26, 2008, 4:59:10 PM6/26/08
to Google App Engine
Here's a simple (non AppEngine) test case that shows really slow
response times (1 second for any request):

import BaseHTTPServer
import SimpleHTTPServer

handler = SimpleHTTPServer.SimpleHTTPRequestHandler;
server = BaseHTTPServer.HTTPServer(("", 8010), handler);
server.serve_forever()

Andrew Badera

unread,
Jun 26, 2008, 5:01:13 PM6/26/08
to google-a...@googlegroups.com
Is it Vista-specific, or Windows in general?

Mike Koss

unread,
Jun 26, 2008, 5:12:30 PM6/26/08
to Google App Engine
I don't have the same perf problems on XP - but have reproduced this
on Vista on two separate machines. Here's a profile of the time
needed to respond to 5 web requests:

ncalls tottime percall cumtime percall
filename:lineno(function)
5 10.537 2.107 10.537 2.107 {method 'accept' of
'_socket.socket' objects}
20 0.063 0.003 0.063 0.003 {built-in method
acquire}
72 0.004 0.000 0.004 0.000 {nt.stat}
4 0.002 0.000 0.002 0.000 {_socket.gethostbyaddr}
4 0.001 0.000 0.075 0.019 C:\Python25\lib
\SimpleHTTPServer.py:100(list_directory)
60 0.001 0.000 0.001 0.000 C:\Python25\lib
\urllib.py:1174(quote)
4 0.000 0.000 0.001 0.000 C:\Python25\lib
\rfc822.py:118(readheaders)
4 0.000 0.000 0.000 0.000 {nt.listdir}
28 0.000 0.000 0.000 0.000 {method 'sendall' of
'_socket.socket' objects}
68 0.000 0.000 0.001 0.000 C:\Python25\lib
\ntpath.py:59(join)

It seems all the time is being consumed in _socket.socket.accept().
I'm not the familiar with the sockets layer (Python or Windows), so
I'm not sure where to go from here.

Andrew Badera

unread,
Jun 26, 2008, 5:13:36 PM6/26/08
to google-a...@googlegroups.com
Have you employed any perfmon counters or traces?

Mike Koss

unread,
Jun 26, 2008, 5:25:47 PM6/26/08
to Google App Engine
OK - I found a solution. Instead of connecting to "localhost",
connect to "127.0.0.1" intead. This seems to get rid of 1 second of
overhead per request! I'm still not sure if this is on the client
side or the server side - could be a Vista DNS issue trying to search
for a machine called "localhost" on my network!

Andrew Badera

unread,
Jun 26, 2008, 5:28:03 PM6/26/08
to google-a...@googlegroups.com
What client are you using? Browser? Something you've written?

Mike Koss

unread,
Jun 26, 2008, 6:05:58 PM6/26/08
to Google App Engine
No, this is just FireFox (2). I checked my hosts file:

127.0.0.1 localhost
::1 localhost

I'm not familiar with the second entry - I think it's an IPV6 thing.
I tried commenting it out, but I wasn't getting very reproducible
results. SOMETIMES localhost was returning quickly after my edit, but
other times not.

The only thing that is working fast 100% of the time is to use
127.0.0.1 (or an additional hosts file entry that just points to
127.0.0.1).

Andrew Badera

unread,
Jun 26, 2008, 6:10:03 PM6/26/08
to google-a...@googlegroups.com
I'm curious if you'd see the same behavior in IE.

WallyDD

unread,
Jun 27, 2008, 3:00:16 AM6/27/08
to Google App Engine
changing from localhost to 127.0.0.1 seems to have fixed it somewhat.
IE doesn't appear to have the problem.

Waldemar Kornewald

unread,
Jun 27, 2008, 7:55:21 AM6/27/08
to Google App Engine
The problem is that Firefox wants to connect to localhost via IPv6.
The solution is to enter about:config in your location bar and set
"network.dns.ipv4OnlyDomains" to ".doubleclick.net,
localhost" (originally, this is only ".doubleclick.net").

Bye,
Waldemar Kornewald

Andrew Badera

unread,
Jun 27, 2008, 8:05:43 AM6/27/08
to google-a...@googlegroups.com
Awesome. I knew I'd read something along those lines while debugging .NET issues, but didn't seem to have it bookmarked, couldn't find what I thought I wanted in Google.

Andrew Badera

unread,
Jun 27, 2008, 8:06:43 AM6/27/08
to google-a...@googlegroups.com
Is this no longer an issue in FF3?

WallyDD

unread,
Jun 27, 2008, 1:39:05 PM6/27/08
to Google App Engine
Fixed the problem in FF3.

many thanks.
Reply all
Reply to author
Forward
0 new messages