You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins.md
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -199,7 +199,7 @@ service PodResourcesLister {
199
199
200
200
The `List` endpoint provides information on resources of running pods, with details such as the
201
201
id of exclusively allocated CPUs, device id as it was reported by device plugins and id of
202
-
the NUMA node where these devices are allocated.
202
+
the NUMA node where these devices are allocated. Also, for NUMA-based machines, it contains the information about memory and hugepages reserved for a container.
203
203
204
204
```gRPC
205
205
// ListPodResourcesResponse is the response returned by List function
@@ -219,6 +219,14 @@ message ContainerResources {
219
219
string name = 1;
220
220
repeated ContainerDevices devices = 2;
221
221
repeated int64 cpu_ids = 3;
222
+
repeated ContainerMemory memory = 4;
223
+
}
224
+
225
+
// ContainerMemory contains information about memory and hugepages assigned to a container
226
+
message ContainerMemory {
227
+
string memory_type = 1;
228
+
uint64 size = 2;
229
+
TopologyInfo topology = 3;
222
230
}
223
231
224
232
// Topology describes hardware topology of the resource
@@ -247,6 +255,7 @@ It provides more information than kubelet exports to APIServer.
The Kubernetes *Memory Manager* enables the feature of guaranteed memory (and hugepages) allocation for pods in the `Guaranteed` {{< glossary_tooltip text="QoS class" term_id="qos-class" >}}.
17
17
@@ -29,12 +29,14 @@ To align memory resources with other requested resources in a Pod Spec:
29
29
- the CPU Manager should be enabled and proper CPU Manager policy should be configured on a Node. See [control CPU Management Policies](/docs/tasks/administer-cluster/cpu-management-policies/);
30
30
- the Topology Manager should be enabled and proper Topology Manager policy should be configured on a Node. See [control Topology Management Policies](/docs/tasks/administer-cluster/topology-manager/).
31
31
32
-
Support for the Memory Manager requires `MemoryManager`[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) to be enabled.
32
+
Starting from v1.22, the Memory Manager is enabled by default through `MemoryManager`[feature gate](/docs/reference/command-line-tools-reference/feature-gates/).
33
33
34
-
That is, the `kubelet` must be started with the following flag:
34
+
Preceding v1.22, the `kubelet` must be started with the following flag:
35
35
36
36
`--feature-gates=MemoryManager=true`
37
37
38
+
in order to enable the Memory Manager feature.
39
+
38
40
## How Memory Manager Operates?
39
41
40
42
The Memory Manager currently offers the guaranteed memory (and hugepages) allocation for Pods in Guaranteed QoS class. To immediately put the Memory Manager into operation follow the guidelines in the section [Memory Manager configuration](#memory-manager-configuration), and subsequently, prepare and deploy a `Guaranteed` pod as illustrated in the section [Placing a Pod in the Guaranteed QoS class](#placing-a-pod-in-the-guaranteed-qos-class).
@@ -211,6 +213,10 @@ The following means can be used to troubleshoot the reason why a pod could not b
211
213
- pod status - indicates topology affinity errors
212
214
- system logs - include valuable information for debugging, e.g., about generated hints
213
215
- state file - the dump of internal state of the Memory Manager (includes [Node Map and Memory Maps][2])
216
+
- starting from v1.22, the [device plugin resource API](#device-plugin-resource-api) can be used
217
+
to retrieve information about the memory reserved for containers
218
+
219
+
214
220
215
221
### Pod status (TopologyAffinityError) {#TopologyAffinityError}
216
222
@@ -358,6 +364,10 @@ For example, the total amount of free "conventional" memory in the group can be
358
364
359
365
The line `"systemReserved":3221225472` indicates that the administrator of this node reserved `3221225472` bytes (i.e. `3Gi`) to serve kubelet and system processes at NUMA node `0`, by using `--reserved-memory` flag.
360
366
367
+
### Device plugin resource API
368
+
369
+
By employing the [API](/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/), the information about reserved memory for each container can be retrieved, which is contained in protobuf `ContainerMemory` message. This information can be retrieved solely for pods in Guaranteed QoS class.
0 commit comments