Re: 8.1 iss

From: "Luke Lonergan" <LLonergan(at)greenplum(dot)com>
To: gsstark(at)mit(dot)edu, martin(at)portant(dot)com
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: 8.1 iss
Date: 2005-11-06 20:19:02
Message-ID: 3E37B936B592014B978C4415F90D662DE11D27@MI8NYCMAIL06.Mi8.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Greg,

Increasing memory actually slows down the current sort performance.

We're working on a fix for this now in bizgres.

Luke
--------------------------
Sent from my BlackBerry Wireless Device

-----Original Message-----
From: pgsql-performance-owner(at)postgresql(dot)org <pgsql-performance-owner(at)postgresql(dot)org>
To: PostgreSQL <martin(at)portant(dot)com>
CC: pgsql-performance(at)postgresql(dot)org <pgsql-performance(at)postgresql(dot)org>
Sent: Sun Nov 06 14:24:00 2005
Subject: Re: [PERFORM] 8.1 iss

"PostgreSQL" <martin(at)portant(dot)com> writes:

...
> As I post this, the query is approaching an hour of run time. I've listed
> an explain of the query and my non-default conf parameters below. Please
> advise on anything I should change or try, or on any information I can
> provide that could help diagnose this.
>
>
> GroupAggregate (cost=9899282.83..10285434.26 rows=223858 width=15)
> Filter: (count(*) > 1)
> -> Sort (cost=9899282.83..9994841.31 rows=38223392 width=15)
> Sort Key: v_barcode
> -> Seq Scan on lead (cost=0.00..1950947.92 rows=38223392 width=15)
>
> shared_buffers = 50000
> work_mem = 16384
...

It sounds to me like it's doing a large on-disk sort. Increasing work_mem
should improve the efficiency. If you increase it enough it might even be able
to do it in memory, but probably not.

The shared_buffers is excessive but if you're using the default 8kB block
sizes then it 400MB of shared pages on a 16GB machine ought not cause
problems. It might still be worth trying lowering this to 10,000 or so.

Is this a custom build from postgresql.org sources? RPM build? Or is it a BSD
ports or Gentoo build with unusual options?

Perhaps posting actual vmstat and iostat output might help if someone catches
something you didn't see?

--
greg

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2005-11-06 20:26:13 Re: Performance PG 8.0 on dual opteron / 4GB / 3ware
Previous Message Joost Kraaijeveld 2005-11-06 19:33:53 Re: Performance PG 8.0 on dual opteron / 4GB / 3ware