Skip to content

Disruptor中有new对象,导致分代zgc跨代引用压力 #1231

@dpy1123

Description

@dpy1123

Your question

在使用分代 ZGC 时,发现 jraft 在高 QPS 场景下产生了大量 GC 跨代引用,导致 GC 扫描和吞吐量明显下降。

Your scenes

我们在disruptor的对象复用中,又new了新的对象,导致老对象持有新对象。

Image

具体而言:

  1. FSMCallerImpl中enqueueTask
Image Image

2.ReadOnlyServiceImpl中new Bytes(reqCtx)
Image

Image

3.NodeImpl中new LogEntry()

Image Image

4.LogManagerImpl中appendEntries

Image Image

Your advice

我们是否有可能把translator中new对象的行为去掉,也搞成复用对象。

Environment

  • SOFAJRaft version:1.3.15
  • JVM version :corretto-24.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions