![cpu throttled cpu throttled](https://www.pgware.com/images/products/superram/screenshot_large_6.png)
They both control how much CPU a set of processes is allowed to use, but in two different ways: through CPU time quotas and CPU pinning, respectively. There are two types of cgroups (controllers in Linux terms) for performing CPU isolation: CPU and cpuset.
![cpu throttled cpu throttled](https://tpucdn.com/forums/data/attachments/159/159674-6fa58c87f49bc90d8b69fb88470efd9c.jpg)
Typically a container maps to a cgroup, which controls the resources of any process running in the container. The Linux kernel implements resource isolation through cgroups, and all container platforms are based on this. This in turn allowed us to reduce fleet-wide core allocation by up to 11% due to less variance in resource requirements.ĬPU quotas and cpusets are Linux kernel scheduler features. In this post we will describe how switching from CPU quotas to cpusets (also known as CPU pinning) allowed us to trade a slight increase in P50 latencies for a significant drop in P99 latencies. It turned out that the issue was how the Linux kernel allocates time for processes to run. Until recently efforts were blocked due to CPU throttling, which indicates that not enough resources have been allocated. With 65,000 physical hosts, 2.4 million cores, and 200,000 containers, increasing utilization to reduce cost is an important and continuous effort. Stateful workloads include MySQL ®, Apache Cassandra ®, ElasticSearch ®, Apache Kafka ®, Apache HDFS ™, Redis ™, Docstore, Schemaless, etc., and in many cases these workloads are co-located on the same physical hosts. At Uber, all stateful workloads run on a common containerized platform across a large fleet of hosts.