Skip to content
This repository has been archived by the owner on Dec 1, 2018. It is now read-only.

cpu usage unit is ns,How to correspond to percent? #650

Closed
ttllyy opened this issue Oct 13, 2015 · 3 comments
Closed

cpu usage unit is ns,How to correspond to percent? #650

ttllyy opened this issue Oct 13, 2015 · 3 comments

Comments

@ttllyy
Copy link

ttllyy commented Oct 13, 2015

/api/v1/model/namespaces/{namespace-name}/pods/{pod-name}/metrics/cpu-usage
Returns a set of (Timestamp, Value) pairs for the requested pod-level metric

cpu usage unit is ns,How to correspond to percent?
Every timestamp, How much is the total time?

@vishh
Copy link
Contributor

vishh commented Oct 13, 2015

If a process were to run on one cpu continuously for a second, its usage
will be 1e+9 nanoseconds. If it ran on n cores continuously its usage
will n * 1e+9 nanoseconds. Does this make sense?

Percentage will be usage_in_nanoseconds / (capacity_in_absolute_cores *
1e+9).

Meanwhile we are also working on adding an utilization metric.

On Mon, Oct 12, 2015 at 7:03 PM, ttllyy notifications@github.com wrote:

/api/v1/model/namespaces/{namespace-name}/pods/{pod-name}/metrics/cpu-usage
Returns a set of (Timestamp, Value) pairs for the requested pod-level
metric

cpu usage unit is ns,How to correspond to percent?
Every timestamp, How much is the total time?


Reply to this email directly or view it on GitHub
#650.

@piosz
Copy link
Contributor

piosz commented Sep 3, 2016

Since there was no follow up, I assume @vishh's clarification fixed the issue.

@piosz piosz closed this as completed Sep 3, 2016
@shayeeb-ahmed
Copy link

shayeeb-ahmed commented Mar 5, 2018

@vishh Can u please still elaborate about the cpu metric shown in :10255/stats/summary

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants