From owner-freebsd-performance@FreeBSD.ORG Mon Jul 3 03:53:31 2006 Return-Path: X-Original-To: freebsd-performance@freebsd.org 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 50D3716A492 for ; Mon, 3 Jul 2006 03:53:31 +0000 (UTC) (envelope-from hugo@barafranca.com) Received: from mail.barafranca.com (mail.barafranca.com [67.19.101.164]) by mx1.FreeBSD.org (Postfix) with ESMTP id C183643E45 for ; Mon, 3 Jul 2006 03:53:21 +0000 (GMT) (envelope-from hugo@barafranca.com) Received: from localhost (localhost [127.0.0.1]) by mail.barafranca.com (Postfix) with ESMTP id 20B61C3822 for ; Mon, 3 Jul 2006 04:08:05 +0000 (UTC) Received: from mail.barafranca.com ([67.19.101.164]) by localhost (mail.barafranca.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 30734-08 for ; Mon, 3 Jul 2006 04:08:03 +0000 (UTC) Received: from [192.168.0.1] (unknown [81.84.174.99]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.barafranca.com (Postfix) with ESMTP id 334C6C3828 for ; Mon, 3 Jul 2006 04:08:03 +0000 (UTC) Message-ID: <44A894B0.3010506@barafranca.com> Date: Mon, 03 Jul 2006 04:53:20 +0100 From: Hugo Silva User-Agent: Thunderbird 1.5.0.2 (X11/20060516) MIME-Version: 1.0 To: freebsd-performance@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at barafranca.com X-Mailman-Approved-At: Mon, 03 Jul 2006 05:02:45 +0000 Subject: MySQL 5.0.22 , FreeBSD 6.1-STABLE: Benchmark 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: Mon, 03 Jul 2006 03:53:31 -0000 Today I decided to benchmark MySQL 5 performance on FreeBSD 6.1-STABLE. This server is a Dual Xeon 2.8GHz, 4GB of RAM and 2x73GB SCSI disks that do 320MB/s For all the tests, I restarted mysqld prior to starting the test, waited for about 1 minute for it to settle down, and ran super smack. For the consecutive runs, I executed super-smack right after the previous run ended. Switching from HTT to no HTT was achieved by machdep.hyperthreading_allowed, and switching from/to libpthread/libthr was done via libmap.conf. System: FreeBSD ?? 6.1-STABLE FreeBSD 6.1-STABLE #3: Mon Jul 3 03:10:35 UTC 2006 ??@??:/usr/obj/usr/src/sys/DATABASE i386 Here are the results: MySQL 5.0.22, built with BUILD_OPTIMIZED=yes and WITH_PROC_SCOPE_PTH=yes === 4BSD + libthr + HTT on === Run #1 connect: max=4ms min=1ms avg= 3ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 200000 0 0 20405.86 Run #2 connect: max=3ms min=1ms avg= 2ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 200000 0 0 20253.53 Run #3 connect: max=4ms min=2ms avg= 2ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 200000 0 0 20270.33 === 4BSD + libthr + HTT off === Run #1 connect: max=5ms min=2ms avg= 3ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 200000 0 0 18253.60 Run #2 connect: max=6ms min=1ms avg= 3ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 200000 0 0 18350.27 Run #3 connect: max=4ms min=1ms avg= 2ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 200000 0 0 18529.71 === 4BSD + libpthread + HTT on === Run #1: connect: max=17ms min=2ms avg= 7ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 200000 5 0 3935.94 Run #2: connect: max=18ms min=1ms avg= 8ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 200000 2 0 3919.89 Run #3: connect: max=22ms min=1ms avg= 13ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 200000 2 0 3911.66 === 4BSD + libpthread + HTT off === connect: max=12ms min=1ms avg= 5ms from 10 clients Run #1: Query_type num_queries max_time min_time q_per_s select_index 200000 0 0 11193.40 Run #2: connect: max=6ms min=4ms avg= 5ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 200000 0 0 11428.30 Run #3: connect: max=7ms min=4ms avg= 5ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 200000 1 0 13714.02 === ULE + libthr + HTT on === Run #1: connect: max=2ms min=0ms avg= 0ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 200000 1 0 16179.09 Run #2: connect: max=14ms min=0ms avg= 7ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 200000 0 0 17451.31 Run #3: connect: max=5ms min=1ms avg= 3ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 200000 1 0 15787.02 === ULE + libthr + HTT off === Run #1: connect: max=6ms min=6ms avg= 6ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 200000 0 0 11588.19 Run #2: connect: max=220ms min=2ms avg= 46ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 200000 0 0 10651.16 Run #3: connect: max=10ms min=0ms avg= 5ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 200000 0 0 10158.63 === ULE + libpthread + HTT on === Run #1: connect: max=9ms min=1ms avg= 7ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 200000 2 0 5869.52 Run #2: Query_type num_queries max_time min_time q_per_s select_index 200000 2 0 5839.95 Run #3: Query_type num_queries max_time min_time q_per_s select_index 200000 2 0 5680.97 === ULE + libpthread + HTT off === Run #1: connect: max=10ms min=1ms avg= 8ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 200000 0 0 6111.21 Run #2: connect: max=1597ms min=1ms avg= 177ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 200000 0 0 7225.26 Run #3: connect: max=9ms min=1ms avg= 4ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 200000 1 0 8187.13 Conclusions: 4BSD performed much better than ULE. libthr performs a lot better than libpthread. I'd risk saying libpthread has issues! Hyperthreading is sometimes benefitial. On the winning combination (4BSD+libthr), it is benefitial. On some other combinations (4BSD+libpthread), it seems to greatly impair performance.