Docker Community Forums

Share and learn in the Docker community.

Sysbench fileio performance

Hi,

i run sysbench tool (sysbench fileio --file-test-mode=seqwr run) within docker container and on host pc. The results are below.

HOST PC

sysbench --test=fileio --file-test-mode=seqwr --max-time=10 --file-total-size=4G run

sysbench 0.4.12: multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 1
Extra file open flags: 0
128 files, 32Mb each
4Gb total file size
Block size 16Kb
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing sequential write (creation) test
Threads started!
Time limit exceeded, exiting…
Done.
Operations performed: 0 Read, 262144 Write, 106 Other = 262250 Total
Read 0b Written 4Gb Total transferred 4Gb (409.26Mb/sec)
26192.90 Requests/sec executed

Test execution summary:
total time: 10.0082s
total number of events: 262144
total time taken by event execution: 1.3281
per-request statistics:
min: 0.00ms
avg: 0.01ms
max: 0.12ms
approx. 95 percentile: 0.01ms

Threads fairness:
events (avg/stddev): 262144.0000/0.00
execution time (avg/stddev): 1.3281/0.00

DOCKER CONTAINER

root@02acb89979d3:/# sysbench fileio --file-test-mode=seqwr --max-time=10 --file-total-size=4G run
WARNING: --max-time is deprecated, use --time instead
sysbench 1.0.18 (using system LuaJIT 2.1.0-beta3)

Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Extra file open flags: (none)
128 files, 32MiB each
4GiB total file size
Block size 16KiB
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing sequential write (creation) test
Initializing worker threads…
Threads started!
File operations:
reads/s: 0.00
writes/s: 5518.74
fsyncs/s: 7066.68

Throughput:
read, MiB/s: 0.00
written, MiB/s: 86.23

General statistics:
total time: 10.0150s
total number of events: 125983

Latency (ms):
min: 0.00
avg: 0.08
max: 20.52
95th percentile: 0.07
sum: 9881.87

Threads fairness:
events (avg/stddev): 125983.0000/0.00
execution time (avg/stddev): 9.8819/0.00

There is drastic difference on write performance.

The Host PC specs are:

inxi

CPU~Hexa core Intel Core i7-8700K (-HT-MCP-) speed/max~1010/4700 MHz Kernel~4.15.0-142-generic x86_64 Up~1 day Mem~11697.5/64336.5MB HDD~2512.5GB(49.3% used) Procs~319 Client~Shell inxi~2.2.35

inxi -S

System: Host: abc Kernel: 4.15.0-142-generic x86_64 (64 bit) Desktop: N/A Distro: Ubuntu 16.04 xenial

The container base os is Ubuntu 20.04.

What could be the problem? Am i doing something wrong?