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, EC2, Amazon Linux, t2.small, 4096 byte writes, sync every 100,000 events, 1.5gb files #7

Open jordansissel opened 7 years ago

jordansissel commented 7 years ago

Writing 1.5gb files:

[ec2-user@ip-10-0-3-144 tmp]$ du -hs mmap*
1.5G    mmap4245532689462303839.tmp
1.5G    mmap4285982213434761337.tmp
1.5G    mmap5740529578694836557.tmp
456M    mmap7436128397728889811.tmp

This node type (t2.small) has only 2gb of memory. No swap. Disk is backed by EBS.

mmap

[ec2-user@ip-10-0-3-144 fsync_compare]$ java -jar target/fsync_compare-0.1-SNAPSHOT.jar  mmap 4096 100000
Running mmap test (write size: 4096, sync interval: 100000)
buffer contains 26 events and has byte size is 4004
buffer java.nio.DirectByteBuffer[pos=0 lim=4004 cap=4096]
Did 399108 writes. Wrote 1598028432 bytes total
Iteration 0 took 23890ms
Iteration 1 took 25025ms
Iteration 2 took 25017ms

channel

[ec2-user@ip-10-0-3-144 fsync_compare]$ java -jar target/fsync_compare-0.1-SNAHOT.jar  channel 4096 100000
Running channel test (write size: 4096, sync interval: 100000)
buffer contains 26 events and has byte size is 4004
buffer java.nio.DirectByteBuffer[pos=0 lim=4004 cap=4096]
Did 399108 writes. Wrote 1598028432 bytes total
Iteration 0 took 23893ms
Iteration 1 took 25020ms
Iteration 2 took 25012ms