Why is MySQL nearly twice as fast on Linux/AMD64 Vs. FreeBSD/AMD64?

JG amd64list at jpgsworld.com
Wed May 19 16:51:49 PDT 2004


>
>
>Actually, the patch was the other way around.  mysqld was running into
>limits of system scope threads, so the port has patches to turn it into
>process scope.  It might be worth deleting the file from the port and
>rebuilding, just to see what happens.



More benchmarks:


-----------------------------------------------------------------------------
FreeBSD 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Tue May 18 07:17:39 PDT 2004
(-CURRENT above has ULE + KSE patch applied)
With SCHED_ULE & debugging turned off in kernel.

MySQL Ver 4.0.20 for portbld-freebsd5.2 on amd64 (FreeBSD port: 
mysql-server-4.0.20)
   with mysql40-server.diffs patch applied

Port options:

BUILD_OPTIMIZED=yes
BUILD_STATIC=yes

Compiled with libpthreads



BENCHMARK RESULTS:

Generating 500000 records...
Creation of 500000 records took 174 seconds.
Average of 2873.5632183908 records per second.
Creating records for 10 seconds...
Created 31407 records in 10 seconds.
Average of 3140.7 records per second.
Creating random 50000 md5 hash records.
Creation of 50000 random md5 hash inserts took 20 seconds.
Average of 2500 records per second.
Creating random md5 hash records for 10 seconds...
Created 25780 random records in 10 seconds.
Average of 2578 records per second.

Your databases overall average score is 2773.0658045977 records per second.

-------

VMstat while running the first 20 seconds or so of the above benchmark
(the entire benchmark takes ~4-5 mins to complete)

$ vmstat -w 1
  procs      memory      page                    disks     faults      cpu
  r b w     avm    fre  flt  re  pi  po  fr  sr ad0 am0   in   sy  cs us sy id
  1 0 0   79952 1471012 2305   0   0   0 2015   0   0   0 2439 2132 3228 
10  3 87
  0 0 0   79952 1471012    9   0   0   0   0   0   0   0 2209  134 
2166  0  0 100
  0 0 0   79952 1471012    0   0   0   0   0   0   0   0 2200  116 
2145  0  0 100
  0 0 0   79952 1471012    0   0   0   0   0   0   0   0 2202  128 
2157  0  0 100
  0 0 0   79952 1471012    0   0   0   0   0   0   0   0 2200  116 
2146  0  2 98
  0 0 0   79952 1471012    0   0   0   0   0   0   0   0 2197  119 
2145  0  0 99
  0 0 0   79952 1471012    0   0   0   0   0   0   3   0 2206  123 
2165  0  0 100
  0 0 0   79952 1471012    0   0   0   0   0   0   0   0 2196  133 
2145  0  2 98
  0 0 0   79952 1471012    0   0   0   0   0   0   0   0 2198  124 
2149  0  0 100
  0 0 1   80080 1470696    6   0   0   0   4   0   0   0 11144 41239 
28287  4 26 70
  0 0 1   80080 1470376    0   0   0   0   0   0   0   0 16249 63630 
43136  7 38 55
  0 0 1   80080 1470056    0   0   0   0   0   0   0   0 15987 63224 
42348  9 40 51
  0 0 1   80080 1469720    0   0   0   0   0   0   0   0 16009 63758 
42743  7 39 54
  1 0 0   80080 1469400    0   0   0   0   0   0   0   0 15924 63779 
42576  6 43 51
  0 0 1   80080 1469064    0   0   0   0   0   0   0   0 16229 63525 43043 
10 34 56
  0 0 1   80080 1468744    0   0   0   0   0   0   0   0 15939 63532 42429 
10 39 52
  0 0 1   80080 1468408    0   0   0   0   0   0   0   0 16219 63701 
43133  7 39 54
  0 0 1   80080 1468088    0   0   0   0   0   0   0   0 15929 63655 42514 
10 37 53
  0 0 1   80080 1467752    0   0   0   0   0   0   0   0 16267 63411 
43040  8 38 55
  0 0 1   80080 1467448    0   0   0   0   0   0   0   0 15897 61412 
41747  7 41 53
  0 0 1   80080 1467112    0   0   0   0   0   0   0   0 16293 63671 
43329  7 40 53
  0 0 1   80080 1466792    0   0   0   0   0   0   0   0 16091 63579 
42755  6 38 55
  0 0 1   80080 1466472    0   0   0   0   0   0   0   0 16140 62336 
42551  6 42 52
  0 0 1   80080 1466136    0   0   0   0   0   0   0   0 15933 63654 
42569  9 35 56
  0 0 1   80080 1465816    0   0   0   0   0   0   0   0 15932 63689 
42610  6 41 53
  0 0 1   80080 1465496    0   0   0   0   0   0   0   0 16214 63570 
43037  9 39 52
  0 0 1   80080 1465160    0   0   0   0   0   0   0   0 15927 63784 
42542  9 40 51
  0 0 1   80080 1464840    0   0   0   0   0   0   0   0 15930 63751 
42577  7 40 53
  0 0 1   80080 1464504    0   0   0   0   0   0   0   0 15925 63669 
42552  7 38 55
  0 0 1   80080 1464184    0   0   0   0   0   0   1   0 15713 62515 
41810  7 39 54
  2 0 0   80080 1463864  339   0   0   0 231   0   0   0 15933 63646 
43080  8 39 53
  0 0 1   80080 1463528    0   0   0   0   0   0   0   0 16252 63792 
43174  9 36 55
  0 0 1   80080 1463208    0   0   0   0   0   0   0   0 16072 61651 
42040  7 38 55
  0 0 1   80080 1462888    0   0   0   0   0   0   3   0 15950 63525 
42471  9 41 50
  0 0 1   80080 1462568    0   0   0   0   0   0   0   0 16180 63925 
43120  8 40 52
  0 0 1   80080 1462232    0   0   0   0   0   0   4   0 15932 63626 
42567  6 40 54
  0 0 1   80080 1461912    0   0   0   0   8   0   4   0 15953 63424 
42389  9 38 53
  0 0 1   80080 1461576    0   0   0   0   0   0   0   0 15925 63610 
42420  8 39 53
  0 0 1   80080 1461256    0   0   0   0   0   0   0   0 15949 63724 
42611  8 36 55
  0 0 1   80080 1460936    0   0   0   0   4   0   0   0 15860 63235 42289 
10 35 55
  0 0 1   80080 1460600    0   0   0   0   0   0   0   0 15957 63481 
42465  8 43 49
  0 0 1   80080 1460280    0   0   0   0   0   0   0   0 15933 63744 
42539  7 40 53
  0 0 1   80080 1459944    0   0   0   0   0   0   0   0 15947 63791 
42621  5 40 54
  0 0 1   80080 1459624    0   0   0   0   0   0   0   0 16079 63462 
42704  6 39 55
  0 0 1   80080 1459304    0   0   0   0   0   0   0   0 16141 61707 
42287  9 38 53
  0 0 1   80080 1458968    0   0   0   0   0   0   0   0 15932 63744 
42606  8 37 55
  0 0 1   80080 1458648    0   0   0   0   0   0   0   0 15955 63724 42569 
10 35 55



VS.

-----------------------------------------------------------------------------
LINUX MANDRAKE 10.0 RC1 w/"OUT OF THE BOX" MySQL installation
MySQLd Ver 4.0.18 for mandrake-linux-gnu on x86_64 (Source distribution)
Linux amd64m 2.6.3-9mdksmp #1 SMP Mon Apr 19 10:48:13 CEST 2004 x86_64 
unknown unknown GNU/Linux

Benchmark result summary:

Generating 500000 records...
Creation of 500000 records took 89 seconds.
Average of 5617.9775280899 records per second.
Creating records for 10 seconds...
Created 50547 records in 10 seconds.
Average of 5054.7 records per second.
Creating random 50000 md5 hash records.
Creation of 50000 random md5 hash inserts took 9 seconds.
Average of 5555.5555555556 records per second.
Creating random md5 hash records for 10 seconds...
Created 50864 random records in 10 seconds.
Average of 5086.4 records per second.

Your databases overall average score is 5328.6582709114 records per second
-----------------------------------------------------------------------------




Is SMP _really_ working for FreeBSD/AMD64?

Nothing I do seems to improve the FreeBSD benchmarks here.




More information about the freebsd-amd64 mailing list