Re: Anyone interested in improving postgresql scaling?

From: Kris Kennaway <kris(at)obsecurity(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kris Kennaway <kris(at)obsecurity(dot)org>, Mark Kirkwood <markir(at)paradise(dot)net(dot)nz>, current(at)FreeBSD(dot)org, performance(at)FreeBSD(dot)org, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Anyone interested in improving postgresql scaling?
Date: 2007-04-10 22:09:24
Message-ID: 20070410220923.GA74088@xor.obsecurity.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 10, 2007 at 05:36:17PM -0400, Tom Lane wrote:
> Kris Kennaway <kris(at)obsecurity(dot)org> writes:
> > I have not studied the exact code path, but there are indeed multiple
> > wakeups happening from the semaphore code (as many as the number of
> > active postgresql processes). It is easy to instrument
> > sleepq_broadcast() and log them when they happen.
>
> There are certainly cases where Postgres will wake up a number of
> processes in quick succession, but that should happen from a separate
> semop() kernel call, on a different semaphore, for each such process.
> If there's really multiple processes being released by the same semop()
> then there's a bug we need to look into (or maybe it's a kernel bug?).
> Anyway I'd be interested to know what the test case is, and which PG
> version you were testing.

I used 8.2 (and some older version when I first noticed it a year ago)
and either sysbench or supersmack will show it - presumably anything
that makes simultaneous queries. Just instrument sleepq_broadcast()
to e.g. log a KTR event when it wakes more than 1 process and you'll
see it happening.

Kris

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew - Supernews 2007-04-10 22:09:38 Re: Anyone interested in improving postgresql scaling?
Previous Message Tom Lane 2007-04-10 21:49:05 Re: [HACKERS] Fix mdsync never-ending loop problem