Improving Kubernetes Scheduler Performance
coreos.com
coreos.com
By doing this, we can have more insights of system performance and find out which part is too "weak".
There is no reason that we couldn't increase the rate limiter if we keep improving the system in overall.
First, hit a rate limiter, removing it partially solved the performance issue at low scale.
Second, there was a slightly expensive "initialization operation" that should be only done once, made sure it only happened once.
Finally, found the expensive round math operation with micro-benchmarks and improving the math operation resulted in doubled throughput.
> they optimized "Round" which took 18 seconds
This is CPU profile. The overall sampled time is 79 seconds. The Round() method took 18 seconds. This has no direct indication to scheduling latency.
> by that reduced total cpu time from 53 to 23 seconds
This is about scheduling latency. In this experiment, we schedule 1000 pods on 1000 nodes and see how much time it took to schedule a pod, aka scheduling latency. Before the optimization, the latency is 53 seconds; after, 23 seconds. Of course, this is just one of the steps we kept optimizing.