jakelandis / fsync_compare

Simple little application to compare fsync time between mmap vs. channel io for sequential writes
1 stars 3 forks source link

Test results: Linux, Hetzner Xeon E5-1650, Ubuntu 16.04, ext4 #4

Open jordansissel opened 7 years ago

jordansissel commented 7 years ago

Test code: https://github.com/jordansissel/fsync_compare/commit/ad7507dafc4bfaf933e869d70d99ba1a349a38e5

% mount
/dev/mapper/vg00-root on / type ext4 (rw,relatime,stripe=256,data=ordered)

Scenario: running the same test repeatedly without exiting the jvm. Each test should be creating a new file to use.

fdatasync/msync are called every 1024 events (every 5 "writes" for this test)

mmap multiple iterations

% java -Djava.io.tmpdir=$HOME/tmp -jar target/fsync_compare-0.1-SNAPSHOT.jar mmap $((32<<10))
Running mmap test
buffer contains 212 events and has byte size is 32768
Did 32768 writes. Wrote 1073741824 bytes total
Iteration 0 took 4703ms
Iteration 1 took 4629ms
Iteration 2 took 4309ms
Iteration 3 took 4895ms
Iteration 4 took 4723ms
Iteration 5 took 4725ms
Iteration 6 took 4652ms
Iteration 7 took 4777ms
Iteration 8 took 4540ms
Iteration 9 took 4777ms
Iteration 10 took 4721ms

channel

% java -Djava.io.tmpdir=$HOME/tmp -jar target/fsync_compare-0.1-SNAPSHOT.jar channel $((32<<10))
Running channel test
buffer contains 212 events and has byte size is 32768
Did 32768 writes. Wrote 1073741824 bytes total
Iteration 0 took 4545ms
Iteration 1 took 4288ms
Iteration 2 took 4157ms
Iteration 3 took 4500ms
Iteration 4 took 4437ms
Iteration 5 took 4289ms
Iteration 6 took 4328ms
Iteration 7 took 4436ms
Iteration 8 took 4289ms
Iteration 9 took 4480ms
Iteration 10 took 4457ms