From 3a7e506a904cd41c702362a10dd8ce34d4f49675 Mon Sep 17 00:00:00 2001 From: David Ashpole Date: Wed, 15 Jan 2020 03:13:32 -0800 Subject: [PATCH] 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 * address comments Co-authored-by: Tim Bannister --- .../resource-metrics-pipeline.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/content/en/docs/tasks/debug-application-cluster/resource-metrics-pipeline.md b/content/en/docs/tasks/debug-application-cluster/resource-metrics-pipeline.md index 5f4dd6b7c9..45ad12506f 100644 --- a/content/en/docs/tasks/debug-application-cluster/resource-metrics-pipeline.md +++ b/content/en/docs/tasks/debug-application-cluster/resource-metrics-pipeline.md @@ -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.