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 #5

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.

mmap

% java -Djava.io.tmpdir=$HOME/tmp -jar target/fsync_compare-0.1-SNAPSHOT.jar mmap 256
Running mmap test
buffer contains 1 events and has byte size is 256
Did 4194304 writes. Wrote 1073741824 bytes total
Iteration 0 took 4307ms
Iteration 1 took 4243ms
Iteration 2 took 4156ms
Iteration 3 took 4289ms
Iteration 4 took 4113ms
Iteration 5 took 4216ms
Iteration 6 took 4331ms
Iteration 7 took 4126ms

channel

% java -Djava.io.tmpdir=$HOME/tmp -jar target/fsync_compare-0.1-SNAPSHOT.jar channel 256
Running channel test
buffer contains 1 events and has byte size is 256
Did 4194304 writes. Wrote 1073741824 bytes total
Iteration 0 took 9199ms
Iteration 1 took 8484ms
Iteration 2 took 7387ms
Iteration 3 took 6567ms
Iteration 4 took 7914ms
Iteration 5 took 7099ms
Iteration 6 took 7469ms
Iteration 7 took 7409ms