---
title: "Tech Tip #33: Right-size your Kubernetes requests (video)"
description: "Your pods reserve four times the CPU they use."
url: https://greencode.ai/shorts/33-right-size-kubernetes-requests/
---

# Tech Tip #33: Right-size your Kubernetes requests (video)

## Tech Tip #33: Right-size your Kubernetes requests

**Your pods reserve four times the CPU they use.**

[Watch the video](https://media.greencode.ai/shorts/right-size-kubernetes-requests-ac7ab3e6fb38.mp4)

Video created by [explainapaper.com](https://explainapaper.com/?utm_source=greencode.ai&utm_medium=film&utm_campaign=made-by)

### The problem

Resource requests are set once, generously, and never revisited. The scheduler reserves the capacity, so nodes fill up on paper while sitting mostly idle.

### The fix you can use today

- Compare requests with actual usage over a few weeks.
- Set requests near the 95th percentile of real use.
- Review after each release; usage changes with the code.

### Tools that help

- [GreenCode Constitution skill](https://greencode-constitution.org/?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode) (GreenCode researchers): open-source energy principles and a catalogue of 37 energy anti-patterns that an AI coding agent can follow to find and fix waste like this
- [Kepler](https://github.com/sustainable-computing-io/kepler?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode): exports energy estimates per pod and container on Kubernetes, using eBPF and hardware counters

### How GreenCode helps

GreenCode helps tackle this by mapping a running estate and rebuilding it as infrastructure as code. It attributes energy and CO2e to the services that cause it, including services that barely run. [More on this](https://greencode.ai/feature/infrastructure-carbon-footprint-assessment/).

### Tags

#kubernetes#right-sizing#docker

### Sources

- [GreenCode Constitution skill, energy anti-patterns: R4 over-provisioned Kubernetes pods: right-size CPU and memory requests to p95 actual usage](https://greencode-constitution.org/skill.md?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode)

### Transcript

Your pods may reserve four times the processor power they actually use. Resource requests are often set once, generously, and never checked again. The scheduler holds that space, even when nothing uses it. So your nodes look full on paper, while they sit mostly idle. You run more nodes than the work needs, and every node draws power. Here is the fix you can use today. Compare each request with real usage over a few weeks. Set requests near the ninety-fifth percentile of real use. Review them after each release, because usage changes with the code. GreenCode researchers list over-sized pods among the energy wastes to fix. GreenCode's Constitution skill can help an AI coding agent fix over-sized requests. Then check each pod's energy, using tools like Kepler. GreenCode helps tackle this by mapping your running systems and rebuilding them as code. It shows which services use the energy, including ones that barely run. That was GreenCode Tech Tip number thirty-three. Follow for the next tip, and find more on greencode.ai/tech-tips.

[The tip in full](https://greencode.ai/tech-tips/33-right-size-kubernetes-requests/)

[« Tech Tip #32: Quantise before you buy more GPUs](https://greencode.ai/shorts/32-quantise-before-you-scale/)[Tech Tip #34: Write the tests before you refactor »](https://greencode.ai/shorts/34-tests-before-you-refactor/)

[All GreenCode Tech Tips](https://greencode.ai/tech-tips/) · [All GreenCode videos](https://greencode.ai/videos/)

#### Key Facts

- Tip **#33**
- For **Ops and infrastructure**
- Length **1:08**
- Category **Containers, Kubernetes and serverless**
![GreenCode](https://greencode.ai/wp-content/uploads/2024/12/greencode-logo-website-small-colours-2.webp)

Want this checked on your own system? Talk to the GreenCode team.

[Get in touch](https://greencode.ai/contact/)
