Skip to content

Can BufferRecycler support a fixed buffer size which can be customized, instead of dynamic one by calling _allocMore() #833

@qiuyinglanshan

Description

@qiuyinglanshan

As _allocMore() method is called, _byteBuffers will reference to a new larger byte array, and the garbage collector has to collect the original memory. In my application, it may cause frequently fullgc.

The screenshot shows a dump with many unreachable byte array (in old heap) which caused by BufferRecycler.

When I switched USE_THREAD_LOCAL_FOR_BUFFER_RECYCLING to false, fullgc times reduced while younggc times increased, so I ask you if we can use bufferRecycler and with a fixed size buffer ?

image

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