I had different results
MBP - Mid 2014
MacOS 10.12
Docker 1.12.1 (12133)
FileIO (sysbench)
Simple docker
$ docker run -d --name file_0 ubuntu tail -f /var/log/lastlog
$ time docker exec -it file_0 bash -c "cd /sysbench; sysbench --test=fileio --file-num=1024 --file-total-size=1G prepare"
bash: line 0: cd: /sysbench: No such file or directory
sysbench 0.4.12: multi-threaded system evaluation benchmark
1024 files, 1024Kb each, 1024Mb total
Creating files for the test...
real 0m34.149s
user 0m0.010s
sys 0m0.010s
$ time docker exec -it file_0 bash -c "cd /sysbench; sysbench --test=fileio --file-num=1024 --file-total-size=1G --file-test-mode=rndrw --init-rng=on --max-time=300 --max-requests=0 run"
bash: line 0: cd: /sysbench: No such file or directory
sysbench 0.4.12: multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 1
Initializing random number generator from timer.
Extra file open flags: 0
1024 files, 1Mb each
1Gb total file size
Block size 16Kb
Number of random requests for random IO: 0
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random r/w test
Threads started!
Time limit exceeded, exiting...
Done.
Operations performed: 44760 Read, 29840 Write, 763091 Other = 837691 Total
Read 699.38Mb Written 466.25Mb Total transferred 1.1383Gb (3.8854Mb/sec)
248.67 Requests/sec executed
Test execution summary:
total time: 300.0017s
total number of events: 74600
total time taken by event execution: 7.5445
per-request statistics:
min: 0.00ms
avg: 0.10ms
max: 6.49ms
approx. 95 percentile: 0.73ms
Threads fairness:
events (avg/stddev): 74600.0000/0.00
execution time (avg/stddev): 7.5445/0.00
real 5m0.150s
user 0m0.012s
sys 0m0.013s
Docker Volume
$ docker run -d --name file_1 -v sysbench:/sysbench ubuntu tail -f /var/log/lastlog
$ time docker exec -it file_1 bash -c "cd /sysbench; sysbench --test=fileio --file-num=1024 --file-total-size=1G prepare"
sysbench 0.4.12: multi-threaded system evaluation benchmark
1024 files, 1024Kb each, 1024Mb total
Creating files for the test...
real 0m39.605s
user 0m0.011s
sys 0m0.011s
$ time docker exec -it file_1 bash -c "cd /sysbench; sysbench --test=fileio --file-num=1024 --file-total-size=1G --file-test-mode=rndrw --init-rng=on --max-time=300 --max-requests=0 run"
sysbench 0.4.12: multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 1
Initializing random number generator from timer.
Extra file open flags: 0
1024 files, 1Mb each
1Gb total file size
Block size 16Kb
Number of random requests for random IO: 0
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random r/w test
Threads started!
Time limit exceeded, exiting...
Done.
Operations performed: 45960 Read, 30640 Write, 784070 Other = 860670 Total
Read 718.12Mb Written 478.75Mb Total transferred 1.1688Gb (3.9896Mb/sec)
255.33 Requests/sec executed
Test execution summary:
total time: 300.0024s
total number of events: 76600
total time taken by event execution: 11.8245
per-request statistics:
min: 0.00ms
avg: 0.15ms
max: 8.75ms
approx. 95 percentile: 0.84ms
Threads fairness:
events (avg/stddev): 76600.0000/0.00
execution time (avg/stddev): 11.8245/0.00
real 5m0.143s
user 0m0.011s
sys 0m0.011s
Host directory
$ docker run -d --name file_2 -v $(pwd)/sysbench:/sysbench ubuntu tail -f /var/log/lastlog
$ time docker exec -it file_2 bash -c "cd /sysbench; sysbench --test=fileio --file-num=1024 --file-total-size=1G prepare"
sysbench 0.4.12: multi-threaded system evaluation benchmark
1024 files, 1024Kb each, 1024Mb total
Creating files for the test...
real 0m24.376s
user 0m0.009s
sys 0m0.009s
$ time docker exec -it file_2 bash -c "cd /sysbench; sysbench --test=fileio --file-num=1024 --file-total-size=1G --file-test-mode=rndrw --init-rng=on --max-time=300 --max-requests=0 run"
sysbench 0.4.12: multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 1
Initializing random number generator from timer.
Extra file open flags: 0
1024 files, 1Mb each
1Gb total file size
Block size 16Kb
Number of random requests for random IO: 0
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random r/w test
Threads started!
Time limit exceeded, exiting...
Done.
Operations performed: 1193797 Read, 795865 Write, 20373504 Other = 22363166 Total
Read 18.216Gb Written 12.144Gb Total transferred 30.36Gb (103.63Mb/sec)
6632.20 Requests/sec executed
Test execution summary:
total time: 300.0002s
total number of events: 1989662
total time taken by event execution: 284.0402
per-request statistics:
min: 0.00ms
avg: 0.14ms
max: 94.55ms
approx. 95 percentile: 0.39ms
Threads fairness:
events (avg/stddev): 1989662.0000/0.00
execution time (avg/stddev): 284.0402/0.00
real 5m1.179s
user 0m0.011s
sys 0m0.011s