From owner-freebsd-smp@FreeBSD.ORG Sat Feb 24 23:13:58 2007 Return-Path: X-Original-To: smp@freebsd.org Delivered-To: freebsd-smp@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AA89316A404; Sat, 24 Feb 2007 23:13:58 +0000 (UTC) (envelope-from matt@ixsystems.com) Received: from mail.iXsystems.com (newknight.ixsystems.net [206.40.55.70]) by mx1.freebsd.org (Postfix) with ESMTP id 7DB8413C467; Sat, 24 Feb 2007 23:13:56 +0000 (UTC) (envelope-from matt@ixsystems.com) Received: from localhost (localhost [127.0.0.1]) by mail.iXsystems.com (Postfix) with ESMTP id EA3DFBE3B; Sat, 24 Feb 2007 14:44:58 -0800 (PST) Received: from mail.iXsystems.com ([127.0.0.1]) by localhost (mail.ixsystems.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 38327-02; Sat, 24 Feb 2007 14:44:56 -0800 (PST) Received: from [192.168.0.100] (c-24-6-31-249.hsd1.ca.comcast.net [24.6.31.249]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.iXsystems.com (Postfix) with ESMTP id 05C01BD4B; Sat, 24 Feb 2007 14:44:56 -0800 (PST) From: Matt Olander Organization: iXsystems To: freebsd-hackers@freebsd.org Date: Sat, 24 Feb 2007 14:44:54 -0800 User-Agent: KMail/1.9.5 References: <20070224213111.GB41434@xor.obsecurity.org> In-Reply-To: <20070224213111.GB41434@xor.obsecurity.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200702241444.54960.matt@ixsystems.com> X-Virus-Scanned: Maia Mailguard Cc: smp@freebsd.org, hackers@freebsd.org, current@freebsd.org, Kris Kennaway Subject: Re: Progress on scaling of FreeBSD on 8 CPU systems X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Feb 2007 23:13:58 -0000 On Saturday 24 February 2007 1:31 pm, 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. > > 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: > > http://www.freebsd.org/~kris/scaling/scaling.png > > 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. > > 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%. > > With this configuration we are able to achieve performance that is > consistent with Linux at peak (the graph shows Linux 2% faster, but > this is commensurate with the margin of error coming from variance > between runs, so more data is needed to distinguish them), with 8 > client threads (=1 thread/CPU core), and significantly outperforms > Linux at higher than peak loads, when running on the same hardware. > > Specifically, beyond 8 client threads FreeBSD has only minor > performance degradation (an 8% drop from peak throughput at 8 clients > to 20 clients), but Linux collapses immediately above 8 threads, and > above 14 threads asymptotes to essentially single-threaded levels. > At 20 clients FreeBSD outperforms Linux by a factor of 4. > > We see this result as part of the payoff we are seeing from the hard > work of many developers over the past 7 years. In particular it is a > significant validation of the SMP and locking strategies chosen for > the FreeBSD kernel in the post-FreeBSD 4.x world. > > More configuration details and discussion about the benchmark may be > found here: > > http://people.freebsd.org/~kris/scaling/mysql.html Well done! Nice work guys!!! FYI, we're working with Intel to get an engineering sample of the quad core, quad CPU system for some further SMP testing. Kris, I'll let you know as soon as I have word when we're getting one and if we can keep it, we'll send it up to be included in the cluster in Canada. Yay!!!!!!! This is just fabulous. -matt > > Kris -- Matt Olander CTO, iXsystems - "Servers for Open Source" http://www.iXsystems.com Public Relations, The FreeBSD Project http://www.FreeBSD.org BSD on the Desktop! http://www.pcbsd.org Phone: (408)943-4100 ext. 113 Fax: (408)943-4101