Re: Simple query takes a long time on win2K

Lists: pgsql-generalpgsql-hackers-win32
From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "A(dot) Mous" <a(dot)mous(at)shaw(dot)ca>
Cc: "Richard Huxton" <dev(at)archonet(dot)com>, <pgsql-general(at)postgresql(dot)org>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, "Lincoln Yeoh" <lyeoh(at)pop(dot)jaring(dot)my>, <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: Simple query takes a long time on win2K
Date: 2005-03-23 19:04:12
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE6C713F@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers-win32

> > 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.
>
> I really thought the QoS thing would be it. Maybe there was
> some other thing to do, configuration-wise, to make that do
> its thing properly?
>
> If you could reproduce this behavior across the network I
> would tell you to get out a packet analyzer (ethereal or some
> such) and sniff the traffic to learn more. Are there any
> programs that can sniff local TCP traffic on win2k?

Microsoft ships a network monitor with Win2k Server. Otherwise, just get
ethereal, it works perfectly on win2k.

//Magnus


From: "A(dot) Mous" <a(dot)mous(at)shaw(dot)ca>
To: 'Magnus Hagander' <mha(at)sollentuna(dot)net>, '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, "'Joshua D(dot) Drake'" <jd(at)commandprompt(dot)com>, 'Lincoln Yeoh' <lyeoh(at)pop(dot)jaring(dot)my>, pgsql-hackers-win32(at)postgresql(dot)org
Subject: Re: Simple query takes a long time on win2K
Date: 2005-03-23 19:57:46
Message-ID: 006001c52fe2$9554bc80$6500a8c0@PETER
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers-win32

OK, I've taken the PII 233 that had win2K pro on it, and installed winXP
home. Reloaded psql 8.0.1 and the database and ran the exact same query.
Recall with win2K it took 4000ms to get the data to the client (about 1500
rows) and on XP it takes 290ms the first time, and about 250ms every time
thereafter.

Results of EXPLAIN ANALYZE SELECT * FROM foo are:

Seq Scan on foo (cost=0.00..40.72 rows=1472 width=134) (actual
time=0.000..50.000 rows=1472 loops=1)

By the way, this table only has 7 columns...why is the width described as
134?

I've tried installing the QoS packet scheduler with win2K pro and it did
absolutely nothing. I will now download ethereal and install on one of the
other win2K pro machines that has high latency, however, what exactly am I
looking for?

You know, among the win2K machines that I've tested so far, if the only slow
ones were the pII 233 and the Celeron 400 I could accept the fact that it's
ancient hardware. But the pIII800 was also dead slow to return the data to
the client app, and this most recent test clearly shows that the OS is the
problem. Ug.

I'd greatly appreciate any input on this! Thanks.

-----Original Message-----
From: Magnus Hagander [mailto:mha(at)sollentuna(dot)net]
Sent: March 23, 2005 12:04 PM
To: Tom Lane; A. Mous
Cc: Richard Huxton; pgsql-general(at)postgresql(dot)org; Joshua D. Drake; Lincoln
Yeoh; pgsql-hackers-win32(at)postgresql(dot)org
Subject: RE: [GENERAL] Simple query takes a long time on win2K

> > 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.
>
> I really thought the QoS thing would be it. Maybe there was
> some other thing to do, configuration-wise, to make that do
> its thing properly?
>
> If you could reproduce this behavior across the network I
> would tell you to get out a packet analyzer (ethereal or some
> such) and sniff the traffic to learn more. Are there any
> programs that can sniff local TCP traffic on win2k?

Microsoft ships a network monitor with Win2k Server. Otherwise, just get
ethereal, it works perfectly on win2k.

//Magnus


From: "A(dot) Mous" <a(dot)mous(at)shaw(dot)ca>
To: 'Magnus Hagander' <mha(at)sollentuna(dot)net>, '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, "'Joshua D(dot) Drake'" <jd(at)commandprompt(dot)com>, 'Lincoln Yeoh' <lyeoh(at)pop(dot)jaring(dot)my>, pgsql-hackers-win32(at)postgresql(dot)org
Subject: Re: Simple query takes a long time on win2K
Date: 2005-03-24 03:49:22
Message-ID: 007501c53024$7764d560$6500a8c0@PETER
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers-win32

Thank you all for your input, and thanks about the tip on ethereal - cool
program. Here's what I've found out from today's testing:

The total size of the recordset that is being served up is about 500kb.
When serving across a network, the time to deliver the records to the client
is largely dependent on the hardware doing the serving (as expected) and
regardless of which OS (Win 2K pro or XP pro). The thing that really threw
me off, and still does is when the same data is served up locally. In this
case, all test win2K machines (Celeron 400 up to pIII 800) retrieved the
data from disk in under 100ms but took an additional 4000ms to send to the
local client. This is observed even if QoS packet scheduler is installed.
By contrast, Win XP serves up locally nice and fast, even when installed on
exactly the same hardware that was used for the win2K test.

Thanks to all for your help and insight on this one, although I'm still
puzzled by the behaviour on the win2K boxes serving locally.

Cheers.

-----Original Message-----
From: Magnus Hagander [mailto:mha(at)sollentuna(dot)net]
Sent: March 23, 2005 12:04 PM
To: Tom Lane; A. Mous
Cc: Richard Huxton; pgsql-general(at)postgresql(dot)org; Joshua D. Drake; Lincoln
Yeoh; pgsql-hackers-win32(at)postgresql(dot)org
Subject: RE: [GENERAL] Simple query takes a long time on win2K

> > 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.
>
> I really thought the QoS thing would be it. Maybe there was
> some other thing to do, configuration-wise, to make that do
> its thing properly?
>
> If you could reproduce this behavior across the network I
> would tell you to get out a packet analyzer (ethereal or some
> such) and sniff the traffic to learn more. Are there any
> programs that can sniff local TCP traffic on win2k?

Microsoft ships a network monitor with Win2k Server. Otherwise, just get
ethereal, it works perfectly on win2k.

//Magnus


From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Simple query takes a long time on win2K
Date: 2005-03-24 13:17:49
Message-ID: 20050324131749.GA30774@phlogiston.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers-win32

On Wed, Mar 23, 2005 at 08:49:22PM -0700, A. Mous wrote:
> case, all test win2K machines (Celeron 400 up to pIII 800) retrieved the
> data from disk in under 100ms but took an additional 4000ms to send to the
> local client. This is observed even if QoS packet scheduler is installed.

If you connect to the local IP (i.e. not 127.0.0.1 but some other
interface), does the same thing happen? (This would tell you whether
the problem lies in some sort of special problem routing localhost,
or whether it's something else.)

A

--
Andrew Sullivan | ajs(at)crankycanuck(dot)ca
The fact that technology doesn't work is no bar to success in the marketplace.
--Philip Greenspun