website icon indicating copy to clipboard operation
website copied to clipboard

Issue with k8s.io/docs/concepts/configuration/manage-compute-resources-container/

Open chrissound opened this issue 9 years ago • 8 comments

The spec.containers[].resources.limits.cpu is converted to its millicore value, multiplied by 100000, and then divided by 1000.

chrissound avatar Aug 08 '17 19:08 chrissound

@chrissound : The description does not state the issue with the given sentence. Please provide more information to take it forward.

radhikapc avatar Aug 14 '17 18:08 radhikapc

Surely the value would just be multiplied by 100 rather than multiplied by 100000, and then divided by 1000?

(x * 100000) / 1000 is equal to x * 100.

chrissound avatar Aug 15 '17 07:08 chrissound

@vishh Heya. 👋 Can you shed some light on pod resources, specifically the math here:

The spec.containers[].resources.limits.cpu is converted to its millicore value, multiplied by 100000, and then divided by 1000.

Is there a reason why we don't simply say, for example:

The spec.containers[].resources.limits.cpu is converted to its millicore value and multiplied by 100.

Thanks in advance!

zacharysarah avatar Aug 15 '17 18:08 zacharysarah

@zacharysarah Just clarified in the PR - https://github.com/kubernetes/kubernetes.github.io/pull/4952/files#r133273014

vishh avatar Aug 15 '17 18:08 vishh

That 's easy. I'm thinking you should understand the relationship between --cpu-quota and --cpu-period parameters.Besides, the meaning of millicore.May be helps to you@chrissound

stewart-yu avatar Aug 16 '17 01:08 stewart-yu

"multiplied by 100000, and then divided by 1000" can explain the compute process of result.Just "multiplied by 100" may be confused.@radhikapc @zacharysarah @vishh

stewart-yu avatar Aug 16 '17 02:08 stewart-yu

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta. /lifecycle stale

fejta-bot avatar Jan 03 '18 03:01 fejta-bot

I think this is safe to close now.

tengqm avatar Jan 03 '18 07:01 tengqm