01 Dec 2026

feedKubernetes Blog

Beyond CPU Utilization: Using PSI to Diagnose Kubernetes Resource Contention

I work on latency-sensitive AI inference services, where understanding why requests slow down matters. CPU utilization is one of the first things I check when investigating performance issues. But it doesn't tell me whether workloads are waiting for CPU time.

That distinction made me interested in Linux Pressure Stall Information (PSI). A node can be fully utilized with two tasks running on two CPUs, or with six tasks competing for those same CPUs. CPU utilization looks similar in both cases, but the amount of waiting can be very different.

PSI measures that waiting. Kubernetes exposes PSI through the kubelet, and the metrics are stable from Kubernetes v1.36.

I wanted to see the difference for myself, so I ran the same workload in two configurations on a Kubernetes node restricted to two CPUs. In both runs, kubectl top showed the node using 2001m of CPU, meaning both CPUs were fully busy. But CPU pressure was 0.33% in the first run and 99.63% in the second.

What CPU pressure means

CPU PSI measures how much of the time at least one task was ready to run but waiting for CPU. This is reported as some. An avg10 of 25% means that, over roughly the last 10 seconds, at least one task was waiting about a quarter of the time.

The kernel reports some as averages over the last 10, 60, and 300 seconds (avg10, avg60, avg300). I use avg10, because it reacts quickly when the workload changes. PSI also reports full, the share of time when all tasks were waiting at once; I don't use it here.

The kubelet Summary API shows CPU usage and PSI together, for the node and for each pod and container:

kubectl get --raw "/api/v1/nodes/<node-name>/proxy/stats/summary" \
 | jq '{cores: (.node.cpu.usageNanoCores / 1e9), psi: .node.cpu.psi}'

Per-pod values are under .pods[].cpu.psi. If you use Prometheus, the kubelet's /metrics/cadvisor endpoint has the same signal per container, as container_pressure_cpu_waiting_seconds_total.

Same utilization, different pressure

For the test, I used a kind cluster on a machine with four CPUs. I gave the worker node two of them and put the control plane on the other two, so the control plane didn't compete with the test workload. The workload is a small pod that runs busy loops. Each loop keeps one CPU fully busy whenever it gets one. The appendix has the full setup.

In each run, I waited 60 seconds for things to settle, then read the node's CPU pressure 12 times, 10 seconds apart. The numbers below are the average of those 12 readings.

Run A: one pod, two loops. Two loops on two CPUs, so each loop has a CPU to itself.

$ kubectl top nodes
NAME CPU(cores) CPU(%) MEMORY(bytes) MEMORY(%)
psi-demo-control-plane 53m 1% 593Mi 7%
psi-demo-worker 2001m 50% 166Mi 2%

The worker is using 2001m, so both of its CPUs are fully busy. CPU pressure was 0.33%. The loops almost never had to wait.

Run B: three pods, six loops. Six loops now compete for the same two CPUs. Only two can run at once, so the others have to wait.

$ kubectl top nodes
NAME CPU(cores) CPU(%) MEMORY(bytes) MEMORY(%)
psi-demo-control-plane 43m 1% 602Mi 7%
psi-demo-worker 2001m 50% 183Mi 2%

CPU usage is unchanged at 2001m. But CPU pressure was 99.63%: almost all the time, some loop was waiting for a CPU.

Both runs show CPU(%) as 50% because Kubernetes counts all four of the machine's CPUs as the node's capacity; it doesn't know about the two-CPU restriction.

Two bar charts. Left, CPU used in cores: run A 2.00, run B 2.00, run C 0.51, against a node capacity of 2 CPUs. Right, CPU pressure some avg10: run A under 1%, run B 99.6%, run C 75.2%.

Runs A and B use the same 2 cores on the worker node, but CPU pressure goes from under 1% to 99.6%. Run C uses a quarter of the node and still shows 75.2% pressure.

Looking at CPU usage for the individual pods showed another part of the problem:

$ kubectl top pods
NAME CPU(cores) MEMORY(bytes)
spinners-849c6d64c8-g2s9x 616m 0Mi
spinners-849c6d64c8-ggtqh 667m 0Mi
spinners-849c6d64c8-q9bvj 708m 0Mi

In run A, the one pod used 1991m. In run B, each pod uses only 616m to 708m, even though each still runs two busy loops. The lower numbers don't mean the pods need less CPU. They're sharing two CPUs. Nothing in kubectl top shows the waiting, but pod-level PSI does: the three pods' CPU pressure was 69%, 99.73%, and 99.79% in the last reading.

Low utilization, high pressure

I also tested what happens when a workload has a CPU limit and the node has spare capacity. For run C, I went back to one pod with two loops and set its CPU limit to 500m.

$ kubectl top nodes
NAME CPU(cores) CPU(%) MEMORY(bytes) MEMORY(%)
psi-demo-control-plane 55m 1% 608Mi 7%
psi-demo-worker 517m 12% 168Mi 2%

The worker used about 0.51 of its two CPUs, leaving three quarters idle; kubectl top shows 12% because Kubernetes counts four CPUs of capacity. Even so, the node's some.avg10 averaged 75.23%. The 500m limit capped the pod's CPU usage even though the worker had spare capacity. The two loops used up their CPU quota and were throttled. The container's throttling counter shows it was throttled in 1905 CFS periods since it started:

container_cpu_cfs_throttled_periods_total{container="spin",...} 1905

The PSI documentation uses a CPU-limited pod as its example. Here, the throttling counter points to the pod's limit rather than competition with other workloads, so adding node capacity wouldn't reduce this pressure while the pod's CPU limit stays at 500m.

Using PSI during an investigation

The three runs show why I'd look at CPU pressure alongside utilization when investigating a performance problem:

I wouldn't pick a universal PSI threshold. A level that's normal for a batch job could be a problem for a latency-sensitive API, so I'd compare pressure against the workload's own baseline and check whether it rose with latency or queue depth.

For the inference services I work on, latency can increase for different reasons: more processing within the service, waiting for CPU, or a slow call to another service.

These experiments helped me understand what PSI adds. If I saw latency increasing without a clear explanation from CPU utilization, I'd check pod-level CPU pressure to see whether contention or throttling might be contributing. I'd compare that with application metrics and traces before drawing a conclusion.

Appendix: reproducing the runs

I ran this on kind v0.33.0 with Kubernetes v1.36.1, the release in which PSI metrics became stable.

Requirements: a Linux host with cgroup v2, a kernel with PSI enabled, Docker, kind, kubectl, and jq, with at least 4 CPUs. Check cgroup v2 and PSI on the host:

stat -fc %T /sys/fs/cgroup # expect: cgroup2fs
cat /proc/pressure/cpu # expect: some and full lines

On macOS, I used Colima, an open source tool that runs Docker Engine in a Linux VM (installable with Homebrew): colima start --profile psi-demo --runtime docker --cpu 4 --memory 8, then run the two checks inside the VM with colima ssh --profile psi-demo -- <command>.

Create a two-node cluster with this kind-config.yaml:

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
kind create cluster --name psi-demo --image kindest/node:v1.36.1 \
 --config kind-config.yaml --wait 180s

Pin the nodes to separate CPUs. Each kind node is a Docker container, so Docker can restrict which CPUs it runs on:

docker update --cpuset-cpus="0,1" psi-demo-control-plane
docker update --cpuset-cpus="2,3" psi-demo-worker
docker exec psi-demo-worker nproc # expect: 2

Because the kind worker is a container, its node-level PSI comes from that container's cgroup rather than from the host's /proc/pressure/cpu. That's why node-level CPU full can be nonzero here; the system-wide CPU full line in /proc/pressure/cpu is always zero.

Install metrics-server for kubectl top. The --kubelet-insecure-tls flag is needed because kind's kubelet serving certificates are self-signed; don't use it outside a local test cluster.

kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.8.0/components.yaml
# See the previous warning about the --kubelet-insecure-tls flag!
kubectl -n kube-system patch deployment metrics-server --type=json \
 -p '[{"op":"add","path":"/spec/template/spec/containers/0/args/-","value":"--kubelet-insecure-tls"}]'
kubectl -n kube-system rollout status deployment/metrics-server

The workload, spinners.yaml. Each pod starts WORKERS busy loops on the worker node:

apiVersion: apps/v1
kind: Deployment
metadata:
 name: spinners
spec:
 replicas: 1
 selector:
 matchLabels:
 app: spinners
 template:
 metadata:
 labels:
 app: spinners
 spec:
 nodeSelector:
 kubernetes.io/hostname: psi-demo-worker
 containers:
 - name: spin
 image: busybox:1.36
 env:
 - name: WORKERS
 value: "2"
 command: ["sh", "-c", "for i in $(seq $WORKERS); do (while :; do :; done) & done; wait"]

Run the three cases. After each change, wait for the rollout to finish, then about 60 seconds more, before reading kubectl top and the Summary API command from earlier, using psi-demo-worker as the node name.

# Run A: 2 loops on 2 CPUs
kubectl apply -f spinners.yaml
kubectl rollout status deployment/spinners

# Run B: 6 loops on 2 CPUs
kubectl scale deployment spinners --replicas=3
kubectl rollout status deployment/spinners

# Run C: 2 loops with a 500m limit. Scale to zero and wait 5 minutes first,
# so avg10 and avg60 are back near zero after run B.
kubectl scale deployment spinners --replicas=0
sleep 300
kubectl set resources deployment spinners --limits=cpu=500m
kubectl scale deployment spinners --replicas=1
kubectl rollout status deployment/spinners

To get the averaged pressure for a run:

for i in $(seq 12); do
 kubectl get --raw /api/v1/nodes/psi-demo-worker/proxy/stats/summary \
 | jq '.node.cpu.psi.some.avg10'
 sleep 10
done | jq -s 'add / length'

This prints the mean of 12 some.avg10 readings taken about 10 seconds apart, the method used for the results above.

For run C, read the throttling counters with:

kubectl get --raw /api/v1/nodes/psi-demo-worker/proxy/metrics/cadvisor \
 | grep -E 'container_cpu_cfs_throttled_(periods|seconds)_total' | grep 'container="spin"'

Clean up:

kind delete cluster --name psi-demo
colima stop --profile psi-demo # macOS only

01 Dec 2026 6:00pm GMT

23 Nov 2026

feedKubernetes Blog

Kubernetes v1.38 Sneak Peek

As we get closer to the release date for Kubernetes v1.38, the project develops and matures, features may be deprecated, removed, or replaced with better ones for the project's overall health. This blog post outlines some of the planned changes for the Kubernetes v1.38 release that the release team feels you should be aware of for the continued maintenance of your Kubernetes environment and keeping up to date with the latest changes. The information listed below is based on the current status of the v1.38 release and may change before the actual release date.

Deprecations and removals for Kubernetes v1.38

kubectl: WebSocket opt-out environment variables removed

kubectl has used WebSockets instead of SPDY by default for kubectl exec, attach and cp since v1.30, and for kubectl port-forward since v1.31. The KUBECTL_REMOTE_COMMAND_WEBSOCKETS and KUBECTL_PORT_FORWARD_WEBSOCKETS environment variables let you turn that behavior off. These variables are going to be removed in v1.38. kubectl will then always try WebSockets first and fall back to SPDY when it needs to (the same as the current default behavior). If your scripts or CI environments set either of these environment variables, you can remove them since they will no longer have any effect.

To learn more, refer to KEP-4006: Transition from SPDY to WebSockets.

kubectl: name dropped from kuberc credential plugin allowlist entries

The kuberc file keeps kubectl user preferences separate from cluster credentials in the kubeconfig, including an allowlist of the credential plugins kubectl is allowed to run. In the beta kubectl.config.k8s.io/v1beta1 API, an allowlist entry can use name as an alias for command. The name field (not command) has been deprecated since v1.36.

With kuberc expected to graduate to stable in v1.38, the new kubectl.config.k8s.io/v1 API will not include name. If any of your allowlist entries use name, change them to command now.

To learn more, refer to KEP-3104: Separate kubectl user preferences from cluster configs.

Ongoing major changes

Future removal of cgroup v1 support

Support for cgroup v1 is being phased out. Since v1.35, the kubelet fails to start on nodes that use cgroup v1 unless you set failCgroupV1: false in the kubelet configuration. This option remains available in v1.38, but it should be treated as a short-term fix as support for cgroup v1 is planned to be removed in a future release. If you haven't already, please plan your migration to cgroup v2.

To learn more, refer to KEP-5573: Remove cgroup v1 support.

Admission webhooks no longer receive authentication and authorization review requests

Since v1.37, the ExcludeAdmissionWebhookVirtualResources feature gate has been enabled by default. With it on, validating and mutating admission webhooks no longer receive requests for (virtual) writes to TokenReview, SelfSubjectReview, SubjectAccessReview, SelfSubjectAccessReview, LocalSubjectAccessReview or SelfSubjectRulesReview. Creating or updating a webhook configuration whose rules name one of these resources returns a deprecation warning, and the API server logs any existing configurations that are affected when it starts.

If you rely on a webhook to see these requests, you can turn the feature gate off for now, but note that the gate is planned to be locked on when the feature graduates to stable.

To learn more, refer to KEP-5793: Manifest Based Admission Control Config.

Breaking changes in Kubernetes v1.38

Container runtimes must report the cgroup driver

The kubelet in v1.37 and older supported releases provides a legacy mechanism to configure the cgroup driver. The modern way to do that is via the CRI RuntimeConfig RPC, which reports the cgroup driver that the container runtime recommends using. In v1.38, the kubelet defaults to not allowing the legacy configuration mechanism: it will be both deprecated and unavailable unless explicitly re-activated. As a result, v1.38 nodes will essentially require that your container runtime is running before the kubelet starts (to look up the expected cgroup driver); if the kubelet can't get the cgroup driver from the runtime even after retrying, it will exit with an error before even registering the node.

As part of this upcoming release, the cgroupDriver field in the kubelet configuration file will be deprecated. Not only is specifying that field going to be deprecated, the kubelet will actually reject it unless you reactivate the legacy mechanism by enabling the (temporary) LegacyCgroupDriverFallback feature gate. The kubeadm tool will also no longer set cgroupDriver to systemd by default, and its preflight checks will report an error if the runtime doesn't support the RPC. If any of your nodes run an older, incompatible container runtime, you should follow the instructions in the official v1.38 release notes about how to upgrade.

To learn more, refer to KEP-4033: Discover cgroup driver from CRI and kubernetes/kubernetes#136731.

Pod-level resources: swap behavior changes on LimitedSwap nodes

If you use pod-level resources on Linux nodes that use cgroup v2 and are configured with LimitedSwap, the kubelet in v1.38 will start applying swap limits based on the Pod's pod-level memory settings. This means that Pods whose pod-level memory request equals their memory limit will get no swap at all (both for the Pod and for every container in it), even if a container sets a memory request lower than its limit. Check any workloads that rely on swap before you upgrade, and be sure to read the official release notes for v1.38 for detailed advice.

To learn more, refer to KEP-2837: Pod Level Resource Specifications.

Featured enhancements of Kubernetes v1.38

The following list of enhancements is likely to be included in the upcoming v1.38 release. This is not a commitment and the release content is subject to change.

kubectl user preferences (kuberc) graduating to stable

kuberc, the separate kubectl configuration file for user preferences such as aliases, default options and a credential plugin policy, is expected to graduate to stable in v1.38.

To learn more, read Kubectl user preferences (kuberc) or refer to KEP-3104: Separate kubectl user preferences from cluster configs.

Pod-level resources graduating to stable

Pod-level resources, which let you set CPU, memory and hugepages requests and limits for a Pod as a whole, are expected to graduate to stable in v1.38. If you run Linux nodes with LimitedSwap, see the swap behavior change above before you upgrade.

To learn more, read Assign Pod-level CPU and memory resources or refer to KEP-2837: Pod Level Resource Specifications.

DRA support for partitionable devices graduating to stable

Partitionable devices let a Dynamic Resource Allocation (DRA) driver advertise a device such as a GPU both as a whole and as smaller partitions, and the scheduler allocates only combinations that fit within the physical device. The feature is expected to graduate to stable in v1.38, and the DRAPartitionableDevices feature gate will then be locked on.

To learn more, read Partitionable devices or refer to KEP-4815: DRA: Add support for partitionable devices.

EvictionRequest API (alpha)

Evicting a Pod isn't always as simple as terminating it. Some applications may be in the middle of important work, such as data migration or cleanup, and terminating them without giving them time to prepare can cause disruptions.

The EvictionRequest API introduces a more coordinated way to evict Pods. It gives applications and controllers time to prepare before a Pod is evicted. For example, when a node needs to be drained or a Pod needs to be moved to another node, a controller can create an EvictionRequest to signal that this Pod needs to be evicted.

The eviction request controller coordinates with the responders configured for the Pod. These responders can perform application-specific tasks such as completing ongoing work, cleaning up resources, or migrating data before the Pod is terminated.

If no custom responder is available or responders don't complete the process, Kubernetes can fall back to the existing API-initiated eviction mechanism, which continues to respect PodDisruptionBudgets (PDBs). The EvictionRequest API does not replace PDBs. It gives applications a chance to participate in the eviction process.

As this is an alpha feature, you will need to enable the EvictionRequestAPI feature gate and the relevant alpha API group. Check the v1.38 release notes and documentation, once they're available, to confirm exactly what's required.

To learn more, refer to KEP-4563: EvictionRequest API.

Want to know more?

New features and deprecations are also announced in the Kubernetes release notes. We will formally announce what's new in Kubernetes v1.38 as part of the CHANGELOG for that release.

The Kubernetes v1.38 release is planned for Wednesday, December 16th, 2026. Stay tuned for updates!

You can see the announcements of changes in the release notes for:

Get involved

The simplest way to get involved with Kubernetes is by joining one of the many Special Interest Groups (SIGs) that align with your interests.

If you don't know where to start, join our monthly New Contributor Orientations where we teach the community how the project is structured, and we'll guide you on how to make your first contribution to the project.

23 Nov 2026 4:00pm GMT

16 Nov 2026

feedKubernetes Blog

Scheduling the removal of the kube-proxy IPVS backend

The ipvs backend for kube-proxy was an experiment in providing a service proxy implementation with better performance than the iptables backend. While it succeeded in that goal, the kernel IPVS API has turned out to be a bad match for the Kubernetes Services API, and the ipvs backend was never able to implement all of the edge cases of Kubernetes Service functionality correctly.

In Kubernetes 1.29, the project introduced the nftables backend for kube-proxy, which became GA in 1.33. Part of the plan behind adding the nftables backend was the idea that it would eventually replace both the iptables and ipvs backends. Because the ipvs backend in particular is complex, not 100% feature complete, and architecturally quite different from the other two backends (and thus more work to maintain), Kubernetes SIG Network decided to officially deprecate it as of Kubernetes 1.35. Although it currently remains available in kube-proxy (with a warning about its deprecation), we (Kubernetes SIG Network) now plan to remove it in Kubernetes 1.40. All ipvs users should therefore be planning to migrate to either the nftables or iptables backends.

Why was the ipvs backend written?

The ipvs backend was originally designed to fix two different kinds of performance problems in the iptables backend:

The ipvs backend solved both of these scaling problems. The data plane problem was solved mostly automatically, because the kernel IPVS subsystem uses hash tables rather than linear lookup. The control-plane problem was solved by not rewriting the entire ruleset on every update. (The kernel IPVS API doesn't have a way of doing batch updates anyway, so this was essentially forced.)

Why is the ipvs backend now being deprecated?

Almost from the start, the ipvs backend also had problems.

The first version didn't have 100% compatibility with the iptables backend, but it was assumed that this would be fixed over time. Unfortunately, the original authors moved on to other things outside the Kubernetes ecosystem (as inevitably sometimes happens in open source), and it took a while to find new people interested in maintaining the code.

Meanwhile, as people began using the ipvs backend in larger and larger clusters, its own scaling problems started to emerge. In particular, the lack of batch update operations in the IPVS API meant that while the ipvs backend was faster than iptables when making a few small changes, it was potentially slower when making a large number of changes at once. And because the IPVS API is fairly limited in what it can do, kube-proxy's ipvs backend needed to fall back to using iptables to implement various features of Kubernetes Services beyond basic "load balancing", making it run into some of the same scaling problems the iptables backend has. While the ipvs backend tried to mitigate this by using ipset for some of its rules, this again ran into the problem of not having a batch update API. Additionally, the fact that the ipvs backend uses iptables means that it has the same long-term support problem as the iptables backend: Red Hat's plan to remove the iptables API entirely from Red Hat Enterprise Linux means the ipvs kube-proxy backend will also no longer be available to Kubernetes users on RHEL.

What about IPVS schedulers?

Beyond performance, the other reason some users were excited about the ipvs backend was the ability to pick from among various IPVS "schedulers" for distributing traffic to endpoints, rather than relying on the simple random selection used by iptables (and nftables).

Unfortunately, the way IPVS is used by kube-proxy prevents it from being able to use most of the IPVS schedulers in a useful way. The problem is that kube-proxy is a distributed service that runs on all nodes in the cluster, but the kube-proxy processes on different nodes do not share their IPVS scheduler state, so each node picks endpoints without knowing what is happening with clients on any other node. Even the schedulers that are designed to work in a distributed way generally don't work better than random selection in the context of kube-proxy. For example, the mh scheduler uses Maglev Hashing to select endpoints, which theoretically allows for extremely efficient distributed load balancing. But that efficiency is only in the context of a specific sort of two-layer load-balancer design, and kube-proxy does not have the right architecture to be able to act as either of the two layers in that design.

Switching away from ipvs

Switching to nftables

If you are running Kubernetes 1.36 or later, and your nodes are running a Linux distribution with kernel 5.13 or later, and you use the ipvs proxy mode, then Kubernetes recommends switching to the nftables mode of kube-proxy. (Although the nftables backend is GA -and fully usable-as of Kubernetes 1.33, there have been some performance- and scaling-related fixes since then that that weren't backported to releases earlier than 1.36.)

The nftables backend is fully supported, feature-complete, and even has very slightly better performance than ipvs:

kube-proxy ipvs-vs-nftables first packet latency, at various percentiles, in clusters of various sizes

(Taller bars represent longer latency. The "p50" group is the average connection establishment latency. Note that even the largest numbers in this graph are quite tiny; the point is not to claim that nftables is (noticeably) faster than ipvs, just to show that, unlike iptables, it's not slower.)

Switching is as easy as changing the kube-proxy configuration and restarting kube-proxy. For example, in clusters deployed via kubeadm, change mode: ipvs to mode: nftables in the kube-proxy ConfigMap and then restart the kube-proxy pods, as described in the documentation on reconfiguring a kubeadm cluster. (If you are overriding other ipvs-specific kube-proxy configuration, you will also need to change those options to the corresponding nftables ones.)

Switching to iptables: "It's Not As Slow As You Think!"

If you can't switch to nftables, either because you are on an older version of Kubernetes, or because your cluster runs on an older Linux distribution that isn't new enough to support the nftables backend, you may be able to just switch to the iptables backend, which has improved greatly since the original creation of the ipvs backend in 2017:

The net result of this is that the iptables backend of 2026, while still not as good as the ipvs backend, is at least much better than the iptables backend of 2017 was, and many people who found iptables unusable in the past would not have problems with it now.

As with switching to nftables, switching to iptables is mostly just a matter of updating your kube-proxy configuration, although for technical reasons, in this case we recommend that you reboot each node after changing the kube-proxy configuration, rather than merely restarting kube-proxy.

Learn more

16 Nov 2026 6:35pm GMT