---
# System prepended metadata

title: cgroup
tags: [gitaly]

---

# cgroup

###### tags: `gitaly`

## Resources

- [x] [Justification/Original Issue](https://gitlab.com/gitlab-org/gitaly/-/issues/3049)
    - [x] [Rejected RFC](https://gitlab.com/gitlab-org/gitaly/-/merge_requests/2604/diffs)
    - [x] [First Experiment](https://gitlab.com/gitlab-com/gl-infra/reliability/-/issues/11647)
    - [x] [Abonded epic](https://gitlab.com/groups/gitlab-com/gl-infra/-/epics/344)
- [x] Current WIP
    - [x] [Use stable path](https://gitlab.com/gitlab-org/gitaly/-/merge_requests/4602)
    - [x] [Prune old cgroup directories](https://gitlab.com/gitlab-org/gitaly/-/merge_requests/4760): Not needed if we use stable path?
- [x] [Gitaly Documentation](https://gitlab.com/gitlab-org/gitaly/-/blob/master/doc/cgroups.md)

## Facts

- Using https://github.com/containerd/cgroups.
- We are using only v1.
- Limiting CPU and Memory usage.

## Questions

- Q: Are we limiting swap? Since we are limiting the memory?
    - A: There is no swap in production
    - Q: What about slef hosted customers?
- Q: Will we start getting more OOM kills. How would gitaly react to that?
- Q: How are we monitoring cgroups? We are using cadvisor, but are we looking at specific things?
- Q: [Prune old cgroup directories](https://gitlab.com/gitlab-org/gitaly/-/merge_requests/4760): Not needed if we use stable path?
- Q: How is development working, since macOS doesn't support cgroups?
- Q: cgroups are enabled in production?
    - Configuration: https://gitlab.com/gitlab-com/gl-infra/chef-repo/-/blob/3e88823af51518928ca677c643f76902f2659fc6/roles/gprd-base-stor-gitaly-common.json#L101-107
    - [repository_count](https://gitlab.com/gitlab-com/gl-infra/chef-repo/-/blob/3e88823af51518928ca677c643f76902f2659fc6/roles/gprd-base-stor-gitaly-common.json#L101) not needed?
    - No processes found in `steve@file-03-stor-gprd.c.gitlab-production.internal:~$ sudo cat /sys/fs/cgroup/memory/gitaly/cgroup.procs`
