Re: sort_mem sizing (Non-linear Performance) - Mailing list pgsql-general

From Curt Sampson
Subject Re: sort_mem sizing (Non-linear Performance)
Date
Msg-id Pine.NEB.4.43.0206101643560.426-100000@angelic.cynic.net
Whole thread Raw
In response to Re: sort_mem sizing (Non-linear Performance)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Sun, 9 Jun 2002, Tom Lane wrote:

> ...depending on whether you have MEMORY_CONTEXT_CHECKING enabled
> (did you configure --enable-cassert?)

No, I didn't enable that.

> and on whether MAXALIGN is 4 or 8 bytes on your hardware.

i386, so probably 4 bytes.

> So the palloc overhead could indeed amount to a factor of nearly 3x.

That would seem about right. Possibly it's even more in some way;
even with sortmem set to 32 MB, my backend grows to about 115 MB,
105 MB resident. Normally it's around 3 MB.

> If we did make these changes then I'd be inclined to tweak the default
> SortMem up from 512K to say 1024K; otherwise we'd effectively be
> reducing the default sort size because of the extra space being charged
> for.

I'd be inclined to bump it up to 2-4 MB, actually; machines tend to
be large enough these days that grabbing an extra MB or two when
you need it is not a problem at all.

cjs
--
Curt Sampson  <cjs@cynic.net>   +81 90 7737 2974   http://www.netbsd.org
    Don't you know, in this new Dark Age, we're all light.  --XTC


pgsql-general by date:

Previous
From: "Bertin, Philippe"
Date:
Subject: Re: Are globally defined constants possible at all ?
Next
From: Adrian 'Dagurashibanipal' von Bidder
Date:
Subject: Problem (bug?) with deferred foreign key checks?