Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 May 2004 09:56:20 -0700
From:      JG <amd64list@jpgsworld.com>
To:        freebsd-threads@freebsd.org
Subject:   Re: Why is MySQL nearly twice as fast on Linux?
Message-ID:  <5.2.0.9.2.20040523090659.01628af8@mail.ojoink.com>
In-Reply-To: <40B08BD8.4030004@he.iki.fi>
References:  <5.2.0.9.2.20040522135338.0158cc50@mail.ojoink.com> <5.2.0.9.2.20040522100318.01598f50@mail.ojoink.com> <5.2.0.9.2.20040522052606.0156fd70@mail.ojoink.com> <5.2.0.9.2.20040521154458.01627688@127.0.0.1> <5.2.0.9.2.20040521154458.01627688@127.0.0.1> <5.2.0.9.2.20040522052606.0156fd70@mail.ojoink.com> <5.2.0.9.2.20040522100318.01598f50@mail.ojoink.com> <5.2.0.9.2.20040522135338.0158cc50@mail.ojoink.com>

next in thread | previous in thread | raw e-mail | index | archive | help
At 02:32 PM 5/23/2004 +0300, you wrote:
>JG wrote:
>
>>
>>While the benchmarks are running, gstat basically looks like this:
>>
>>amd64f# gstat
>>dT: 0.502  flag_I 500000us  sizeof 288  i -1
>>  L(q)  ops/s    r/s   kBps   ms/r    w/s   kBps   ms/w   %busy Name
>>     0      0      0      0    0.0      0      0    0.0    0.0| ad0
>>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1
>>     0      0      0      0    0.0      0      0    0.0    0.0| acd0
>>     0      0      0      0    0.0      0      0    0.0    0.0| amrd0
>>     0      0      0      0    0.0      0      0    0.0    0.0| amrd1
>>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1a
>>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1b
>>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1c
>>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1d
>>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1e
>>     0      0      0      0    0.0      0      0    0.0    0.0| amrd0s1
>>     0      0      0      0    0.0      0      0    0.0    0.0| amrd1s1
>>
>>With the exception of a few split-second ticks to the amrd1
>>drive (the mysql data drive)
>Which means that either your dataset fits into the memory you have 
>allocated for mysql or your are CPU bound or both.
>How does top -H look when running the test?


This is on a DUAL CPU kernel using SCHED_4BSD:

To make the test run longer to allow the CPU usage to build up and peak I 
ran super-smack with more rounds per client:

amd64f# super-smack update-select.smack 30 1000000

Once it hit ~41% it just stayed there and bounced between 40 and 41 while 
the rest
of the test ran....

last pid:   709;  load 
averages:  2.48,  1.34,  0.59 
     up 0+00:22:40  08:08:21
63 processes:  1 running, 60 sleeping, 2 lock
CPU states: 39.3% user,  0.0% nice, 25.9% system,  0.4% interrupt, 34.4% idle
Mem: 65M Active, 6180K Inact, 59M Wired, 124K Cache, 25M Buf, 1848M Free
Swap: 4096M Total, 4096M Free

   PID USERNAME PRI NICE   SIZE    RES STATE  C   TIME   WCPU    CPU COMMAND
   582 mysql    132    0 63580K 50184K *Giant 1   3:13 41.85% 41.85% mysqld
   582 mysql    126    0 63580K 50184K select 0   3:13 41.16% 41.16% mysqld
   582 mysql    132    0 63580K 50184K *Giant 1   3:13 41.16% 41.16% mysqld
   690 root       4    0  9316K  2108K sbwait 1   0:02  0.59%  0.59% 
super-smack
   696 root       4    0  9316K  2108K sbwait 1   0:02  0.44%  0.44% 
super-smack
   698 root       4    0  9316K  2108K sbwait 0   0:02  0.39%  0.39% 
super-smack
   684 root       4    0  9316K  2108K sbwait 0   0:02  0.29%  0.29% 
super-smack
   697 root       4    0  9316K  2108K sbwait 1   0:02  0.29%  0.29% 
super-smack
   699 root       4    0  9316K  2108K sbwait 1   0:02  0.29%  0.29% 
super-smack
   706 root       4    0  9316K  2108K sbwait 0   0:02  0.24%  0.24% 
super-smack
   692 root       4    0  9316K  2108K sbwait 1   0:02  0.24%  0.24% 
super-smack
   694 root       4    0  9316K  2108K sbwait 1   0:02  0.20%  0.20% 
super-smack
   679 root       4    0  9316K  2108K sbwait 1   0:02  0.20%  0.20% 
super-smack
   705 root       4    0  9316K  2108K sbwait 1   0:02  0.20%  0.20% 
super-smack
   700 root       4    0  9316K  2108K sbwait 1   0:02  0.15%  0.15% 
super-smack
   702 root       4    0  9316K  2108K sbwait 1   0:02  0.10%  0.10% 
super-smack
   688 root       4    0  9316K  2108K sbwait 0   0:02  0.10%  0.10% 
super-smack
   701 root       4    0  9316K  2108K sbwait 1   0:02  0.10%  0.10% 
super-smack
   686 root       4    0  9316K  2108K sbwait 0   0:02  0.10%  0.10% 
super-smack
   680 root       4    0  9316K  2108K sbwait 1   0:02  0.10%  0.10% 
super-smack
   685 root       4    0  9316K  2108K sbwait 0   0:02  0.10%  0.10% 
super-smack
   682 root       4    0  9316K  2108K sbwait 1   0:02  0.05%  0.05% 
super-smack
   703 root       4    0  9316K  2108K sbwait 1   0:02  0.05%  0.05% 
super-smack
   704 root       4    0  9316K  2108K sbwait 0   0:02  0.05%  0.05% 
super-smack
   691 root       4    0  9316K  2108K sbwait 0   0:02  0.05%  0.05% 
super-smack
   681 root       4    0  9316K  2108K sbwait 0   0:02  0.05%  0.05% 
super-smack
   582 mysql     20    0 63580K 50184K ksesig 1   3:13  0.00%  0.00% mysqld
   687 root       4    0  9316K  2108K sbwait 1   0:02  0.00%  0.00% 
super-smack
   693 root       4    0  9316K  2108K sbwait 0   0:02  0.00%  0.00% 
super-smack
   695 root       4    0  9316K  2108K sbwait 1   0:02  0.00%  0.00% 
super-smack
   689 root       4    0  9316K  2108K sbwait 0   0:02  0.00%  0.00% 
super-smack
   683 root       4    0  9316K  2108K sbwait 0   0:02  0.00%  0.00% 
super-smack
   708 root       4    0  9316K  2108K sbwait 0   0:02  0.00%  0.00% 
super-smack
   707 root       4    0  9316K  2108K sbwait 0   0:02  0.00%  0.00% 
super-smack


This is on a SINGLE CPU kernel using SCHED_4BSD:

I also ran:  amd64f# super-smack update-select.smack 30 1000000  to make 
the test last longer.

On a single CPU kernel, it hits ~65 as a peak and backs off to bounce 
between 63% and 65%...

last pid:   738;  load 
averages:  1.30,  0.48,  0.19 
     up 0+00:38:10  08:55:19
62 processes:  2 running, 60 sleeping
CPU states: 67.7% user,  0.0% nice, 31.5% system,  0.8% interrupt,  0.0% idle
Mem: 65M Active, 6760K Inact, 58M Wired, 120K Cache, 25M Buf, 1848M Free
Swap: 4096M Total, 4096M Free

   PID USERNAME PRI NICE   SIZE    RES STATE    TIME   WCPU    CPU COMMAND
   581 mysql    121    0 63512K 50108K select   1:20 64.55% 64.55% mysqld
   581 mysql    122    0 63512K 50108K RUN      1:20 64.55% 64.55% mysqld
   700 root       4    0  9316K  2040K sbwait   0:01  0.34%  0.34% super-smack
   712 root       4    0  9316K  2040K sbwait   0:01  0.29%  0.29% super-smack
   718 root       4    0  9316K  2040K sbwait   0:01  0.29%  0.29% super-smack
   713 root       4    0  9316K  2040K sbwait   0:01  0.29%  0.29% super-smack
   698 root       4    0  9316K  2040K sbwait   0:01  0.24%  0.24% super-smack
   722 root       4    0  9316K  2040K sbwait   0:01  0.20%  0.20% super-smack
   719 root       4    0  9316K  2040K sbwait   0:01  0.20%  0.20% super-smack
   707 root       4    0  9316K  2040K sbwait   0:01  0.20%  0.20% super-smack
   710 root       4    0  9316K  2040K sbwait   0:01  0.20%  0.20% super-smack
   705 root       4    0  9316K  2040K sbwait   0:01  0.15%  0.15% super-smack
   704 root       4    0  9316K  2040K sbwait   0:01  0.15%  0.15% super-smack
   715 root       4    0  9316K  2040K sbwait   0:01  0.15%  0.15% super-smack
   693 root       4    0  9316K  2040K sbwait   0:01  0.10%  0.10% super-smack
   699 root       4    0  9316K  2040K sbwait   0:01  0.10%  0.10% super-smack
   721 root       4    0  9316K  2040K sbwait   0:01  0.10%  0.10% super-smack
   694 root       4    0  9316K  2040K sbwait   0:01  0.10%  0.10% super-smack
   703 root       4    0  9316K  2040K sbwait   0:01  0.10%  0.10% super-smack
   706 root       4    0  9316K  2040K sbwait   0:01  0.10%  0.10% super-smack
   714 root       4    0  9316K  2040K sbwait   0:01  0.10%  0.10% super-smack
   716 root       4    0  9316K  2040K sbwait   0:01  0.10%  0.10% super-smack
   717 root       4    0  9316K  2040K sbwait   0:01  0.10%  0.10% super-smack
   709 root       4    0  9316K  2040K sbwait   0:01  0.05%  0.05% super-smack
   720 root       4    0  9316K  2040K sbwait   0:01  0.05%  0.05% super-smack
   701 root       4    0  9316K  2040K sbwait   0:01  0.05%  0.05% super-smack
   708 root       4    0  9316K  2040K sbwait   0:01  0.05%  0.05% super-smack
   695 root       4    0  9316K  2040K sbwait   0:01  0.05%  0.05% super-smack
   696 root       4    0  9316K  2040K sbwait   0:01  0.05%  0.05% super-smack
   711 root       4    0  9316K  2040K sbwait   0:01  0.05%  0.05% super-smack
   581 mysql     20    0 63512K 50108K ksesig   1:20  0.00%  0.00% mysqld
   702 root       4    0  9316K  2040K sbwait   0:01  0.00%  0.00% super-smack
   697 root       4    0  9316K  2040K sbwait   0:01  0.00%  0.00% super-smack



I am just a layman here, but what does this mean?









Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.2.0.9.2.20040523090659.01628af8>