-
Quang-Minh Nguyen authored
This commit implements Cgroup CPU research watcher for notifying CPU throttling of cgroup. When configured, the adaptive calculator polls this watcher periodically. When it returns a backoff event, the calculator adjusts the concurrency limit accordingly. Cgroup doesn't have an easy way to gauge how bad the CPU is percentage. Hence, this watcher compares the recorded total throttled time between two polls. If the throttled time exceeds 50% of the observation window, it returns a backoff event. The watcher uses `throttled_time` (CgroupV1) or `throttled_usec` (CgroupV2) stats from the cgroup manager.
bd2ea331