Skip to content
  • Steve Xuereb's avatar
    Cgroups: add cpu_quota_us limit · 80ce55b0
    Steve Xuereb authored
    What
    ---
    - Add a new configuration under `cgroups` called `cpu_quota_us` to
      configure `cfs_quota_us` for the parent cgroup
      https://docs.kernel.org/scheduler/sched-bwc.html?highlight=cfs_quota_us
    - Add a new configuration under `cgroups.repositories` called
      `cpu_quota_us` to configure `cfs_quota_us` for the repository cgroup
      https://docs.kernel.org/scheduler/sched-bwc.html?highlight=cfs_quota_us
    - Add metrics
        - `gitaly_cgroup_cpu_cfs_periods_total`: Read from `cpu.stat` nr_periods https://docs.kernel.org/scheduler/sched-bwc.html#statistics
        - `gitaly_cgroup_cpu_cfs_throttled_periods_total`: Read from `cpu.stat` nr_throttled https://docs.kernel.org/scheduler/sched-bwc.html#statistics
        - `gitaly_cgroup_cpu_cfs_throttled_seconds_total`: Read from `cpu.stat` throttled_time https://docs.kernel.org/scheduler/sched-bwc.html#statistics
    - Add more test coverage when only specific values are set.
    
    Why
    ---
    At the moment we limit memory and CPU via
    [`cpu.shares`](https...
    80ce55b0