Re: EXPLAIN ANALYZE on 8.2

From: "Kelly Burkhart" <kelly(dot)burkhart(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Evgeny Gridasov" <eugrid(at)fpm(dot)kubsu(dot)ru>, pgsql-performance(at)postgresql(dot)org
Subject: Re: EXPLAIN ANALYZE on 8.2
Date: 2006-12-14 23:43:51
Message-ID: fa1e4ce70612141543o8866d7fg417eca88ce9b1344@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

On 12/14/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Evgeny Gridasov <eugrid(at)fpm(dot)kubsu(dot)ru> 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:
>
<snip>
> 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Kirkwood 2006-12-14 23:59:40 Re: EXPLAIN ANALYZE on 8.2
Previous Message Tom Lane 2006-12-14 21:51:41 Re: unixware and --with-ldap

Browse pgsql-performance by date

  From Date Subject
Next Message Mark Kirkwood 2006-12-14 23:59:40 Re: EXPLAIN ANALYZE on 8.2
Previous Message Alexander Staubo 2006-12-14 22:39:55 Re: New to PostgreSQL, performance considerations