You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Rebecca Ahlvarsson <ra...@gmail.com> on 2014/03/29 00:43:44 UTC

Running perf tests with disruptor

I am trying to run the async performance tests described on the link below
on my machine.

http://logging.apache.org/log4j/2.x/manual/async.html#Asynchronous_Logging_Performance

I am not an expert with log4j, so here is how far I got after building
log4j with maven:

java -cp
target/classes:target/test-classes:lib/disruptor-3.2.1.jar:../log4j-api/target/classes
org.apache.logging.log4j.core.async.perftest.PerfTest
org.apache.logging.log4j.core.async.perftest.RunLog4j2 blah blah.log 1
-verbose

Then I get this in the output:

avg=17 99%=32 99.99%=64 sampleCount=5000000
9962247 operations/second

The questions I have are:

1. It looks like the source code IPerfTestRunner uses a much shorter
message "Short Msg" instead of the 500 characters message stated in the
link above. Is that intentional or is it a bug? Do we want to test the
latency with the 500-character message or just a short message?

2. I notice that my logs are NOT going to any file. I am probably
misconfiguring something with log4j. How do I generate a file with the
messages from the performance test?

3. I just want to test with one asynchronous logging thread, so I am
passing threadCount 1 above. What does the second parameter 'blah' mean?

4. Not sure why I get operations/seconds if I am not passing -throughput in
the command-line. I just want to get the latency numbers for now. After
that I will worry about throughput.

So basically I just want to run the same test you run to see those great
numbers on my production machine.

Thanks for the help!

-Becky