X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id A7F7BB43E21 for ; Fri, 4 Jul 2003 17:21:52 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 61594-02 for ; Fri, 4 Jul 2003 14:21:42 -0300 (ADT) Received: from mail.libertyrms.com (unknown [209.167.124.227]) by svr1.postgresql.org (Postfix) with ESMTP id 081D6B43A6B for ; Fri, 4 Jul 2003 14:21:42 -0300 (ADT) Received: from [10.1.2.130] (helo=dba2) by mail.libertyrms.com with esmtp (Exim 3.22 #3 (Debian)) id 19YUFi-0000GY-00 for ; Fri, 04 Jul 2003 13:21:42 -0400 Received: by dba2 (Postfix, from userid 1019) id 29D18D75A; Fri, 4 Jul 2003 13:22:05 -0400 (EDT) Date: Fri, 4 Jul 2003 13:22:05 -0400 From: Andrew Sullivan To: pgsql-performance@postgresql.org Subject: Strange result: UNIX vs. TCP/IP sockets Message-ID: <20030704172205.GH4707@libertyrms.info> Mail-Followup-To: Andrew Sullivan , pgsql-performance@postgresql.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.4i X-Archive-Number: 200307/82 X-Sequence-Number: 2375 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 M2P 2A8 +1 416 646 3304 x110