3 ms·
requests do not constrain anything, it more or less specifies proportion CPU time is allocated when contention occurs. 50m req pod can be cut off from CPU compl
by rossmohax 7y ago
requests do not constrain anything, it more or less specifies proportion CPU time is allocated when contention occurs. 50m req pod can be cut off from CPU completely by runaway 500m pod to the point it starts timing out and failing readiness pod. Or worse these effects start to be seen on kubelet, which almost nobody runs with a low enough GOMAXPROCS. Setting limits keeps node healthy.
- dilyevsky 7y agoIt will constrain it to its proportional share, as you noted, but only during contention (which is a feature not a bug). Thus 50m pod will get 1/10th of cycles of 500m pod which is WAI. In case of fully subscribed node former pod will get exactly 50/(1000 * number of allocatable cores) share so I don’t see how that would cause issues provided that pod can actually survive on such small slice in the first place. Kubelet has its own cgroup in hierarchy above pods and should set its cpu shares there as well (most cloud providers already do this).
- dilyevsky 7y agoAlso I suggest reading original paper for cfs quota, it explains motivation pretty well. The only two reasons to set cpu limits I’m aware of is to force pods onto dedicated cores (which doesn’t work on gke as of 1.13) and if you run some sort of pay-per-use compute platform for external users.