aa0ca25049778f92f08bc60726f2d7680f140fd1
To avoid noise in sampling CPU usage metrics, we now sample the system usage closer to the actual response from the underlying runtime. Because the response from the runtime may be delayed, this makes the sampling more resilient in loaded conditions. In addition to this, we also replace the tick with a sleep to avoid situations where ticks can backup under loaded conditions. The trade off here is slightly more load reading the system CPU usage for each container. There may be an optimization required for large amounts of containers but the cost is on the order of 15 ms per 1000 containers. If this becomes a problem, we can time slot the sampling, but the complexity may not be worth it unless we can test further. Unfortunately, there aren't really any good tests for this condition. Triggering this behavior is highly system dependent. As a matter of course, we should qualify the fix with the users that are affected. Signed-off-by: Stephen J Day <stephen.day@docker.com> Upstream-commit: fd0e24b7189374e0fe7c55b6d26ee916d3ee1655 Component: engine
Description
No description provided
Languages
Go
92%
Shell
5.5%
Dockerfile
1.1%
Go-Checksums
0.9%
Makefile
0.3%
Other
0.2%