Date: Sun, 23 May 2004 13:37:56 +0800 From: David Xu <davidxu@freebsd.org> To: Daniel Eischen <eischen@vigrid.com> Cc: freebsd-threads@freebsd.org Subject: Re: Why is MySQL nearly twice as fast on Linux? Message-ID: <40B038B4.4030207@freebsd.org> In-Reply-To: <Pine.GSO.4.10.10405222334440.28212-100000@pcnet5.pcnet.com> References: <Pine.GSO.4.10.10405222334440.28212-100000@pcnet5.pcnet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40B038B4.4030207>
