79753572

Date: 2025-09-02 13:52:43
Score: 0.5
Natty:
Report link

Based on your given observations, you're most likely having CPU throttling in your containers, causing the performance regression. Locally, there's no quota enforcement, so your app can freely use 100% of the available vCPUs across all cores without interruption, as what you can see in your htop monitoring. Meanwhile, Kubernetes uses Linux Completely Fair Scheduler (CFS) that restricts your container’s cgroup CPU usage (that you set at 95% of your node's vCPUs) within short periods of time (default is at 100ms).

Even though the limit you set is high, your multi-threaded workload can exceed the allocated CPU time in these brief intervals, triggering throttling even when the node has spare capacity. This causes threads to pause, increase context switching, and reduce effective CPU utilization, which explains the 3-4x slowdown in Kubernetes compared to your local or EC2 deployments.

Also refer to this article that might be useful to you.

Reasons:
  • Blacklisted phrase (1): this article
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: トトロ