Skip to content

Instantly share code, notes, and snippets.

@EugenMayer
Last active September 7, 2019 05:25
Show Gist options
  • Save EugenMayer/ae102b41a190590f0f03487462f1f3be to your computer and use it in GitHub Desktop.
Save EugenMayer/ae102b41a190590f0f03487462f1f3be to your computer and use it in GitHub Desktop.
io test
# we no longer use /tmp sinc it is a tmpfs / in memory
mkdir ~/tmp
cd ~/tmp
sysbench --file-fsync-freq=1 --num-threads=16 --test=fileio --file-total-size=1G --file-test-mode=rndrw --file-rw-ratio=2 cleanup > /dev/null
sysbench --file-fsync-freq=1 --num-threads=16 --test=fileio --file-total-size=1G --file-test-mode=rndrw --file-rw-ratio=2 prepare > /dev/null
sysbench --file-fsync-freq=1 --num-threads=16 --test=fileio --file-total-size=1G --file-test-mode=rndrw --file-rw-ratio=2 run
# when you are done testing
rm -fr ~/tmp
@EugenMayer
Copy link
Author

apt-get install sysbench if needed

@JanPretzel
Copy link

JanPretzel commented Jun 9, 2019

File operations:
    reads/s:                      277.34
    writes/s:                     138.67
    fsyncs/s:                     17741.10

Throughput:
    read, MiB/s:                  4.33
    written, MiB/s:               2.17

General statistics:
    total time:                          10.0035s
    total number of events:              181740

Latency (ms):
         min:                                  0.01
         avg:                                  0.88
         max:                                 10.60
         95th percentile:                      2.26
         sum:                             159856.77

Threads fairness:
    events (avg/stddev):           11358.7500/48.69
    execution time (avg/stddev):   9.9910/0.00

@tom-mayer
Copy link

tom-mayer commented Jun 19, 2019

MBP 13, late 2018 (spec'd out):

File operations:
    reads/s:                      16826.86
    writes/s:                     8413.38
    fsyncs/s:                     1077109.79

Throughput:
    read, MiB/s:                  262.92
    written, MiB/s:               131.46

General statistics:
    total time:                          10.0018s
    total number of events:              11025014

Latency (ms):
         min:                                    0.00
         avg:                                    0.01
         max:                                   80.94
         95th percentile:                        0.03
         sum:                               102877.51

Threads fairness:
    events (avg/stddev):           689063.3750/6034.77
    execution time (avg/stddev):   6.4298/0.05

@andul
Copy link

andul commented Jun 19, 2019

File operations:
reads/s: 913.15
writes/s: 456.33
fsyncs/s: 58611.58

Throughput:
read, MiB/s: 14.27
written, MiB/s: 7.13

General statistics:
total time: 10.0131s
total number of events: 598647

Latency (ms):
min: 0.00
avg: 0.14
max: 28.38
95th percentile: 0.19
sum: 81125.41

Threads fairness:
events (avg/stddev): 37415.4375/54.61
execution time (avg/stddev): 5.0703/0.04

@JanPretzel
Copy link

Results on Manjaro KDE

File operations:
    reads/s:                      17742.46
    writes/s:                     8871.23
    fsyncs/s:                     1135711.07

Throughput:
    read, MiB/s:                  277.23
    written, MiB/s:               138.61

General statistics:
    total time:                          10.0009s
    total number of events:              11624695

Latency (ms):
         min:                                    0.00
         avg:                                    0.01
         max:                                    5.10
         95th percentile:                        0.03
         sum:                                84717.56

Threads fairness:
    events (avg/stddev):           726543.4375/1830.40
    execution time (avg/stddev):   5.2948/0.01

@EugenMayer
Copy link
Author

EugenMayer commented Sep 6, 2019

sysbench 1.0.17
Manjaro KDE

File operations:
    reads/s:                      25052.25
    writes/s:                     12526.18
    fsyncs/s:                     1603543.75

Throughput:
    read, MiB/s:                  391.44
    written, MiB/s:               195.72

General statistics:
    total time:                          10.0015s
    total number of events:              16414447

Latency (ms):
         min:                                    0.00
         avg:                                    0.01
         max:                                   31.49
         95th percentile:                        0.00
         sum:                                89075.17

Threads fairness:
    events (avg/stddev):           1025902.9375/7516.36
    execution time (avg/stddev):   5.5672/0.06

@JanPretzel
Copy link

Current setup

File operations:
    reads/s:                      1200.92
    writes/s:                     600.46
    fsyncs/s:                     77052.73

Throughput:
    read, MiB/s:                  18.76
    written, MiB/s:               9.38

General statistics:
    total time:                          10.0119s
    total number of events:              787859

Latency (ms):
         min:                                    0.00
         avg:                                    0.20
         max:                                   17.89
         95th percentile:                        0.05
         sum:                               156864.48

Threads fairness:
    events (avg/stddev):           49241.1875/1430.80
    execution time (avg/stddev):   9.8040/0.01

@JanPretzel
Copy link

Desktop on /tmp (Manjaro XFCE)

File operations:
    reads/s:                      31486.92
    writes/s:                     15742.96
    fsyncs/s:                     2015299.46

Throughput:
    read, MiB/s:                  491.98
    written, MiB/s:               245.98

General statistics:
    total time:                          10.0005s
    total number of events:              20625656

Latency (ms):
         min:                                    0.00
         avg:                                    0.00
         max:                                   10.70
         95th percentile:                        0.01
         sum:                                80034.78

Threads fairness:
    events (avg/stddev):           1289103.5000/5151.70
    execution time (avg/stddev):   5.0022/0.01

Desktop on /home (Manjaro XFCE)

File operations:
    reads/s:                      264.97
    writes/s:                     132.53
    fsyncs/s:                     17164.25

Throughput:
    read, MiB/s:                  4.14
    written, MiB/s:               2.07

General statistics:
    total time:                          10.0722s
    total number of events:              174849

Latency (ms):
         min:                                    0.00
         avg:                                    0.91
         max:                                   12.44
         95th percentile:                        2.43
         sum:                               159964.31

Threads fairness:
    events (avg/stddev):           10928.0625/1133.66
    execution time (avg/stddev):   9.9978/0.00

@EugenMayer
Copy link
Author

EugenMayer commented Sep 7, 2019

Ok the mysterie of /tmp is solved - https://wiki.manjaro.org/index.php?title=Fstab#tmpfs

mount -l | grep /tmp
tmpfs on /tmp type tmpfs (rw,noatime)

Means that doing a sysbench in /tmp is basically doing a memory i/o test, instead of doing a disk i/o test - that is why the values are so good.

That is also what finally made the differences in "performance" when we tested the different distos like ubuntu and so on, so of them do not use tmpfs for /tmp out of the box, resulting in "bad performance"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment