From owner-freebsd-performance@FreeBSD.ORG Sat Feb 19 13:17:37 2005 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F38BC16A4CE for ; Sat, 19 Feb 2005 13:17:36 +0000 (GMT) Received: from cyrus.watson.org (cyrus.watson.org [204.156.12.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id B046C43D46 for ; Sat, 19 Feb 2005 13:17:36 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by cyrus.watson.org (Postfix) with SMTP id 55FD146B8A for ; Sat, 19 Feb 2005 08:17:36 -0500 (EST) Date: Sat, 19 Feb 2005 13:16:06 +0000 (GMT) From: Robert Watson X-Sender: robert@fledge.watson.org To: performance@FreeBSD.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: libpthread vs libthread, simply mysql benchmark X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Feb 2005 13:17:37 -0000 In case it's of interest -- I occasionally run MySQL "supersmack" benchmarks at work on a dual Xeon box there. I ran the select benchmark on the box a few minutes ago, comparing libpthread and David Xu's new libthread on the box, and the results are pleasing: x 6-SMP-HTT-libpthread + 6-SMP-HTT-libthread +--------------------------------------------------------------------------+ | x + | | x ++ | | xxx +++ | |xxxxx +++ +| | |MA| |A| | +--------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 10 8300.25 8442.54 8379.03 8381.652 39.682672 + 10 10510.35 10646.98 10547.59 10551.599 39.893907 Difference at 95.0% confidence 2169.95 +/- 37.385 25.8893% +/- 0.446034% (Student's t, pooled s = 39.7884) In other words, a clear (and healthy) 26% performance improvement on this simple benchmark. I don't currently have other numbers to compare against, such as linuxthreads, etc. This is a 2.4GHz box with 1gb of memory running MySQL 4.0.23a. Typically, I get better performance without hyper-threading turned on, but I can't get into the BIOS of the box remotely so couldn't turn it off properly. I used the latest 6.x SMP kernel combined with the libthread drop from David's perforce branch. You can find a URL to his more recent code drops in the recent threads on freebsd-threads. FYI, here's a brief history of HTT performance over the past year as 5.x and 6.x matured: Version Transactions/sec 20040515-UP-4BSD 4862 20040515-SMP-4BSD 4620 20040515-SMP-ADMTX-4BSD 4846 20040615-UP-4BSD 4899 20040616-SMP-4BSD 4941 20040616-SMP-ADMTX-4BSD 4979 20040616-netperf-UP-giant-4BSD 4907 20040616-netperf-UP-mpsafe-4BSD 4939 20040616-netperf-SMP-giant-4BSD 4587 20040616-netperf-SMP-mpsafe-4BSD 4609 20040616-netperf-SMP-ADMTX-giant-4BSD 4662 20040616-netperf-SMP-ADMTX-mpsafe-4BSD 6425 20040713-netperf-SMP-ADMTX-mpsafe-4BSD 7063 20040717-netperf-SMP-ADMTX-mpsafe-4BSD 7118 As of today, I get about 8400tps with HTT turned on, probably a bit betterwith it turned off. By combining various factors we've introduced in the last couple of years, such as MPSAFE network stack, scheduling improvements, threading improvements, mutex changes, etc, we've improved performance on mysql by over 100% on SMP, going from quite sub-par performance in the depths of 5.x development (when all the infrastructure changes were going in but no optimizations) to quite healthy in 6.x, especially with the new threading library. Robert N M Watson