This PR changes AsyncAppender implementation to use a preallocated ring buffer and is inspired by LMAX Disruptor
The benchmark comparison to master ( benchmark/tools/compare.py --no-color benchmarks /tmp/old.json /tmp/new.json
) shows the following improvement on Ubuntu (gcc 9):
Benchmark
Time
CPU
Time Old
Time New
CPU Old
CPU New
Appending int+float using MessageBuffer, pattern: %m%n
-0.0288
-0.0289
966
938
966
938
Appending int+float using MessageBuffer, pattern: %m%n/threads:4
+0.0164
+0.0157
425
432
1698
1725
Appending int+float using FMT, pattern: %m%n
-0.0621
-0.0621
543
509
543
509
Appending int+float using FMT, pattern: %m%n/threads:4
+0.0034
+0.0039
380
381
1511
1517
Async, Sending int+float using MessageBuffer
-0.316
-0.3159
2171
1485
2171
1486
Async, Sending int+float using MessageBuffer/threads:4
This PR changes AsyncAppender implementation to use a preallocated ring buffer and is inspired by LMAX Disruptor
The benchmark comparison to master (
benchmark/tools/compare.py --no-color benchmarks /tmp/old.json /tmp/new.json
) shows the following improvement on Ubuntu (gcc 9):