logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remko Popma <remko.po...@gmail.com>
Subject Re: Help about log4j tests
Date Tue, 22 Sep 2015 04:18:56 GMT
Dylan,

I agree the JMH microbenchmark tool gives different results than I expected
for AsyncLogger.
I don't have a good explanation for this, sorry. Perhaps there is a mistake
in the benchmark code. I haven't figured this out yet.

All I can say is that in other benchmarks AsyncLogger gave much higher
throughput and lower latency than other async options.
This is confirmed by independent parties in real-world applications (like
http://blogs.mulesoft.com/dev/mule-dev/mule-3-6-asynchronous-logging/ ).

It would be great if you could do your own measurements and verify the
benefit yourself.

I hope this helps,
Remko


On Tue, Sep 22, 2015 at 12:16 PM, Strong Su <lovelosew@gmail.com> wrote:

> Hello everyone,
>
> I'm ready to update log4j1 to log4j2. But when I run the tests from
> log4j-perf with
>
> java -jar log4j-perf/target/benchmarks.jar ".*Async.*Benchmark.*" -f 1 -wi
> 5
> -i 5
>
> java -jar log4j-perf/target/benchmarks.jar ".*Async.*Benchmark.*" -f 1 -wi
> 5
> -i 5 -t 4 -si true
>
>
> I have a little confusion about the result because async log4j2 doesn't
> perform as fast as I think. I do not really know the meaning of score,
> error. Maybe I mis-understand the numbers. And what's the difference
> between AsyncAppenderLog4jBenchmak.throughput and
> AsyncAppenderLog4jBenchark.throughputBaseline?
>
> Single thread:
>
> Benchmark                                                         Mode
> Samples          Score          Error  Units
>
> o.a.l.l.p.j.AsyncAppenderLog4j1Benchmark.throughput              thrpt
>   5     341077.918 ±    56973.052  ops/s
>
> o.a.l.l.p.j.AsyncAppenderLog4j1Benchmark.throughputBaseline      thrpt
>   5  313156075.427 ± 15007930.610  ops/s
>
> o.a.l.l.p.j.AsyncAppenderLog4j2Benchmark.throughput              thrpt
>   5     274396.261 ±   104562.008  ops/s
>
> o.a.l.l.p.j.AsyncAppenderLog4j2Benchmark.throughputBaseline      thrpt
>   5  300448118.296 ± 20954996.392  ops/s
>
> o.a.l.l.p.j.AsyncAppenderLogbackBenchmark.throughput             thrpt
>   5     250630.705 ±    44783.168  ops/s
>
> o.a.l.l.p.j.AsyncAppenderLogbackBenchmark.throughputBaseline     thrpt
>   5  428087377.013 ± 14987003.793  ops/s
>
> o.a.l.l.p.j.AsyncLoggersBenchmark.throughput                     thrpt
>   5     340843.298 ±    13391.381  ops/s
>
> o.a.l.l.p.j.AsyncLoggersBenchmark.throughputBaseline             thrpt
>   5  310154863.556 ± 52270586.260  ops/s
>
> o.a.l.l.p.j.AsyncAppenderLog4j1Benchmark.latency                sample
> 81920        356.471 ±       34.995  ns/op
>
> o.a.l.l.p.j.AsyncAppenderLog4j1Benchmark.latencyBaseline        sample
> 51424         72.723 ±        2.497  ns/op
>
> o.a.l.l.p.j.AsyncAppenderLog4j2Benchmark.latency                sample
> 52362       5465.711 ±     1127.586  ns/op
>
> o.a.l.l.p.j.AsyncAppenderLog4j2Benchmark.latencyBaseline        sample
> 53929         72.443 ±        5.108  ns/op
>
> o.a.l.l.p.j.AsyncAppenderLogbackBenchmark.latency               sample
> 85137       3218.803 ±      703.425  ns/op
>
> o.a.l.l.p.j.AsyncAppenderLogbackBenchmark.latencyBaseline       sample
> 63792         49.811 ±        1.118  ns/op
>
> o.a.l.l.p.j.AsyncLoggersBenchmark.latency                       sample
> 60990       2792.624 ±      329.020  ns/op
>
> o.a.l.l.p.j.AsyncLoggersBenchmark.latencyBaseline               sample
> 65997         48.625 ±        0.908  ns/op
>
> four threads:
>
> Benchmark                                                         Mode
> Samples          Score           Error  Units
>
> o.a.l.l.p.j.AsyncAppenderLog4j1Benchmark.throughput              thrpt
>   5     336129.060 ±     91403.864  ops/s
>
> o.a.l.l.p.j.AsyncAppenderLog4j1Benchmark.throughputBaseline      thrpt
>   5  603886890.062 ±   5855781.921  ops/s
>
> o.a.l.l.p.j.AsyncAppenderLog4j2Benchmark.throughput              thrpt
>   5     207837.711 ±     59456.958  ops/s
>
> o.a.l.l.p.j.AsyncAppenderLog4j2Benchmark.throughputBaseline      thrpt
>   5  667589696.890 ± 113605555.590  ops/s
>
> o.a.l.l.p.j.AsyncAppenderLogbackBenchmark.throughput             thrpt
>   5     204393.757 ±     42566.910  ops/s
>
> o.a.l.l.p.j.AsyncAppenderLogbackBenchmark.throughputBaseline     thrpt
>   5  872806332.178 ± 136706283.485  ops/s
>
> o.a.l.l.p.j.AsyncLoggersBenchmark.throughput                     thrpt
>   5     236850.656 ±    136504.885  ops/s
>
> o.a.l.l.p.j.AsyncLoggersBenchmark.throughputBaseline             thrpt
>   5  643801055.425 ± 140478301.365  ops/s
>
> o.a.l.l.p.j.AsyncAppenderLog4j1Benchmark.latency                sample
> 233570      15274.635 ±     19813.054  ns/op
>
> o.a.l.l.p.j.AsyncAppenderLog4j1Benchmark.latencyBaseline        sample
> 220639         96.236 ±         1.355  ns/op
>
> o.a.l.l.p.j.AsyncAppenderLog4j2Benchmark.latency                sample
> 288629      18893.983 ±      3047.142  ns/op
>
> o.a.l.l.p.j.AsyncAppenderLog4j2Benchmark.latencyBaseline        sample
> 223351         91.484 ±         2.219  ns/op
>
> o.a.l.l.p.j.AsyncAppenderLogbackBenchmark.latency               sample
> 196275      20113.644 ±      3946.275  ns/op
>
> o.a.l.l.p.j.AsyncAppenderLogbackBenchmark.latencyBaseline       sample
> 267998         90.178 ±         0.421  ns/op
>
> o.a.l.l.p.j.AsyncLoggersBenchmark.latency                       sample
> 310559      15449.140 ±      1886.222  ns/op
>
> o.a.l.l.p.j.AsyncLoggersBenchmark.latencyBaseline               sample
> 252935         90.349 ±         6.792  ns/op
>
>
>
> Thank you.
>
> Best Regards,
>
> Dylan Su
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message