API Server Memory Details Test

The Kubernetes Master Node API Server is a core component of the Kubernetes control plane responsible for exposing the Kubernetes API. Its memory usage is a critical factor in ensuring the cluster's stability and performance, as it must handle API requests, maintain cluster state, and cache information.

Monitoring the API Server memory usage is crucial because the Kubernetes API Server is the backbone of the control plane, responsible for managing and coordinating the entire cluster. Any performance issues, particularly memory-related, can severely impact the health, scalability, and reliability of the cluster.

The Kubelet API Server Memory Details Test continuously monitors the memory usage in the target node and reports key metrics like memory size, heap memory in use etc. These metrics are invaluable for the administrators to ensure that service is up and prevent any issues in case service has problems.

Target of the test : A Kubernetes Master Node

Agent deploying the test : A remote agent

Outputs of the test : One set of results for the target Kubernetes Master node being monitored

Configurable parameters for the test

Parameter

Description

Test Period

How often should the test be executed.

Host

The IP address of the host for which this test is to be configured.

Port

Specify the port at which the specified Host listens. By default, this is 6443.

Timeout

Specify the duration (in seconds) beyond which the test will timeout in the Timeout text box. The default value is 10 seconds.

Metric URL

Each of the Kubernetes system components expose monitoring metrics through /metrics endpoint of the HTTP server. For components that don't expose endpoint by default, refer official Kubernetes distribution documentation site. Specify the metric URL textbox.

Measurements made by the test

Measurement

Description

Measurement Unit

Interpretation

Memory used by profiling bucket hash table

Indicates the memory consumed by internal data structures maintained by the Go runtime for profiling purposes

MB

The profiling bucket hash table in the Kubernetes API Server (or any Go application) consumes memory to store profiling data, such as stack traces and allocation samples.

Mallocs

Indicates the number memory allocations performed on the heap.

Number

Monitoring mallocs is important to understand memory usage patterns, diagnose performance issues, and optimize resource usage.

Memory size

Indicates the total amount of memory being used or allocated by the system at any given time.

MB

This includes heap memory (dynamically allocated memory), stack memory, memory used for internal data structures, and memory managed by the operating system for caching and buffers.

Allocated heap memory and still in use

Indicates the memory still in use refers to memory that was allocated dynamically.

MB

This is typically measured as part of the heap allocation statistics in Go's runtime.

Heap memory waiting to be used

Indicates the memory that has been allocated but is not currently in active use.

MB

 

Used heap memory

Indicates the memory that has been allocated and is currently in use.

MB

 

Heap memory released to OS

Indicates the amount of unused memory from the heap returned back to the operating system after it has been allocated but is no longer needed.

MB

This happens when Go's garbage collector (GC) reclaims memory that was previously allocated but is no longer referenced by the application.

Heap memory

Indicates the total memory available for allocation on current node.

MB

 

Heap memory in-use before next GC

Indicates the memory that has been allocated and is currently in use right before the GC cycle.

MB

 

Used cache memory

Indicates the amount of cache memory allocated and in use currently.

MB

This cached memory is part of the overall heap memory usage and is critical for the efficient operation of the control plane.

Cache memory

Indicates the total cache memory available for allocation.

MB

 

Used span memory

Indicates the amount of span memory allocated and used currently.

MB

A span is a contiguous block of memory used to allocate smaller objects.

Span memory

Indicates the total span memory available for allocation.

MB

 

Used stack memory

Indicates the amount of stack memory allocated and used currently.

MB

Stack memory is used for program variable allocation.

Stack memory

Indicates the total span memory available for allocation.

MB

 

Memory used by garbage collection system metadata

Indicates the total memory used for storing system metadata for garbage collector.

MB