Date: Tue, 10 Apr 2007 18:09:24 -0400 From: Kris Kennaway <kris@obsecurity.org> To: Tom Lane <tgl@sss.pgh.pa.us> Cc: pgsql-hackers <pgsql-hackers@postgresql.org>, performance@FreeBSD.org, current@FreeBSD.org, Mark Kirkwood <markir@paradise.net.nz>, Kris Kennaway <kris@obsecurity.org> Subject: Re: [HACKERS] Anyone interested in improving postgresql scaling? Message-ID: <20070410220923.GA74088@xor.obsecurity.org> In-Reply-To: <3721.1176240977@sss.pgh.pa.us> References: <20070226002234.GA80974@xor.obsecurity.org> <461B69C0.4060707@paradise.net.nz> <20070410184304.GB44123@xor.obsecurity.org> <3721.1176240977@sss.pgh.pa.us>
next in thread | previous in thread | raw e-mail | index | archive | help
--+QahgC5+KEYLbs62 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 10, 2007 at 05:36:17PM -0400, Tom Lane wrote: > Kris Kennaway <kris@obsecurity.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. >=20 > 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 --+QahgC5+KEYLbs62 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGHAsTWry0BWjoQKURAuEBAKCWokB1FVD2u9Ldy2OqutQGbU1pOQCgsRE8 NsPcoUax8YkEbnXR7mY9SBE= =6la/ -----END PGP SIGNATURE----- --+QahgC5+KEYLbs62--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070410220923.GA74088>