- 最新
- 投票最多
- 评论最多
WS Fargate allocates CPU resources in terms of AWS vCPU units. For each vCPU, Fargate provides 1024 CPU units. The CPU value you specify in your pod configuration is converted to an equivalent number of vCPU units.
In your configuration, you've specified '2' for the CPU limit and request, which means you're requesting 2 vCPUs for each pod. If you're running 500 such instances, you would indeed expect a total of 1000 vCPUs to be used.
However, EKS on Fargate has a different method for vCPU calculation. As per the official AWS documentation, the actual number of vCPUs available for your application to use is 1/2 of what is specified in the CPU value. The remaining half is reserved for system-level processes.
This could be the reason why CloudWatch shows 2000 vCPUs getting consumed. Your application is using 1000 vCPUs (2 vCPUs for each of the 500 instances), and the same amount is being used by system-level processes, leading to a total of 2000 vCPUs.
Unfortunately, there is not much you can do about this since it's a feature of how EKS on Fargate works. If the cost is higher than what you're willing to pay, you might need to consider other options like using EC2 instances for your EKS clusters or optimizing your application to use fewer resources.
相关内容
- AWS 官方已更新 7 个月前
- AWS 官方已更新 3 个月前
- AWS 官方已更新 3 年前
Thanks for your explanation. Can you please point me to the documentation that mentions about the system level processes that is accounted in the billing. Also will the memory also be doubled? In our case, we specified 16GB. Does it account for 32 GB ?