Benchmarking Linux Distributions

Jackbox

Active Member
Jan 2, 2016
197
96
74
I have a Debian server from VPSDime, here are the specs:
Specs: lsb_release -a; uname -mrs; free -m
Code:
root@remote:~# lsb_release -a; uname -mrs; free -m
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 8.8 (jessie)
Release:        8.8
Codename:       jessie
Linux 2.6.32-042stab120.16 x86_64
             total       used       free     shared    buffers     cached
Mem:          6144        347       5796         10          0        271
-/+ buffers/cache:         76       6067
Swap:            0          0          0

To begin benchmarking we will use
apt-get install sysbench

Now we will begin testing!

CPU: sysbench --test=cpu --cpu-max-prime=20000 run
IO: sysbench --test=fileio --file-total-size=5G prepare;sysbench --test=fileio --file-total-size=5G --file-test-mode=rndrw --init-rng=on --max-time=300 --max-requests=0 run;sysbench --test=fileio --file-total-size=5G cleanup
MySQL: sysbench --test=oltp --oltp-table-size=1000000 --mysql-db=test --mysql-user=root --mysql-password=yourrootsqlpassword prepare;sysbench --test=oltp --oltp-table-size=1000000 --mysql-db=test --mysql-user=root --mysql-password=yourrootsqlpassword --max-time=60 --oltp-read-only=on --max-requests=0 --num-threads=8 run;sysbench --test=oltp --mysql-db=test --mysql-user=root --mysql-password=yourrootsqlpassword cleanup
For the MySQL test you must authenticate into your MySQL server and create database test.

Code:
FILE IO
Operations performed:  1480920 Read, 987280 Write, 3159184 Other = 5627384 Total
Read 22.597Gb  Written 15.065Gb  Total transferred 37.662Gb  (128.5Mb/sec)
 8223.97 Requests/sec executed

Test execution summary:
    total time:                          300.1227s
    total number of events:              2468200
    total time taken by event execution: 22.3874
    per-request statistics:
         min:                                  0.00ms
         avg:                                  0.01ms
         max:                                275.92ms
         approx.  95 percentile:               0.01ms

Threads fairness:
    events (avg/stddev):           2468200.0000/0.00
    execution time (avg/stddev):   22.3874/0.00

Code:
CPU
Maximum prime number checked in CPU test: 20000


Test execution summary:
    total time:                          34.1879s
    total number of events:              10000
    total time taken by event execution: 34.1848
    per-request statistics:
         min:                                  3.36ms
         avg:                                  3.42ms
         max:                                  5.01ms
         approx.  95 percentile:               3.48ms

Threads fairness:
    events (avg/stddev):           10000.0000/0.00
    execution time (avg/stddev):   34.1848/0.00

Code:
MYSQL
OLTP test statistics:
    queries performed:
        read:                            1125082
        write:                           0
        other:                           160726
        total:                           1285808
    transactions:                        80363  (1339.28 per sec.)
    deadlocks:                           0      (0.00 per sec.)
    read/write requests:                 1125082 (18749.95 per sec.)
    other operations:                    160726 (2678.56 per sec.)

Test execution summary:
    total time:                          60.0045s
    total number of events:              80363
    total time taken by event execution: 479.6228
    per-request statistics:
         min:                                  1.22ms
         avg:                                  5.97ms
         max:                                 32.26ms
         approx.  95 percentile:               7.92ms

Threads fairness:
    events (avg/stddev):           10045.3750/27.28
    execution time (avg/stddev):   59.9528/0.00
 
Last edited:

Jackbox

Active Member
Jan 2, 2016
197
96
74
Now for benchmarking on CentOS!
Code:
yum install sysbench
CPU: sysbench --test=cpu --cpu-max-prime=20000 run
IO: sysbench --test=fileio --file-total-size=5G prepare;sysbench --test=fileio --file-total-size=5G --file-test-mode=rndrw --init-rng=on --max-time=300 --max-requests=0 run;sysbench --test=fileio --file-total-size=5G cleanup
MySQL: sysbench --test=oltp --oltp-table-size=1000000 --mysql-db=test --mysql-user=root --mysql-password=yourrootsqlpassword prepare;sysbench --test=oltp --oltp-table-size=1000000 --mysql-db=test --mysql-user=root --mysql-password=yourrootsqlpassword --max-time=60 --oltp-read-only=on --max-requests=0 --num-threads=8 run;sysbench --test=oltp --mysql-db=test --mysql-user=root --mysql-password=yourrootsqlpassword cleanup

Code:
CPU
General statistics:
    total time:                          10.0016s
    total number of events:              2783

Latency (ms):
         min:                                  3.52
         avg:                                  3.59
         max:                                  4.93
         95th percentile:                      3.96
         sum:                               9996.50

Threads fairness:
    events (avg/stddev):           2783.0000/0.00
    execution time (avg/stddev):   9.9965/0.00

Code:
FILE IO
5368709120 bytes written in 30.13 seconds (169.93 MiB/sec).

If you want to test MySQL on CentOS make sure to install a compatible database.
Download and add the repository, then update

wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm;sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm;yum update

Install and start
sudo yum install mysql-server;sudo systemctl start mysqld

Optionally harden your MySQL installation with
:
sudo mysql_secure_installation

Set your root user password:
MySQL 5.7.6 and later: ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';
MySQL 5.7.5 and earlier: SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass');

When you go to run the MySQL test on CentOS you are going to probably run into the issue of the oltp test missing. To find this you must:
cd /usr;find . -name 'oltp*'*

Mine was found in /share/sysbench/tests/include/oltp_legacy/oltp.lua

You will need to fill your /tests/ oltp.lua in the following:
sysbench --test=/usr/share/sysbench/tests/include/oltp_legacy/oltp.lua --db-driver=mysql --oltp-table-size=10000000 --mysql-db=test --mysql-user=root --mysql-password=okay prepare;sysbench --test=/usr/share/sysbench/tests/include/oltp_legacy/oltp.lua --oltp-table-size=1000000 --mysql-db=test --mysql-user=root --mysql-password=okay --max-time=60 --oltp-read-only=on --max-requests=0 --db-driver=mysql --num-threads=8 run;sysbench --test=/usr/share/sysbench/tests/include/oltp_legacy/oltp.lua --mysql-db=test --mysql-user=root --db-driver=mysql --mysql-password=okay cleanup

Simply replace okay with your password.
 
Last edited:

Asphyxia

Owner
Administrator
Apr 25, 2015
1,845
2
2,199
327
Specs: lsb_release -a; uname -mrs; free -m
Code:
Distributor ID: Ubuntu
Description:    Ubuntu 16.04 LTS
Release:        16.04
Codename:       xenial
Linux 2.6.32-042stab120.16 x86_64
              total        used        free      shared  buff/cache   available
Mem:           6144          26        6084          10          32        6019
Swap:             0           0           0

apt-get install sysbench

CPU: sysbench --test=cpu --cpu-max-prime=20000 run
Code:
Maximum prime number checked in CPU test: 20000


Test execution summary:
    total time:                          34.7389s
    total number of events:              10000
    total time taken by event execution: 34.7349
    per-request statistics:
         min:                                  3.41ms
         avg:                                  3.47ms
         max:                                  4.83ms
         approx.  95 percentile:               3.82ms

Threads fairness:
    events (avg/stddev):           10000.0000/0.00
    execution time (avg/stddev):   34.7349/0.00

IO: sysbench --test=fileio --file-total-size=5G prepare;sysbench --test=fileio --file-total-size=5G --file-test-mode=rndrw --init-rng=on --max-time=300 --max-requests=0 run;sysbench --test=fileio --file-total-size=5G cleanup
Code:
Operations performed:  1452480 Read, 968320 Write, 3098524 Other = 5519324 Total
Read 22.163Gb  Written 14.775Gb  Total transferred 36.938Gb  (126.08Mb/sec)
 8069.24 Requests/sec executed

Test execution summary:
    total time:                          300.0036s
    total number of events:              2420800
    total time taken by event execution: 28.5136
    per-request statistics:
         min:                                  0.00ms
         avg:                                  0.01ms
         max:                                240.49ms
         approx.  95 percentile:               0.01ms

Threads fairness:
    events (avg/stddev):           2420800.0000/0.00
    execution time (avg/stddev):   28.5136/0.00

MySQL: sysbench --test=oltp --oltp-table-size=1000000 --mysql-db=test --mysql-user=root --mysql-password=yourrootsqlpassword prepare;sysbench --test=oltp --oltp-table-size=1000000 --mysql-db=test --mysql-user=root --mysql-password=yourrootsqlpassword --max-time=60 --oltp-read-only=on --max-requests=0 --num-threads=8 run;sysbench --test=oltp --mysql-db=test --mysql-user=root --mysql-password=yourrootsqlpassword cleanup
Code:
OLTP test statistics:
    queries performed:
        read:                            2480982
        write:                           0
        other:                           354426
        total:                           2835408
    transactions:                        177213 (2953.48 per sec.)
    deadlocks:                           0      (0.00 per sec.)
    read/write requests:                 2480982 (41348.75 per sec.)
    other operations:                    354426 (5906.96 per sec.)

Test execution summary:
    total time:                          60.0014s
    total number of events:              177213
    total time taken by event execution: 479.2368
    per-request statistics:
         min:                                  1.20ms
         avg:                                  2.70ms
         max:                                 43.09ms
         approx.  95 percentile:               4.20ms

Threads fairness:
    events (avg/stddev):           22151.6250/664.12
    execution time (avg/stddev):   59.9046/0.01
 

Jackbox

Active Member
Jan 2, 2016
197
96
74
It would certainly be cool to generate beautiful graphs from this information. Does anyone have a simple way to get beautiful benchmark graphs from a Linux system? It would be cool for all of us to be able to post our benchmark graphs! ;)

See who has a bigger.... y'know. Benchmark result, haha.
 
Top