nuts-foundation / nuts-foundation/nuts-node

Document cpu limits configuration for Kubernetes (like) environments

Open
#3,932 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
28
Forks
23
Avg merge
1d 10h
Merged PRs (30d)
76

Description

To optimize performance on a system, the Go runtime starts as many threads as there are CPU cores available on the machine. This is done by setting GOMAXPROCS==CPU cores. If it creates more threads this leads to more overhead and performance reduction, less means that the system is not fully utilized. See https://www.ardanlabs.com/blog/2024/02/kubernetes-cpu-limits-go.html for a more detailed explanation.

As of Go 1.25, the GOMAXPROCS env variable is aware of resource limits set for a container. See https://go.dev/blog/container-aware-gomaxprocs. However, if there is no resource limit set for a container, and the host is shared with other containers (as you normally would), the Go runtime will default to the number CPU cores on the node and be throttled by the system. Note that resource requests are not taken into account, only limits.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named in the issue. Start by locating the repository's deployment and configuration documentation, then review the linked Go and Kubernetes explanations. Done means documenting CPU limits, the distinction between limits and requests, and the relevant Go runtime behavior for Kubernetes-like environments.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
devops, documentation, infrastructure
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.