From owner-freebsd-threads@FreeBSD.ORG Sat May 22 22:39:32 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 70C1216A4CE for ; Sat, 22 May 2004 22:39:32 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 51B4743D46; Sat, 22 May 2004 22:39:32 -0700 (PDT) (envelope-from davidxu@freebsd.org) Received: from freebsd.org (davidxu@localhost [127.0.0.1]) i4N5dRHW017863; Sat, 22 May 2004 22:39:28 -0700 (PDT) (envelope-from davidxu@freebsd.org) Message-ID: <40B038B4.4030207@freebsd.org> Date: Sun, 23 May 2004 13:37:56 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040522 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Eischen References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-threads@freebsd.org Subject: Re: Why is MySQL nearly twice as fast on Linux? X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 May 2004 05:39:32 -0000 Daniel Eischen wrote: >On Sat, 22 May 2004, JG wrote: > > >>>Do you have any suggestions or ideas as to what the problem is? >>> >>> > >[...] > > > >>(Compiled with libpthread) >> >>Also w/ http://people.freebsd.org/~deischen/mysql40-server.diffs patch. >>------------------------------------------------------------------------- >> >>BENCHMARK RESULTS: >> >>Local test: >> >>- Using AMD64-4BSD SMP kernel w/SCHED_4BSD >>- Using default mysql config (no config file) >> >>amd64f# super-smack update-select.smack 30 10000 >>Query Barrel Report for client smacker >>connect: max=25ms min=4ms avg= 15ms from 30 clients >>Query_type num_queries max_time min_time q_per_s >>select_index 300000 11 0 2819.41 >>update_index 300000 7 0 2819.41 >> >> >>- Using AMD64-4BSD-NOSMP SINGLE CPU kernel w/SCHED_4BSD >>- Using default mysql config (no config file) >> >>amd64f# super-smack update-select.smack 30 10000 >>Query Barrel Report for client smacker >>connect: max=21ms min=9ms avg= 16ms from 30 clients >>Query_type num_queries max_time min_time q_per_s >>select_index 300000 5 0 3015.96 >>update_index 300000 23 5 3015.96 >> >> > >Along with the other benchmarks it's still a little apples >and oranges. I've seen different versions of mysql run >with different versions of FreeBSD. I'd like to see the >same mysql version run on the same hardware with libpthread >and linuxthreads. What I've seen so far is close WRT >OS and mysql versions, but still not the same: > > mysql-4.1.1-alpha on FreeBSD 5.2-RELEASE with linuxthreads, > SCHED4_BSD, amd32 > ---------------------------------------------------------- > Local: > > - Using default mysql config settings (empty/missing my.cnf) > - Using SCHED_4BSD kernel > > amd32f# super-smack update-select.smack 30 10000 > Query Barrel Report for client smacker > connect: max=19ms min=12ms avg= 14ms from 30 clients > Query_type num_queries max_time min_time q_per_s > select_index 300000 9 0 2589.28 > update_index 300000 7 0 2589.28 > > > mysql-4.0.20 (with process-scope patch) on FreeBSD 5.2-current > with libpthread, SCHED4_BSD, amd64 > -------------------------------------------------------------- > 2819.41 (SMP), 3015.96 (UP), see quoted email above > >This shows that -current (both SMP and UP) with libpthread is >faster than linuxthreads (different versions of FreeBSD and >mysql, though). > >Also, if you use the default mysql config settings, then >FreeBSD remote vs Linuxthreads remote also wins (2685.53 >vs. 2091.10 from earlier post). > >What modifications are you making to /etc/my.cnf and why >do they turn the results around the other way? > > > I have done a test. The machine is Athlon XP 3000+ with KT600 chipsets. MySQL with libpthread using scope process thread has best peformance, it gets 3200 q_per_s while scope system only gets 2900 q_per_s. Linuxthreads gets 3100 q_per_s, and this is same with libthr. I don't have /etc/my.cnf installed. David Xu