From owner-freebsd-performance@FreeBSD.ORG Tue Apr 10 04:57:55 2007 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AA05F16A403 for ; Tue, 10 Apr 2007 04:57:55 +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 9878213C4CC for ; Tue, 10 Apr 2007 04:57:55 +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 8C0261A4D87; Mon, 9 Apr 2007 21:58:00 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id B96F8515AC; Tue, 10 Apr 2007 00:57:54 -0400 (EDT) Date: Tue, 10 Apr 2007 00:57:54 -0400 From: Kris Kennaway To: Kevin Way Message-ID: <20070410045754.GA41769@xor.obsecurity.org> References: <461B0CD0.8090404@insidesystems.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YiEDa0DAkWCtVeE4" Content-Disposition: inline In-Reply-To: <461B0CD0.8090404@insidesystems.net> User-Agent: Mutt/1.4.2.2i Cc: freebsd-performance@freebsd.org Subject: Re: Anyone interested in improving postgresql scaling? X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Apr 2007 04:57:55 -0000 --YiEDa0DAkWCtVeE4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 10, 2007 at 12:04:32AM -0400, Kevin Way wrote: > Kris Kennaway wrote: > >If so, then your task is the following: > > > >Make SYSV semaphores less dumb about process wakeups. Currently > >whenever the semaphore state changes, all processes sleeping on the > >semaphore are woken, even if we only have released enough resources > >for one waiting process to claim. i.e. there is a thundering herd > >wakeup situation which destroys performance at high loads. Fixing > >this will involve replacing the wakeup() calls with appropriate > >amounts of wakeup_one(). > Could this cause problem cause a situation where an 8-Core system was=20 > 50-75% slower than an otherwise equivalent 2-Core system? >=20 > I have a graph of my sysbench/pgsql results here: >=20 > http://blog.insidesystems.net/files/sysctl-pgsq-amd64-wtf.png >=20 > As the graph shows, the 8-core system is about half the speed of the=20 > 2-core system at 2 simultaneous threads, and it decays down to=20 > approximately 1/4 the speed of the 2-core system as the # of threads hits= 5. >=20 > All other (non-pgsql, non-sysv) tests came back approximately as=20 > expected, but I'm left wondering if I did something wrong, or if 8 cpus= =20 > are slower than 2, when it comes to Postgres on currently available FreeB= SD. I wouldn't expect 6.2 to have good scaling on 8 cpus for this kind of benchmark. Fixing that was what we have been working on for 7.0 (and basically succeeded). The most important fixes are already in 7.0 CVS, but a possible merge to 6.x will only happen after a suitably conservative delay. Kris --YiEDa0DAkWCtVeE4 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGGxlSWry0BWjoQKURAlzLAJ9Q0F2UTkn64W9LQ8GLkd+ogDySIwCfUS3F ZIagTRCYOWo6F12ypxTh7BY= =ey3P -----END PGP SIGNATURE----- --YiEDa0DAkWCtVeE4--