Strange result: UNIX vs. TCP/IP sockets

From: Andrew Sullivan <andrew(at)libertyrms(dot)info>
To: pgsql-performance(at)postgresql(dot)org
Subject: Strange result: UNIX vs. TCP/IP sockets
Date: 2003-07-04 17:22:05
Message-ID: 20030704172205.GH4707@libertyrms.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi all,

We're run into a rather odd problem here, and we're puzzling out
what's going on. But while we do, I thought I'd see if anyone else
has anything similar to report.

This is for 7.2.4 on Solaris 8.

We have a query for which EXPLAIN ANALYSE on a local psql connection
always returns a time of between about 325 msec and 850 msec
(depending on other load, whether the result is in cache, &c. -- this
is an aggregates query involving min() and count()).

If I connect using -h 127.0.0.1, however, I can _sometimes_ get the
query to take as long as 1200 msec. The effect is sporadic (of
course. If it were totally predictable, the computing gods wouldn't
be having any fun with me), but it is certainly there off and on.
(We discovered it because our application is regularly reporting
times on this query roughly twice as long as I was able to get with
psql, until I connected via TCP/IP.)

I'll have more to report as we investigate further -- at the moment,
this has cropped up on a production system, and so we're trying to
reproduce it in our test environment. Naturally, we're looking at
the TCP/IP stack configuration, among other stuff. In the meantime,
however, I wondered if anyone knows which bits I ought to be prodding
at to look for sub-optimal libraries, &c.; or whether anyone else has
run into similar problems on Solaris or elsewhere.

A

--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew(at)libertyrms(dot)info> M2P 2A8
+1 416 646 3304 x110

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message The Hermit Hacker 2003-07-04 17:35:18 Re: Strange result: UNIX vs. TCP/IP sockets
Previous Message Tom Lane 2003-07-04 17:15:17 Re: Moving postgresql.conf tunables into 2003...