Resource Requests and Limits

Container resource requests describe resources used in scheduling decisions. Limits constrain runtime consumption with resource-specific enforcement. For example, 250m CPU is one quarter of a CPU; 128Mi is a binary memory quantity.

A CPU limit can throttle execution. A memory limit can result in an out-of-memory kill rather than gentle slowing. A request is not a prediction of peak use, and a limit is not a promise that capacity is immediately available.

Inspect allocatable node capacity, competing requests, actual usage, and local ephemeral storage. Several workloads can fit by requests while their combined growth later creates pressure. Test representative data and retain evidence before changing the settings.

If a node has 2 CPUs allocatable and existing requests reserve 1.5, a new 750m request does not fit even when current usage looks low. A 250m request could fit, subject to the other scheduling constraints. Setting its limit to 1 CPU does not reserve that whole CPU for placement. Measure throttling, memory peaks, and failure reasons before changing either value.

See Running Data Workloads on Kubernetes for manifest examples.

Further reading


Discover more from Insightful Data Lab

Subscribe to get the latest posts sent to your email.

Similar Posts

Questions, corrections, or additional insights?

This site uses Akismet to reduce spam. Learn how your comment data is processed.