Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Limit how often we do a GC. #9890

@erikjohnston

Description

@erikjohnston

We support configuring the GC thresholds via the gc_thresholds config option, however the default can lead to a lot of GC churn on busier instances. This can easily lead to a) a CPU usage by GC of ~20% and b) multiple multi second GC pauses in quick succession.

Since we manually run the GC we could add limits to ensure we don't run the GC e.g. gen 0 no more than once a second, gen 1 no more than once every 10s and gen 2 no more than once every 30s. This a) enforces that we don't repeatedly do gen2 really frequently and b) stops objects getting promoted to gen2 far too quickly.

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