From owner-freebsd-current@FreeBSD.ORG Tue Apr 10 22:28:32 2007 Return-Path: X-Original-To: current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B021E16A401; Tue, 10 Apr 2007 22:28:32 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 9A18A13C4BA; Tue, 10 Apr 2007 22:28:32 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 797EB1A4D86; Tue, 10 Apr 2007 15:28:38 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id C921451933; Tue, 10 Apr 2007 18:28:31 -0400 (EDT) Date: Tue, 10 Apr 2007 18:28:31 -0400 From: Kris Kennaway To: Tom Lane Message-ID: <20070410222831.GA75767@xor.obsecurity.org> References: <20070226002234.GA80974@xor.obsecurity.org> <461B69C0.4060707@paradise.net.nz> <20070410184304.GB44123@xor.obsecurity.org> <3721.1176240977@sss.pgh.pa.us> <20070410220923.GA74088@xor.obsecurity.org> <4307.1176243997@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LZvS9be/3tNcYl/X" Content-Disposition: inline In-Reply-To: <4307.1176243997@sss.pgh.pa.us> User-Agent: Mutt/1.4.2.2i Cc: pgsql-hackers , performance@FreeBSD.org, current@FreeBSD.org, Mark Kirkwood , Kris Kennaway Subject: Re: [HACKERS] Anyone interested in improving postgresql scaling? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Apr 2007 22:28:32 -0000 --LZvS9be/3tNcYl/X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 10, 2007 at 06:26:37PM -0400, Tom Lane wrote: > Kris Kennaway writes: > > On Tue, Apr 10, 2007 at 05:36:17PM -0400, Tom Lane wrote: > >> Anyway I'd be interested to know what the test case is, and which PG > >> version you were testing. >=20 > > 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. >=20 > Sorry, I'm not much of a BSD kernel hacker ... but sleepq_broadcast > seems a rather generic name. Is that called *only* from semop? It's part of how wakeup() is implemented. > I'm wondering if you are seeing simultaneous wakeup from some other > cause --- sleep timeout being the obvious possibility. We are aware > of behaviors (search the PG lists for "context swap storm") where a > number of backends will all fail to get a spinlock and do short usleep > or select-timeout waits. In this situation they'd all wake up at the > next scheduler clock tick ... Nope, it's not this. Kris --LZvS9be/3tNcYl/X Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGHA+PWry0BWjoQKURAo2KAKCc7vY5gceTDKOIVm7/jjLD6PrWVwCg6XrM fEXzN+sfe/MtkOx61CjEG9g= =RBAk -----END PGP SIGNATURE----- --LZvS9be/3tNcYl/X--