Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

The performance of FileAppender significantly decreases under JDK21 #3393

Open
zengzuo613 opened this issue Jan 14, 2025 · 1 comment
Open

Comments

@zengzuo613
Copy link

We tested FileAppender using JMH and found that compared to JDK1.8, the performance of JDK21 decreased by 30.5% (throughput decreased from 47.65 ops/ms to 33.08 ops/ms)

configuration

  1. Laptop configuration: I5-1350P CPU, 32GB DDR5 5200 RAM, and Samsung MZVL4512HBLU-00BLL 512GB SSD.
  2. Log4j2 version is 2.24.3.
  3. Perform three performance tests and calculate the average value.

result

JDK Version Score gc.alloc.rate gc.count
JDK 21.05 33.08 ops/ms 635.45 MB/sec 61.33
JDK 1.8.171 47.65 ops/ms 1,651.85 MB/sec 294

For detailed code and configuration parameters , please refer to: log4j2-perf-diff-jdk, Please refer to the complete test results: jmh-result.

@vy
Copy link
Member

vy commented Jan 27, 2025

@zengzuo613, thanks so much for the report and the reproducer. Pinpointing performance issues are pretty time-consuming for maintainers. Could you also examine the test with a profiler and, hopefully, shed some light onto issue, please?

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants