Re: Simple query takes a long time on win2K

From: "A(dot) Mous" <a(dot)mous(at)shaw(dot)ca>
To: 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: 'Richard Huxton' <dev(at)archonet(dot)com>, pgsql-general(at)postgresql(dot)org, 'Magnus Hagander' <mha(at)sollentuna(dot)net>, "'Joshua D(dot) Drake'" <jd(at)commandprompt(dot)com>, 'Lincoln Yeoh' <lyeoh(at)pop(dot)jaring(dot)my>
Subject: Re: Simple query takes a long time on win2K
Date: 2005-03-23 18:05:16
Message-ID: 005d01c52fd2$de49e6f0$6500a8c0@PETER
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers-win32

For the sake of further comparison, I added another computer to the
comparison. Another Celeron 2400, running win XP again, but only 256MB ram.
All records returned to client in 200ms (slightly longer than the 2400
machine with 500MB ram). Recall that the win2K box with 256MB Ram (PIII
1.8) took 4 seconds.

The confusing thing for me is that so far, the only consistent pattern here
is that machines running win2k Pro take roughly 4 seconds to deliver the
data to the client, while win XP machines perform much better (<200ms to
deliver recordset). I've tried installing QoS packet scheduler on win2K pro
machines to no avail.

For kicks, I'll repeat the tests on the PII 233 machine with WinXP
installed. Thank you Tom for pointing out that the EXPLAIN result shows the
data is being fetched in under 100ms, but why is it taking so darn long to
move that data into the client (be it psql or pgAdminIII)?

I'll let you all know how the winXP test on the PII goes. Thank you all for
your insights.

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: March 23, 2005 9:51 AM
To: A. Mous
Cc: 'Richard Huxton'; pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Simple query takes a long time on win2K

"A. Mous" <a(dot)mous(at)shaw(dot)ca> writes:
> None of these tests were run over a network - all local.

Nonetheless, the client-to-server communication goes through the Windows
TCP stack, because that's the only comm protocol we support on Windows.

Notice that your EXPLAIN ANALYZEs show the query as executing in less
than 100ms even on the slower machine --- so it seems the bottleneck has
to be in sending the results to the client.

I seem to recall threads on the win32-hackers list to the effect that
local TCP performance really sucks on Win2K unless you have the right
patch installed ("QoS" comes to mind, but I didn't pay attention to
details). We probably need to get that info into the FAQ.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-03-23 18:11:18 Re: Simple query takes a long time on win2K
Previous Message Tom Lane 2005-03-23 17:51:39 Re: multi line text data/query ?bug?

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Tom Lane 2005-03-23 18:11:18 Re: Simple query takes a long time on win2K
Previous Message uipdcnmv 2005-03-23 17:40:00 ij !!!!!01:40:00