Why is MySQL nearly twice as fast on Linux?

Daniel Eischen eischen at vigrid.com
Sat May 22 21:03:47 PDT 2004


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?

-- 
Dan Eischen



More information about the freebsd-threads mailing list