Re: Spinlock performance improvement proposal

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Justin Clift <justin(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Spinlock performance improvement proposal
Date: 2001-10-01 16:19:06
Message-ID: 23919.1001953146@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
>> Tom Lane wrote:
> I think the default NBuffers (64) is too low to give meaningful
> performance numbers, too. I've been thinking that maybe we should
> raise it to 1000 or so by default.

>> Maybe something simple like pg_ctl shell script message, or something
>> proper like a postmaster start-up check.

> Yes, this seems like the way to go, probably something in the postmaster
> log file.

Except that a lot of people send postmaster stderr to /dev/null.
I think bleating about untuned parameters in the postmaster log will be
next to useless, because it won't do a thing except for people who are
clueful enough to (a) direct the log someplace useful and (b) look at it
carefully. Those folks are not the ones who need help about tuning.

We already have quite detailed error messages for shmget/semget
failures, eg

$ postmaster -B 200000
IpcMemoryCreate: shmget(key=5440001, size=1668366336, 03600) failed: Invalid argument

This error can be caused by one of three things:

1. The maximum size for shared memory segments on your system was
exceeded. You need to raise the SHMMAX parameter in your kernel
to be at least 4042162176 bytes.

2. The requested shared memory segment was too small for your system.
You need to lower the SHMMIN parameter in your kernel.

3. The requested shared memory segment already exists but is of the
wrong size. This can occur if some other application on your system
is also using shared memory.

The PostgreSQL Administrator's Guide contains more information about
shared memory configuration.

This is still missing a bet since it fails to mention the option of
adjusting -B and -N instead of changing kernel parameters, but that's
easily fixed. I propose that we reword this message and the semget
one to mention first the option of changing -B/-N and second the option
of changing kernel parameters. Then we could consider raising the
default -B setting to something more realistic.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-10-01 16:22:33 Re: Problem on AIX with current
Previous Message Marc G. Fournier 2001-10-01 16:10:17 Re: cvs problem