NOTE: The extended version of MentaLog was used for the performance test.
MentaLog is very fast. It combines memory-mapped files, asynchronous logging through a lock-free queue and thread pinning to be able to log a byte buffer with 100 bytes in around 65 nanoseconds on average.
Plus it produces ZERO garbage! (Yes ZERO garbage even in asynchronous mode)
Here is the latest results on an i7 machine: (full machine specs here)
java -server -verbose:gc -cp /usr/share/java/jna.jar:../MentaLogExt/target/mentalogext.jar:target/mentalog-all.jar -DmemoryMappedFile=true -DmemoryMappedBufferSize=400m -Dasynchronous=true -DdetailedBenchmark=true -DmaxDelay=10000 -DmaxLogsBetweenPauses=30 -DprocToBindProducer=2 -DlogProcToBindConsumer=3 -DwarmupPerc=0.25 -Xms1g -Xmx4g -XX:NewSize=512m -XX:MaxNewSize=1024m org.mentalog.test.PerformanceComparator 2000000 mentalog
Log Messages: 1,500,000
Avg Time: 65.95 nanos
Min Time: 37 nanos
Max Time: 8961 nanos
75%: avg=58 max=74 nanos
90%: avg=62 max=88 nanos
99%: avg=65 max=104 nanos
99.9%: avg=65 max=213 nanos
99.99%: avg=65 max=279 nanos
99.999%: avg=65 max=1112 nanos
NOTE: In a production system, the log messages will not be logged continuously. Therefore, in order to create a more realistic performance test, a random delay in between the logs is introduced. The config -DmaxDelay=10000 -DmaxLogsBetweenPauses=30 above means: introduce a random max delay of 10000 nanos and log as many as 30 messages in between pauses.