Grokking Operating Systems and Networking for Backend Engineers
0% completed
CPU Quotas and Throttling
Checkout's team moves the service into a container and gives it a limit of half a CPU. Each order needs about 80 ms of CPU time, and Checkout handles about one order per second in this test. The CPU graph shows 8 percent of one CPU, far below the limit. Orders, however, now take 125 ms on average instead of 80 ms, and no line in the logs explains the extra 45 ms.
Nothing is wrong with the code, and the machine is not busy. The kernel paused the service on purpose, because it had used its allowance of CPU time for that tenth of a second.
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%