Skip to content

How often does Go GC after the memory exceeds the GOMEMLIMIT limit? #66569

Not planned
@18710309920

Description

@18710309920

My system triggers OOM when it exceeds 2G. I set the value of GOMEMLIMIT to 1.5G. However, when the memory exceeds 1.5 GB, the GO frequently performs GC, which affects the system performance. I would like to know how the frequency of GC is determined when the memory exceeds the value set by the GOMEMLIMIT

Activity

Jorropo

Jorropo commented on Mar 28, 2024

@Jorropo
Member

the runtime does already have a mechanism to limit GC CPU time close to the memory limit. The CPU time limit is set to 50% over a 1 second window

#59324 (comment)


Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

Please see: https://go.dev/wiki/Questions

locked and limited conversation to collaborators on Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @gopherbot@Jorropo@18710309920

        Issue actions

          How often does Go GC after the memory exceeds the GOMEMLIMIT limit? · Issue #66569 · golang/go