Add descriptions of CPU and Memory metrics (#18689)

* Add descriptions of CPU and Memory metrics

* Update content/en/docs/tasks/debug-application-cluster/resource-metrics-pipeline.md

Co-Authored-By: Tim Bannister <tim@scalefactory.com>

* address comments

Co-authored-by: Tim Bannister <tim@scalefactory.com>
This commit is contained in:
David Ashpole
2020-01-15 03:13:32 -08:00
committed by Kubernetes Prow Robot
parent 51aaacaf76
commit 3a7e506a90
@@ -37,6 +37,16 @@ repository. You can find more information about the API there.
The API requires metrics server to be deployed in the cluster. Otherwise it will be not available.
{{< /note >}}
## Measuring Resource Usage
### CPU
CPU is reported as the average usage, in [CPU cores](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-cpu), over a period of time. This value is derived by taking a rate over a cumulative CPU counter provided by the kernel (in both Linux and Windows kernels). The kubelet chooses the window for the rate calculation.
### Memory
Memory is reported as the working set, in bytes, at the instant the metric was collected. In an ideal world, the "working set" is the amount of memory in-use that cannot be freed under memory pressure. However, calculation of the working set varies by host OS, and generally makes heavy use of heuristics to produce an estimate. It includes all anonymous (non-file-backed) memory since kubernetes does not support swap. The metric typically also includes some cached (file-backed) memory, because the host OS cannot always reclaim such pages.
## Metrics Server
[Metrics Server](https://github.com/kubernetes-incubator/metrics-server) is a cluster-wide aggregator of resource usage data.