-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Performance regression in 2.25.0-SNAPSHOT
#3106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The performance hit is probably due to the new @jengebr, could you look at this? Does the performance regression also affect your usage? |
Suspect: #2691 |
@ppkarwasz our apps only rarely log exceptions, so this cost is present but quite small in comparison with other log4j work (especially MDC/ThreadContext). I'll take a look at this in isolation though, and get back in a few days. |
Thanks, the statistics I mentioned above are obviously a little bit artificial: if we want to benchmark the formatting of an exception, we should take as a baseline the creation of exceptions without logging (which is probably very slow). |
I recreated a large performance regression coming from ThrowablePatternConverter.format (2.25.0) vs ExtendedThrowablePatternConverter.format (2.24.1). Does that sound right so far? FWIW I was able to create one Exception as a static variable, then reuse that for every test iteration. It's not a perfect reproduction but it certainly demonstrates the regression quite clearly. |
So even |
ProblemData shows 2.24.x has nearly zero object allocation during the benchmark, but 2.25.0 has far more than that. The allocation-heavy code in 2.25.x also comes with significant cpu load. Caveat: I'm not 100% certain I reproduced the specific issue reported. Data
AnalysisExamination of
... but what doesn't jump out is that there is a Recommendations
BenchmarkMy benchmark is attached, and should be run with Config file: log4j2.xml.txt |
Fixed by #3123. |
As shown by @hailshao in #3093, there might be a 60% loss of performance in the current
2.25.0-SNAPSHOT
, compared to2.24.1
.Before we publish
2.25.0
we need to run the benchmarks and fix the problem.I consider this a blocker for the
2.25.0
release.The text was updated successfully, but these errors were encountered: