Skip to content

Commit 45a1150

Browse files
authored
Merge pull request #28056 from cynepco3hahue/fix_memory_manager_policies
memory manager: update policies names according to the code
2 parents 46045cf + 0b82654 commit 45a1150

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

content/en/docs/tasks/administer-cluster/memory-manager.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ The Memory Manager updates the Node Map during the startup and runtime as follow
5151

5252
This occurs once a node administrator employs `--reserved-memory` (section [Reserved memory flag](#reserved-memory-flag)). In this case, the Node Map becomes updated to reflect this reservation as illustrated in [Memory Manager KEP: Memory Maps at start-up (with examples)][5].
5353

54-
The administrator must provide `--reserved-memory` flag when `static` policy is configured.
54+
The administrator must provide `--reserved-memory` flag when `Static` policy is configured.
5555

5656
### Runtime
5757

@@ -61,29 +61,29 @@ Important topic in the context of Memory Manager operation is the management of
6161

6262
## Memory Manager configuration
6363

64-
Other Managers should be first pre-configured (section [Pre-configuration](#pre-configuration)). Next, the Memory Manger feature should be enabled (section [Enable the Memory Manager feature](#enable-the-memory-manager-feature)) and be run with `static` policy (section [static policy](#static-policy)). Optionally, some amount of memory can be reserved for system or kubelet processes to increase node stability (section [Reserved memory flag](#reserved-memory-flag)).
64+
Other Managers should be first pre-configured (section [Pre-configuration](#pre-configuration)). Next, the Memory Manger feature should be enabled (section [Enable the Memory Manager feature](#enable-the-memory-manager-feature)) and be run with `Static` policy (section [Static policy](#static-policy)). Optionally, some amount of memory can be reserved for system or kubelet processes to increase node stability (section [Reserved memory flag](#reserved-memory-flag)).
6565

6666
### Policies
6767

6868
Memory Manager supports two policies. You can select a policy via a `kubelet` flag `--memory-manager-policy`.
6969

7070
Two policies can be selected:
7171

72-
* `none` (default)
73-
* `static`
72+
* `None` (default)
73+
* `Static`
7474

75-
#### none policy {#policy-none}
75+
#### None policy {#policy-none}
7676

7777
This is the default policy and does not affect the memory allocation in any way.
7878
It acts the same as if the Memory Manager is not present at all.
7979

80-
The `none` policy returns default topology hint. This special hint denotes that Hint Provider (Memory Manger in this case) has no preference for NUMA affinity with any resource.
80+
The `None` policy returns default topology hint. This special hint denotes that Hint Provider (Memory Manger in this case) has no preference for NUMA affinity with any resource.
8181

82-
#### static policy {#policy-static}
82+
#### Static policy {#policy-static}
8383

84-
In the case of the `Guaranteed` pod, the `static` Memory Manger policy returns topology hints relating to the set of NUMA nodes where the memory can be guaranteed, and reserves the memory through updating the internal [NodeMap][2] object.
84+
In the case of the `Guaranteed` pod, the `Static` Memory Manger policy returns topology hints relating to the set of NUMA nodes where the memory can be guaranteed, and reserves the memory through updating the internal [NodeMap][2] object.
8585

86-
In the case of the `BestEffort` or `Burstable` pod, the `static` Memory Manager policy sends back the default topology hint as there is no request for the guaranteed memory, and does not reserve the memory in the internal [NodeMap][2] object.
86+
In the case of the `BestEffort` or `Burstable` pod, the `Static` Memory Manager policy sends back the default topology hint as there is no request for the guaranteed memory, and does not reserve the memory in the internal [NodeMap][2] object.
8787

8888
### Reserved memory flag
8989

@@ -100,7 +100,7 @@ The Memory Manager will not use this reserved memory for the allocation of conta
100100

101101
For example, if you have a NUMA node "NUMA0" with `10Gi` of memory available, and the `--reserved-memory` was specified to reserve `1Gi` of memory at "NUMA0", the Memory Manager assumes that only `9Gi` is available for containers.
102102

103-
You can omit this parameter, however, you should be aware that the quantity of reserved memory from all NUMA nodes should be equal to the quantity of memory specified by the [Node Allocatable feature](/docs/tasks/administer-cluster/reserve-compute-resources/). If at least one node allocatable parameter is non-zero, you will need to specify `--reserved-memory` for at least one NUMA node. In fact, `eviction-hard` threshold value is equal to `100Mi` by default, so if `static` policy is used, `--reserved-memory` is obligatory.
103+
You can omit this parameter, however, you should be aware that the quantity of reserved memory from all NUMA nodes should be equal to the quantity of memory specified by the [Node Allocatable feature](/docs/tasks/administer-cluster/reserve-compute-resources/). If at least one node allocatable parameter is non-zero, you will need to specify `--reserved-memory` for at least one NUMA node. In fact, `eviction-hard` threshold value is equal to `100Mi` by default, so if `Static` policy is used, `--reserved-memory` is obligatory.
104104

105105
Also, avoid the following configurations:
106106
1. duplicates, i.e. the same NUMA node or memory type, but with a different value;
@@ -152,7 +152,7 @@ Here is an example of a correct configuration:
152152
--feature-gates=MemoryManager=true
153153
--kube-reserved=cpu=4,memory=4Gi
154154
--system-reserved=cpu=1,memory=1Gi
155-
--memory-manager-policy=static
155+
--memory-manager-policy=Static
156156
--reserved-memory 0:memory=3Gi --reserved-memory 1:memory=2148Mi
157157
```
158158
Let us validate the configuration above:
@@ -163,7 +163,7 @@ Let us validate the configuration above:
163163

164164
## Placing a Pod in the Guaranteed QoS class
165165

166-
If the selected policy is anything other than `none`, the Memory Manager identifies pods that are in the `Guaranteed` QoS class. The Memory Manager provides specific topology hints to the Topology Manager for each `Guaranteed` pod. For pods in a QoS class other than `Guaranteed`, the Memory Manager provides default topology hints to the Topology Manager.
166+
If the selected policy is anything other than `None`, the Memory Manager identifies pods that are in the `Guaranteed` QoS class. The Memory Manager provides specific topology hints to the Topology Manager for each `Guaranteed` pod. For pods in a QoS class other than `Guaranteed`, the Memory Manager provides default topology hints to the Topology Manager.
167167

168168
The following excerpts from pod manifests assign a pod to the `Guaranteed` QoS class.
169169

@@ -270,7 +270,7 @@ spec:
270270
Next, let us log into the node where it was deployed and examine the state file in `/var/lib/kubelet/memory_manager_state`:
271271
```json
272272
{
273-
"policyName":"static",
273+
"policyName":"Static",
274274
"machineState":{
275275
"0":{
276276
"numberOfAssignments":1,

0 commit comments

Comments
 (0)