Skip to content

Improve Performance of Transactional Message and Delay Message Scheduling #3827

@shuangchengsun

Description

@shuangchengsun

Recently, we conducted a stress test on transaction messages, but found that the performance of transaction messages was significantly lower than the previous version. After our analysis, we found that this phenomenon was caused by a bug in jdk.
image
As we can see, This method consumes a lot of time, which is obviously unreasonable. With further investigation, it turns out that this is a bug in JDK-8(https://bugs.openjdk.java.net/browse/JDK-8227019), which has been fixed in subsequent versions. Unfortunately, this bug still alive in jdk 1.8.0_202.

The root cause in code as figure show. An easy way to fix it is to use timeout parameter, which can improve 50%
image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions