Skip to content

cgroups: Create cgroups lazily

Will Chandler (ex-GitLab) requested to merge wc/lazy-cgroups into master

Previously we created all N repository cgroups during Gitaly's startup phase. On systems with very large numbers of cgroups this can be a slow operation, blocking all other startup tasks.

To improve startup responsiveness, start creating each repository cgroup the first time a process is created for it. This does add a small delay for the first command executed, but this will be perhaps 10-20 milliseconds on a host with very slow cgroup creation will not impact users.

Merge request reports