-
-
Save lox/945244 to your computer and use it in GitHub Desktop.
sudo aptitude install sysbench | |
echo "create database sbtest; grant all on sbtest.* to 'sbtest'@'localhost';" | mysql | |
sysbench --test=oltp --num-threads=10 prepare | |
sysbench --test=oltp --num-threads=10 run | |
Run on a Hetzner EX10 instance (http://www.hetzner.de/en/hosting/produkte_rootserver/ex10):
OLTP test statistics:
queries performed:
read: 140042
write: 50006
other: 20003
total: 210051
transactions: 10000 (3137.49 per sec.)
deadlocks: 3 (0.94 per sec.)
read/write requests: 190048 (59627.29 per sec.)
other operations: 20003 (6275.91 per sec.)
Test execution summary:
total time: 3.1873s
total number of events: 10000
total time taken by event execution: 31.7818
per-request statistics:
min: 2.06ms
avg: 3.18ms
max: 26.42ms
approx. 95 percentile: 3.62ms
Run on an EC2 xlarge High CPU with ephemeral storage:
OLTP test statistics:
queries performed:
read: 140070
write: 50013
other: 20005
total: 210088
transactions: 10000 (2026.47 per sec.)
deadlocks: 5 (1.01 per sec.)
read/write requests: 190083 (38519.79 per sec.)
other operations: 20005 (4053.96 per sec.)
Test execution summary:
total time: 4.9347s
total number of events: 10000
total time taken by event execution: 49.2488
per-request statistics:
min: 2.95ms
avg: 4.92ms
max: 68.14ms
approx. 95 percentile: 7.36ms
Run on my local dev vm
OLTP test statistics:
queries performed:
read: 140000
write: 50000
other: 20000
total: 210000
transactions: 10000 (1141.60 per sec.)
deadlocks: 0 (0.00 per sec.)
read/write requests: 190000 (21690.40 per sec.)
other operations: 20000 (2283.20 per sec.)
Test execution summary:
total time: 8.7596s
total number of events: 10000
total time taken by event execution: 87.5128
per-request statistics:
min: 2.17ms
avg: 8.75ms
max: 65.14ms
approx. 95 percentile: 17.00ms
Threads fairness:
events (avg/stddev): 1000.0000/22.44
execution time (avg/stddev): 8.7513/0.00
Run on my Vagrant/virtualbox dev vm
OLTP test statistics:
queries performed:
read: 140000
write: 50000
other: 20000
total: 210000
transactions: 10000 (648.24 per sec.)
deadlocks: 0 (0.00 per sec.)
read/write requests: 190000 (12316.62 per sec.)
other operations: 20000 (1296.49 per sec.)
Test execution summary:
total time: 15.4263s
total number of events: 10000
total time taken by event execution: 154.1230
per-request statistics:
min: 2.40ms
avg: 15.41ms
max: 94.57ms
approx. 95 percentile: 21.32ms
Threads fairness:
events (avg/stddev): 1000.0000/37.03
execution time (avg/stddev): 15.4123/0.00
running on my dev server
OLTP test statistics:
queries performed:
read: 140000
write: 50000
other: 20000
total: 210000
transactions: 10000 (381.89 per sec.)
deadlocks: 0 (0.00 per sec.)
read/write requests: 190000 (7255.96 per sec.)
other operations: 20000 (763.79 per sec.)
Test execution summary:
total time: 26.1854s
total number of events: 10000
total time taken by event execution: 261.6367
per-request statistics:
min: 2.88ms
avg: 26.16ms
max: 58.43ms
approx. 95 percentile: 26.76ms
Threads fairness:
events (avg/stddev): 1000.0000/0.77
execution time (avg/stddev): 26.1637/0.01
I have a question about those statistics , what are the minimum and what are the measures that I need to do for a better performance ?
Thank you
jbenham@jbenham:~$ sysbench --test=oltp --num-threads=10 run
sysbench 0.4.10: multi-threaded system evaluation benchmark
No DB drivers specified, using mysql
WARNING: Preparing of "BEGIN" is unsupported, using emulation
(last message repeated 9 times)
Running the test with following options:
Number of threads: 10
Doing OLTP test.
Running mixed OLTP test
Using Special distribution (12 iterations, 1 pct of values are returned in 75 pct cases)
Using "BEGIN" for starting transactions
Using auto_inc on the id column
Maximum number of requests for OLTP test is limited to 10000
Threads started!
Done.
OLTP test statistics:
queries performed:
read: 140014
write: 50003
other: 20001
total: 210018
transactions: 10000 (1226.18 per sec.)
deadlocks: 1 (0.12 per sec.)
read/write requests: 190017 (23299.48 per sec.)
other operations: 20001 (2452.48 per sec.)
Test execution summary:
total time: 8.1554s
total number of events: 10000
total time taken by event execution: 81.4555
per-request statistics:
min: 2.38ms
avg: 8.15ms
max: 33.99ms
approx. 95 percentile: 13.18ms
Threads fairness:
events (avg/stddev): 1000.0000/17.64
execution time (avg/stddev): 8.1456/0.00