From owner-freebsd-performance@FreeBSD.ORG Sun Feb 25 19:47:01 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 25E8616A400 for ; Sun, 25 Feb 2007 19:47:01 +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 1247813C428 for ; Sun, 25 Feb 2007 19:47:01 +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 722C71A4D97; Sun, 25 Feb 2007 11:47:00 -0800 (PST) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id BCF2C524AA; Sun, 25 Feb 2007 14:46:56 -0500 (EST) Date: Sun, 25 Feb 2007 14:46:56 -0500 From: Kris Kennaway To: Jeremie Le Hen Message-ID: <20070225194656.GA77409@xor.obsecurity.org> References: <20070224215508.GA41968@xor.obsecurity.org> <20070225192239.GN2479@obiwan.tataz.chchile.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="T4sUOijqQbZv57TR" Content-Disposition: inline In-Reply-To: <20070225192239.GN2479@obiwan.tataz.chchile.org> User-Agent: Mutt/1.4.2.2i Cc: freebsd-performance@FreeBSD.org, Kris Kennaway Subject: Re: Progress on scaling of FreeBSD on 8 CPU systems 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: Sun, 25 Feb 2007 19:47:01 -0000 --T4sUOijqQbZv57TR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 25, 2007 at 08:22:39PM +0100, Jeremie Le Hen wrote: > Hi, Kris, >=20 > On Sat, Feb 24, 2007 at 04:55:08PM -0500, Kris Kennaway wrote: > > Now that the goals of the SMPng project are complete, for the past > > year or more several of us have been working hard on profiling FreeBSD > > in various multiprocessor workloads, and looking for performance > > bottlenecks to be optimized. > >=20 > > We have recently made significant progress on optimizing for MySQL > > running on an 8-core amd64 system. The graph of results may be found > > here: > >=20 > > http://www.freebsd.org/~kris/scaling/scaling.png > >=20 > > This shows the graph of MySQL transactions/second performed by a > > multi-threaded client workload against a local MySQL database with > > varying numbers of client threads, with identically configured FreeBSD > > and Linux systems on the same machine. >=20 > I'm really glad to be looking at these results eventually. Thanks to > all FreeBSD committers. >=20 >=20 > > The test was run on FreeBSD 7.0, with the latest version of the ULE > > 2.0 scheduler, the libthr threading library, and an uncommitted patch > > from Jeff Roberson [1] that addresses poor scalability of file > > descriptor locking (using a new sleepable mutex primitive); this patch > > is responsible for almost all of the performance and scaling > > improvements measured. It also includes some other patches (collected > > in my kris-contention p4 branch) that have been shown to help > > contention in MySQL workloads in the past (including a UNIX domain > > socket locking pushdown patch from Robert Watson), but these were > > shown to only give small individual contributions, with a cumulative > > effect on the order of 5-10%. >=20 > MySQL uses gettimeofday(2) very often. ISTR it has been stated > that MySQL performances could make the most of a system-wide shared > page where the current time would be updated regularly by the kernel; > gettimeofday(2) could consequentely work without any context switch. >=20 > Do the patches you're talking about include such a feature already ? No, but when we tried hacking up gettimeofday last year to see what effect the reduction of syscalls had, it didn't make a lot of difference (at the time there was a theory that this was a major source of the performance difference between freebsd and linux here). It would still be worthwhile to explore implementing such a thing, because it could give some incremental improvements, which are now becoming more interesting to explore for this workload. Kris --T4sUOijqQbZv57TR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFF4eewWry0BWjoQKURAhgWAJ9Z/V/HSHJoBQKmih03DlIS9kxtuwCg8F8P Ix4WaBCnPuBatAF5qAjYkjI= =Juhg -----END PGP SIGNATURE----- --T4sUOijqQbZv57TR--