[英]Understanding Kubernetes pod resource utilization in GCP monitoring
let's say I have the following resource requests:假设我有以下资源请求:
And I have the following limits:我有以下限制:
And I have the following utilization我有以下用途
Question... Is utilization % of limits or % of requests?问题... 利用率是限制的百分比还是请求的百分比?
My presumption is it would be % of limits.我的假设是这将是限制的百分比。 So then if I want my cpu at 75% utilization I would just have to scale it down which would get me to
200m
using the math below那么,如果我希望我的 CPU 利用率为 75%,我只需要按比例缩小它,使用下面的数学运算可以使我达到
200m
(15.01%*1000)/0.75 = 200
[Update] [更新]
you are correct.你是对的。
kubectl top pod
also presents the current usage in millicores, so it can also be used to calculate a possible limit reduction. kubectl top pod
还以毫核为单位显示当前使用情况,因此它还可用于计算可能的限制减少量。
kubectl top pod | grep prometheus-k8s | awk '{print $2}
405m
So I set my limit with.所以我设置了我的限制。 (405 * 100) / 75 = 540m
(405 * 100) / 75 = 540m
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.