Skip to content

Allow specifying static buffer/overhead for MAXPROCS #94

Description

@DerekTBrown

Context

  • We have observed that setting GOMAXPROCS=cpu.limits leads to some low level of CPU throttling because there are other processes not accounted for. It seems others have observed this case as well. 1
  • We also have a few systems that fork non-golang procs within the same CPU namespace.
  • We would like a mechanism to reserve some headroom for MAXPROCS (i.e. subtract some fixed constant from the value set by automaxprocs).

Feature Request

  • Support an environment variable like AUTOMAXPROCSBUFFER=2 that is subtracted from the observed CPU limit before setting GOMAXPROCS

Footnotes

  1. https://news.ycombinator.com/item?id=42248550

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