# containerd/cgroups

cgroups package for Go

Repository: https://github.com/containerd/cgroups
Canonical: https://ross.abutalabs.com/products/cgroups
Homepage: https://containerd.io
Language: Go
License: Apache-2.0
License Family: permissive
Topics: cgroups, golang, linux
Last push: 2026-08-17T13:43:03+00:00

## Health v2 (maintenance only)
Score: 89/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 70, longevity 100
- inputs: {"age_days": 3613, "days_push": 16, "days_rel": 201, "gap_med": 28, "n_releases_24m": 6}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1191, forks 251 (observed 2026-08-28T04:03:56.094898+00:00)

## What it is
A Go package for creating, managing, inspecting, and destroying Linux cgroups, supporting both cgroup v1 and v2 hierarchies. It uses the OCI runtime-spec resource format and is maintained by the containerd project.

## Use cases
- manage linux cgroups from a go application
- limit cpu and memory usage of processes
- create systemd slices for process groups
- monitor cgroup memory and cpu stats
- freeze and thaw process groups
- move processes between cgroups
- get notified on cgroup memory events

## When to choose
- you need programmatic cgroup management in Go
- you are building a container runtime or process supervisor
- you need both cgroup v1 and v2 support
- you want OCI runtime-spec compatible resource constraints

## When to avoid
- you need cgroup management outside Go
- you target non-Linux platforms
- you just want to inspect cgroups from the shell (use systemd or cgget tools)
- you need a full container runtime rather than a cgroup library

## Facets
- artifact type: library
- maturity: active
- function: developer-tools, configuration-management, monitoring
- domain: operating-systems, developer-tools
- platform: go
- tags: cgroups, cgroup-v1, cgroup-v2, systemd, oci-runtime-spec, resource-limits, container-runtime, process-isolation, containers, devops, linux

## Member repositories
- containerd/cgroups (main) score 89

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:56.094898+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:22:42.211052+00:00, confidence not recorded.
  - readme: https://github.com/containerd/cgroups (fetched 2026-08-28T04:03:56.094898+00:00, sha 475886169738)
  - homepage: https://containerd.io (fetched 2026-08-29T12:29:55.387732+00:00, sha 69b5c5503c4b)
  - site_page: https://containerd.io/docs/main (fetched 2026-08-29T12:29:55.405522+00:00, sha 8078c32986f0)
  - site_page: https://containerd.io/docs/2.3/getting-started (fetched 2026-08-29T12:29:55.410468+00:00, sha 192f6d6560df)
  - site_page: https://containerd.io/docs/2.3 (fetched 2026-08-29T12:29:55.397555+00:00, sha 173e868c8a54)
  - site_page: https://containerd.io/docs/2.2 (fetched 2026-08-29T12:29:55.399727+00:00, sha 336a5f40a8e6)
  - site_page: https://containerd.io/docs/2.1 (fetched 2026-08-29T12:29:55.401632+00:00, sha 1779e2bd4338)
  - site_page: https://containerd.io/docs/1.7 (fetched 2026-08-29T12:29:55.403530+00:00, sha e1cbd4ed3093)
  - site_page: https://containerd.io/releases (fetched 2026-08-29T12:29:55.407523+00:00, sha 4396785a01ad)
- Data as of 2026-08-30T08:39:29.467469+00:00.
