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: Hyper-V vm, Linux, Fedora 23, xfs. Write size 65536 #3

Open jordansissel opened 7 years ago

jordansissel commented 7 years ago

channel, 64kb, perf trace -s

% sudo perf trace -s java -Djava.io.tmpdir=$HOME/build/tmp -jar target/fsync_compare-0.1-SNAPSHOT.jar channel $((64<<10))
Running channel test
Buffer contains 425 events and has byte size is 65536
Did 16384 writes. Wrote 1073741824 bytes total

   syscall            calls    total       min       avg       max      stddev
                               (msec)    (msec)    (msec)    (msec)        (%)
   --------------- -------- --------- --------- --------- ---------     ------
   fdatasync           5461 66602.924     7.330    12.196    71.980      0.42%
   write              16405   941.322     0.000     0.057     2.608      0.78%

mmap, 64kb, perf trace -s

% sudo perf trace -s java -Djava.io.tmpdir=$HOME/build/tmp -jar target/fsync_compare-0.1-SNAPSHOT.jar mmap $((64<<10))
Running mmap test
Buffer contains 425 events and has byte size is 65536
Did 16384 writes. Wrote 1073741824 bytes total

...

   syscall            calls    total       min       avg       max      stddev
                               (msec)    (msec)    (msec)    (msec)        (%)
   --------------- -------- --------- --------- --------- ---------     ------
   msync               5461 69322.540     7.068    12.694    71.948      0.42%
jordansissel commented 7 years ago

From this branch: https://github.com/jordansissel/fsync_compare/commit/65c9ad684cb72827ffff295d699cb30e10e47bba

channel, 64kb, perf stat

% perf stat java -Djava.io.tmpdir=$HOME/build/tmp -jar target/fsync_compare-0.1-SNAPSHOT.jar channel $((64<<10))
Running channel test
Buffer contains 425 events and has byte size is 65536
Did 16384 writes. Wrote 1073741824 bytes total

 Performance counter stats for 'java -Djava.io.tmpdir=/home/jls/build/tmp -jar target/fsync_compare-0.1-SNAPSHOT.jar channel 65536':

       1721.382978      task-clock (msec)         #    0.026 CPUs utilized
            18,201      context-switches          #    0.011 M/sec
                53      cpu-migrations            #    0.031 K/sec
             3,479      page-faults               #    0.002 M/sec
   <not supported>      cycles
   <not supported>      instructions
   <not supported>      branches
   <not supported>      branch-misses

      67.021048232 seconds time elapsed

mmap, 64kb, perf stat

% perf stat java -Djava.io.tmpdir=$HOME/build/tmp -jar target/fsync_compare-0.1-SNAPSHOT.jar mmap $((64<<10))
Running mmap test
Buffer contains 425 events and has byte size is 65536
Did 16384 writes. Wrote 1073741824 bytes total

 Performance counter stats for 'java -Djava.io.tmpdir=/home/jls/build/tmp -jar target/fsync_compare-0.1-SNAPSHOT.jar mmap 65536':

       2443.330755      task-clock (msec)         #    0.036 CPUs utilized
            18,223      context-switches          #    0.007 M/sec
                34      cpu-migrations            #    0.014 K/sec
           265,155      page-faults               #    0.109 M/sec
   <not supported>      cycles
   <not supported>      instructions
   <not supported>      branches
   <not supported>      branch-misses

      67.853303164 seconds time elapsed