Skip to content

The performance of FileAppender significantly decreases under JDK21 #3393

@lushi516

Description

@lushi516

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions