NOTE: This feature is only available in the extended version of MentaLog
MentaLog produces zero garbage, even in asynchronous mode, thanks to MentaQueue. That's very important if you want to avoid the latency produced by the Java garbage collector.
You can test this by running the GCTest program:
java -server -verbose:gc -cp /usr/share/java/jna.jar:../MentaLogExt/target/mentalogext.jar:target/mentalog-all.jar -DmemoryMappedFile=true -DmemoryMappedBufferSize=150m -Dasynchronous=true -DdetailedBenchmark=true -Ddelay=20 -DprocToBindProducer=2 -DlogProcToBindConsumer=3 -Xms1g -Xmx4g -XX:NewSize=512m -XX:MaxNewSize=1024m org.mentalog.test.GCTest 1000000
Wrote 1,000,000 log lines to a file!
Logs that allocated memory: 0 (0.0%)
Logs that did not allocate any memory: 1,000,000 (100.0%)
Logs that triggered GC: 0 (0.0%)
Memory allocated: 0 bytes
Benchmark: Iterations: 1,000,000 | Avg Time: 301.85 nanos | Min Time: 217 nanos | Max Time: 11567 nanos