From owner-freebsd-current@FreeBSD.ORG Sat Jan 28 22:40:57 2012 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B004106566C; Sat, 28 Jan 2012 22:40:57 +0000 (UTC) (envelope-from flo@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 631718FC0A; Sat, 28 Jan 2012 22:40:57 +0000 (UTC) Received: from nibbler-wlan.fritz.box (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q0SMesYw014466; Sat, 28 Jan 2012 22:40:55 GMT (envelope-from flo@FreeBSD.org) Message-ID: <4F247975.9050208@FreeBSD.org> Date: Sat, 28 Jan 2012 23:40:53 +0100 From: Florian Smeets User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0) Gecko/20120124 Thunderbird/10.0 MIME-Version: 1.0 To: performance@FreeBSD.org X-Enigmail-Version: 1.4a1pre Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig68C92A85B2E237E1C5E2AFBB" X-Mailman-Approved-At: Sun, 29 Jan 2012 00:13:23 +0000 Cc: Subject: ULE vs. 4BSD scheduler benchmarks 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: Sat, 28 Jan 2012 22:40:57 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig68C92A85B2E237E1C5E2AFBB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable [current@ bcc'ed to get a wider audience, please discuss on performance@]= Hi, in recent times i saw a lot of threads where it was suggested people should switch from the ULE to the 4BSD scheduler. That got me thinking and i decided to run a few benchmarks. I looked through all the stuff Kris and Jeff did a few years ago and tried to follow their example. The main motivation is however that we (Attilio Rao and I) want to set a baseline for future reference, mainly for the work that's going on in the vmcontention branch right now, that is the reason why all tests were run on head@r229659. All debugging was disabled (WITNESS and friends for the kernel and MALLOC_PRODUCTION=3Dyes for libc). For now i ran 3 different things. MySQL/sysbench, PostgreSQL/pgbench and pbzip2. All software was installed from ports with the default system gcc (gcc version 4.2.1 20070831 patched [FreeBSD]), with the exception of PostgreSQL. I created new postgres92-{server,client} ports with a snapshot of PostgreSQL 9.2dev from 16.01.2012, as a lot of scalability work was done in PostgreSQL 9.2. MySQL version 5.5.20 sysbench version 0.4.12 PostgreSQL/pgbench version 9.2dev PBZIP2 version v1.1.6 The machine these test were run on is a 2x4 core Xeon L5310 @ 1.60GHz with 4GB RAM. Here is the complete topology: kern.sched.topology_spec: 0, 1, 2, 3, 4, 5, 6, 7 0, 1, 2, 3 4, 5, 6, 7 The database benchmarks were all run with a work set that fit into the configured database memory, so after the warmup phase no disk io was involved. sysbench was run with 1 million rows, innodb was the engine we used as Kris work already showed that it scales much better than myisam (also innodb is the default in MySQL's 5.5 branch). Pgbench was run using a scaling factor of 100. The connection to the databases was using a unix socket, also only read only tests were run. The input and output files for the pbzip2 test were on tmpfs. The results are available in this Google docs spreadsheet, if you scroll down there are also some nice graphs. https://docs.google.com/spreadsheet/ccc?key=3D0Ai0N1xDe3uNAdDRxcVFiYjNMSn= JWOTZhUWVWWlBlemc Over time i will add more benchmarks to the doc (i.e nginx/php-fpm and so on). I tried to run some nginx benchmarks, but those are limited by netisr, as i did not find a web server benchmark tool which can use unix sockets, any suggestions welcome. The conclusion right now seems to be that ULE is faster for database workload, but for strongly CPU-bound workloads 4BSD can be a better choice. I can provide KTR traces and/or schedgraph output for cases where 4BSD is better than ULE. I want to thank Sean Bruno and Yahoo for setting up / providing the machines to run these test on, and Attilio for suggestions and his general helpfulness. Florian --------------enig68C92A85B2E237E1C5E2AFBB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAk8keXYACgkQapo8P8lCvwkTIACgg1+ajRlZiWwfc5CVdEDIakk6 BfEAoInUvD5/UI1RWQ2Lg9OYsZLma4O6 =dhNX -----END PGP SIGNATURE----- --------------enig68C92A85B2E237E1C5E2AFBB--