Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id E80379FA0EF for ; Thu, 14 Dec 2006 19:43:56 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 16150-07 for ; Thu, 14 Dec 2006 19:43:53 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.243]) by postgresql.org (Postfix) with ESMTP id 40ED59FA0B7 for ; Thu, 14 Dec 2006 19:43:53 -0400 (AST) Received: by an-out-0708.google.com with SMTP id c24so227839ana for ; Thu, 14 Dec 2006 15:43:52 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=BkOs0zjsirTiRn2bReGO1Tp1ZQwov9mEsN1GJVgU9A9/aUB0DkfP+ZlJIGWPm1lzZIvSe+qdZTgj+cZqR8AucxBRd/trz9AgqfWBBiUE4XilJPYmNbDd54CnsYfL06ZiGTEuUHFUemJt9UJEBJFK8wHx5nDJN3m8/BgMWqFK5u4= Received: by 10.78.193.19 with SMTP id q19mr105670huf.1166139831386; Thu, 14 Dec 2006 15:43:51 -0800 (PST) Received: by 10.78.126.15 with HTTP; Thu, 14 Dec 2006 15:43:51 -0800 (PST) Message-ID: Date: Thu, 14 Dec 2006 17:43:51 -0600 From: "Kelly Burkhart" To: "Tom Lane" Subject: Re: EXPLAIN ANALYZE on 8.2 Cc: "Evgeny Gridasov" , pgsql-performance@postgresql.org In-Reply-To: <21516.1166114475@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20061214163230.d46f0138.eugrid@fpm.kubsu.ru> <21146.1166112702@sss.pgh.pa.us> <20061214192920.c75385d6.eugrid@fpm.kubsu.ru> <21516.1166114475@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/390 X-Sequence-Number: 22446 On 12/14/06, Tom Lane wrote: > Evgeny Gridasov writes: > > This is a Linux Debian 3.1 ontop of 2x XEON 3.4 Ghz. > > PostgreSQL is 8.2 checked out from CVS REL8_2_STABLE yesterday. > > I'm running the same Postgres on another machine, > > with Debian Etch and have the same results. > > Hmph. With 8.2 on Fedora 5 on a 2.8Ghz dual Xeon, I get this: > > regression=# explain analyze select count(*) from foo; > QUERY PLAN > --------------------------------------------------------------------------------------------------------------------- > Aggregate (cost=44764.00..44764.01 rows=1 width=0) (actual time=1324.846..1324.847 rows=1 loops=1) > -> Seq Scan on foo (cost=0.00..38514.00 rows=2500000 width=0) (actual time=0.046..748.582 rows=2500000 loops=1) > Total runtime: 1324.902 ms > (3 rows) > > Time: 1325.591 ms > regression=# > > which works out to about 0.14 microsec per gettimeofday call, on a > machine that ought to be slower than yours. So I think you've got > either a crummy motherboard, or a kernel that doesn't know the best > way to read the clock on that hardware. There is some discussion > of this in the archives (probably in pgsql-hackers); look back around > May or so when we were unsuccessfully trying to hack EXPLAIN to use > fewer gettimeofday calls. Yow! I notice the same thing on our HP BL25p blades w/2*opteron 270 (four total cores, AMD 8111 or 8131 chipset). 1.25 microsec/call vs my new desktop (Intel Core2 6300) 0.16 microsec/call. I hope this isn't a "crummy mainboard" but I can't seem to affect things by changing clock source (kernel 2.6.16 SLES10). I tried kernel command option clock=XXX where XXX in (cyclone,hpet,pmtmr,tsc,pit), no option was significantly better than the default. Anyone know how this might be improved (short of replacing hardware)? -K