Skip to content
Snippets Groups Projects
Commit 8375d9d3 authored by Quang-Minh Nguyen's avatar Quang-Minh Nguyen
Browse files

limiter: Make CpuThrottledThreshold configureable

In the current implementation, the adaptive limiting kicks in when the resource level exceeds some hard-coded thresholds:
* 90% of the parent cgroup's memory.
* Cgroup's cpu is throttled for 50% of the observation time.

In a recent incident, the limiter worked but it was triggered a bit
late. When the memory level reaches 90%, the memory headroom might be
tight. The inflight operations (usually expensive) can fill up the rest
very quickly. When the memory level reaches 100%, a lot of weird things
might occur, such as high memory pressure leading to major page faults,
failed memory allocations, high iowait (because of page faults), OOM
killing, etc. There's a chance that inflight requests cannot finish at
this stage. So, it makes sense to increase this headroom by decreasing
the threshold.

This commit adds the ability to customize the CPU throttled threshold.
parent c65b631d
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment