# Setting the right requests and limits in Kubernetes

DevFeed: [Setting the right requests and limits in Kubernetes](<https://devfeed.tech/articles/setting-the-right-requests-and-limits-in-kubernetes-19146.md>)

Original publisher: [Read original article](<https://learnkube.com/setting-cpu-memory-limits-requests>)

Author: Gulcan Topcu

Published: 2020-09-02T00:00:00Z

Content type: article

Language: en

Sources: [Learnk8s](<https://devfeed.tech/sources/learnk8s.md>)

Topics: [scheduling](<https://devfeed.tech/topics/scheduling.md>), [Distributed Systems & Parallel Computing](<https://devfeed.tech/topics/distributed-systems-parallel-computing.md>)

Tags: [autoscaling](<https://devfeed.tech/tags/autoscaling.md>), [capacity](<https://devfeed.tech/tags/capacity.md>), [cgroups](<https://devfeed.tech/tags/cgroups.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [container](<https://devfeed.tech/tags/container.md>), [controllers](<https://devfeed.tech/tags/controllers.md>), [core](<https://devfeed.tech/tags/core.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [cpu-time](<https://devfeed.tech/tags/cpu-time.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [limits](<https://devfeed.tech/tags/limits.md>), [linux](<https://devfeed.tech/tags/linux.md>), [manifest](<https://devfeed.tech/tags/manifest.md>), [memory](<https://devfeed.tech/tags/memory.md>), [node](<https://devfeed.tech/tags/node.md>), [oom](<https://devfeed.tech/tags/oom.md>), [pod](<https://devfeed.tech/tags/pod.md>), [pods](<https://devfeed.tech/tags/pods.md>), [quotas](<https://devfeed.tech/tags/quotas.md>), [scheduling](<https://devfeed.tech/tags/scheduling.md>)

## AI overview

Kubernetes CPU and memory requests and limits act at different stages. The scheduler uses requests to place pods and reserve schedulable capacity; after placement, the kubelet and runtime translate settings into cgroups, where Linux manages CPU time, enforces CPU quotas, and caps memory. Actual use may exceed requests when a node has spare capacity, while scheduling still accounts for the full request. Under node pressure, the kubelet may evict pods. Controllers such as an HPA can also use requests as the basis for resource-utilization percentages. The excerpt introduces these mechanisms but does not provide enough detail to recommend specific values.

## Source excerpt

Learn how Kubernetes CPU and memory requests and limits control scheduling, cgroup weights and quotas, eviction, throttling, and OOM kills.