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
Worker latency profiles are multiple sets of carefully-tuned values for the `node-status-update-frequency`, `node-monitor-grace-period`, `default-not-ready-toleration-seconds` and `default-unreachable-toleration-seconds` parameters. These parameters let you control the reaction of the cluster to latency issues without needing to determine the best values manually.
9
+
Worker latency profiles are four different categories of carefully-tuned parameters. The four parameters which implement these values are `node-status-update-frequency`, `node-monitor-grace-period`, `default-not-ready-toleration-seconds` and `default-unreachable-toleration-seconds`. These parameters can use values which allow you control the reaction of the cluster to latency issues without needing to determine the best values using manual methods.
10
+
11
+
[IMPORTANT]
12
+
====
13
+
Setting these parameters manually is not supported. Incorrect parameter settings adversely affect cluster stability.
14
+
====
12
15
13
16
All worker latency profiles configure the following parameters:
14
17
15
18
--
16
-
* `node-status-update-frequency`. Specifies the amount of time in seconds that a kubelet updates its status to the Kubernetes Controller Manager Operator.
17
-
* `node-monitor-grace-period`. Specifies the amount of time in seconds that the Kubernetes Controller Manager Operator waits for an update from a kubelet before marking the node unhealthy and adding the `node.kubernetes.io/not-ready` or `node.kubernetes.io/unreachable` taint to the node.
18
-
* `default-not-ready-toleration-seconds`. Specifies the amount of time in seconds after marking a node unhealthy that the Kubernetes Controller Manager Operator waits before evicting pods from that node.
19
-
* `default-unreachable-toleration-seconds`. Specifies the amount of time in seconds after marking a node unreachable that the Kubernetes Controller Manager Operator waits before evicting pods from that node.
19
+
node-status-update-frequency:: Specifies how often the kubelet posts node status to the API server.
20
+
node-monitor-grace-period:: Specifies the amount of time in seconds that the Kubernetes Controller Manager waits for an update from a kubelet before marking the node unhealthy and adding the `node.kubernetes.io/not-ready` or `node.kubernetes.io/unreachable` taint to the node.
21
+
default-not-ready-toleration-seconds:: Specifies the amount of time in seconds after marking a node unhealthy that the Kube API Server Operator waits before evicting pods from that node.
22
+
default-unreachable-toleration-seconds:: Specifies the amount of time in seconds after marking a node unreachable that the Kube API Server Operator waits before evicting pods from that node.
20
23
--
21
24
22
-
[IMPORTANT]
23
-
====
24
-
Manually modifying the `node-monitor-grace-period` parameter is not supported.
25
-
====
26
-
27
25
The following Operators monitor the changes to the worker latency profiles and respond accordingly:
28
26
29
27
* The Machine Config Operator (MCO) updates the `node-status-update-frequency` parameter on the worker nodes.
30
-
* The Kubernetes Controller Manager Operator updates the `node-monitor-grace-period` parameter on the control plane nodes.
31
-
* The Kubernetes API Server Operator updates the `default-not-ready-toleration-seconds` and `default-unreachable-toleration-seconds` parameters on the control plance nodes.
28
+
* The Kubernetes Controller Manager updates the `node-monitor-grace-period` parameter on the control plane nodes.
29
+
* The Kubernetes API Server Operator updates the `default-not-ready-toleration-seconds` and `default-unreachable-toleration-seconds` parameters on the control plane nodes.
32
30
33
31
ifndef::openshift-rosa,openshift-dedicated[]
34
32
Although the default configuration works in most cases, {product-title} offers two other worker latency profiles for situations where the network is experiencing higher latency than usual. The three worker latency profiles are described in the following sections:
Although the default configuration works in most cases, {product-title} offers a second worker latency profile for situations where the network is experiencing higher latency than usual. The two worker latency profiles are described in the following sections:
38
36
endif::openshift-rosa,openshift-dedicated[]
39
37
40
-
Default worker latency profile:: With the `Default` profile, each kubelet reports its node status to the Kubelet Controller Manager Operator (kube controller) every 10 seconds. The Kubelet Controller Manager Operator checks the kubelet for a status every 5 seconds.
38
+
Default worker latency profile:: With the `Default` profile, each `Kubelet` updates it's status every 10 seconds (`node-status-update-frequency`). The `Kube Controller Manager`checks the statuses of `Kubelet`every 5 seconds (`node-monitor-grace-period`).
41
39
+
42
-
The Kubernetes Controller Manager Operator waits 40 seconds for a status update before considering that node unhealthy. It marks the node with the `node.kubernetes.io/not-ready` or `node.kubernetes.io/unreachable` taint and evicts the pods on that node. If a pod on that node has the `NoExecute` toleration, the pod gets evicted in 300 seconds. If the pod has the `tolerationSeconds` parameter, the eviction waits for the period specified by that parameter.
40
+
The Kubernetes Controller Manager waits 40 seconds for a status update from `Kubelet` before considering the `Kubelet` unhealthy. If no status is made available to the Kubernetes Controller Manager, it then marks the node with the `node.kubernetes.io/not-ready` or `node.kubernetes.io/unreachable` taint and evicts the pods on that node.
41
+
+
42
+
If a pod on that node has the `NoExecute` taint, the pod is run according to `tolerationSeconds`. If the pod has no taint, it will be evicted in 300 seconds (`default-not-ready-toleration-seconds` and `default-unreachable-toleration-seconds` settings of the `Kube API Server`).
43
43
+
44
44
[cols="2,1,2,1"]
45
45
|===
@@ -54,21 +54,21 @@ The Kubernetes Controller Manager Operator waits 40 seconds for a status update
54
54
| `node-monitor-grace-period`
55
55
| 40s
56
56
57
-
| Kubernetes API Server
57
+
| Kubernetes API Server Operator
58
58
| `default-not-ready-toleration-seconds`
59
59
| 300s
60
60
61
-
| Kubernetes API Server
61
+
| Kubernetes API Server Operator
62
62
| `default-unreachable-toleration-seconds`
63
63
| 300s
64
64
65
65
|===
66
66
67
67
Medium worker latency profile:: Use the `MediumUpdateAverageReaction` profile if the network latency is slightly higher than usual.
68
68
+
69
-
The `MediumUpdateAverageReaction` profile reduces the frequency of kubelet updates to 20 seconds and changes the period that the Kubernetes Controller Manager Operator waits for those updates to 2 minutes. The pod eviction period for a pod on that node is reduced to 60 seconds. If the pod has the `tolerationSeconds` parameter, the eviction waits for the period specified by that parameter.
69
+
The `MediumUpdateAverageReaction` profile reduces the frequency of kubelet updates to 20 seconds and changes the period that the Kubernetes Controller Manager waits for those updates to 2 minutes. The pod eviction period for a pod on that node is reduced to 60 seconds. If the pod has the `tolerationSeconds` parameter, the eviction waits for the period specified by that parameter.
70
70
+
71
-
The Kubernetes Controller Manager Operator waits for 2 minutes to consider a node unhealthy. In another minute, the eviction process starts.
71
+
The Kubernetes Controller Manager waits for 2 minutes to consider a node unhealthy. In another minute, the eviction process starts.
72
72
+
73
73
[cols="2,1,2,1"]
74
74
|===
@@ -83,22 +83,23 @@ The Kubernetes Controller Manager Operator waits for 2 minutes to consider a nod
83
83
| `node-monitor-grace-period`
84
84
| 2m
85
85
86
-
| Kubernetes API Server
86
+
| Kubernetes API Server Operator
87
87
| `default-not-ready-toleration-seconds`
88
88
| 60s
89
89
90
-
| Kubernetes API Server
90
+
| Kubernetes API Server Operator
91
91
| `default-unreachable-toleration-seconds`
92
92
| 60s
93
93
94
94
|===
95
95
96
96
ifndef::openshift-rosa,openshift-dedicated[]
97
+
97
98
Low worker latency profile:: Use the `LowUpdateSlowReaction` profile if the network latency is extremely high.
98
99
+
99
-
The `LowUpdateSlowReaction` profile reduces the frequency of kubelet updates to 1 minute and changes the period that the Kubernetes Controller Manager Operator waits for those updates to 5 minutes. The pod eviction period for a pod on that node is reduced to 60 seconds. If the pod has the `tolerationSeconds` parameter, the eviction waits for the period specified by that parameter.
100
+
The `LowUpdateSlowReaction` profile reduces the frequency of kubelet updates to 1 minute and changes the period that the Kubernetes Controller Manager waits for those updates to 5 minutes. The pod eviction period for a pod on that node is reduced to 60 seconds. If the pod has the `tolerationSeconds` parameter, the eviction waits for the period specified by that parameter.
100
101
+
101
-
The Kubernetes Controller Manager Operator waits for 5 minutes to consider a node unhealthy. In another minute, the eviction process starts.
102
+
The Kubernetes Controller Manager waits for 5 minutes to consider a node unhealthy. In another minute, the eviction process starts.
102
103
+
103
104
[cols="2,1,2,1"]
104
105
|===
@@ -113,11 +114,11 @@ The Kubernetes Controller Manager Operator waits for 5 minutes to consider a nod
= Example steps for displaying resulting values of workerLatencyProfile
9
+
10
+
You can display the values in the `workerLatencyProfile` with the following commands.
11
+
12
+
.Verification
13
+
14
+
. Check the `default-not-ready-toleration-seconds` and `default-unreachable-toleration-seconds` fields output by the Kube API Server:
15
+
+
16
+
[source,terminal]
17
+
----
18
+
$ oc get KubeAPIServer -o yaml | grep -A 1 default-
19
+
----
20
+
+
21
+
.Example output
22
+
[source,terminal]
23
+
----
24
+
default-not-ready-toleration-seconds:
25
+
- "300"
26
+
default-unreachable-toleration-seconds:
27
+
- "300"
28
+
----
29
+
30
+
. Check the values of the `node-monitor-grace-period` field from the Kube Controller Manager:
31
+
+
32
+
[source,terminal]
33
+
----
34
+
$ oc get KubeControllerManager -o yaml | grep -A 1 node-monitor
35
+
----
36
+
+
37
+
.Example output
38
+
[source,terminal]
39
+
----
40
+
node-monitor-grace-period:
41
+
- 40s
42
+
----
43
+
44
+
. Check the `nodeStatusUpdateFrequency` value from the Kubelet. Set the directory `/host` as the root directory within the debug shell. By changing the root directory to `/host`, you can run binaries contained in the host’s executable paths:
= Implementing worker latency profiles at cluster creation
8
+
9
+
[IMPORTANT]
10
+
====
11
+
To edit the configuration of the installer, you will first need to use the command `openshift-install create manifests` to create the default node manifest as well as other manifest YAML files. This file structure must exist before we can add workerLatencyProfile. The platform on which you are installing may have varying requirements. Refer to the Installing section of the documentation for your specific platform.
12
+
====
13
+
14
+
The `workerLatencyProfile` must be added to the manifest in the following sequence:
15
+
16
+
. Create the manifest needed to build the cluster, using a folder name appropriate for your installation.
17
+
. Create a YAML file to define `config.node`. The file must be in the `manifests` directory.
18
+
. When defining `workerLatencyProfile` in the manifest for the first time, specify any of the profiles at cluster creation time: `Default`, `MediumUpdateAverageReaction` or `LowUpdateSlowReaction`.
19
+
20
+
.Verification
21
+
* Here is an example manifest creation showing the `spec.workerLatencyProfile``Default` value in the manifest file:
* Edit the manifest and add the value. In this example we use `vi` to show an example manifest file with the "Default" `workerLatencyProfile` value added:
28
+
+
29
+
[source,terminal]
30
+
----
31
+
$ vi <cluster-install-dir>/manifests/config-node-default-profile.yaml
To implement a worker latency profile to deal with network latency, edit the `node.config` object to add the name of the profile. You can change the profile at any time as latency increases or decreases.
9
+
To change a worker latency profile to deal with network latency, edit the `node.config` object to add the name of the profile. You can change the profile at any time as latency increases or decreases.
13
10
14
-
You must move one worker latency profile at a time. For example, you cannot move directly from the `Default` profile to the `LowUpdateSlowReaction` worker latency profile. You must move from the `default` worker latency profile to the `MediumUpdateAverageReaction` profile first, then to `LowUpdateSlowReaction`. Similarly, when returning to the default profile, you must move from the low profile to the medium profile first, then to the default.
11
+
You must move one worker latency profile at a time. For example, you cannot move directly from the `Default` profile to the `LowUpdateSlowReaction` worker latency profile. You must move from the `Default` worker latency profile to the `MediumUpdateAverageReaction` profile first, then to `LowUpdateSlowReaction`. Similarly, when returning to the `Default` profile, you must move from the low profile to the medium profile first, then to `Default`.
15
12
16
13
[NOTE]
17
14
====
@@ -100,8 +97,8 @@ spec:
100
97
101
98
# ...
102
99
----
103
-
<1> Specifies to use the low worker latency policy.
104
-
+
100
+
<1> Specifies use of the low worker latency policy.
101
+
105
102
Scheduling on each worker node is disabled as the change is being applied.
106
103
107
104
.Verification
@@ -136,5 +133,4 @@ $ oc get KubeControllerManager -o yaml | grep -i workerlatency -A 5 -B 5
136
133
----
137
134
<1> Specifies that the profile is applied and active.
138
135
139
-
To change the medium profile to default or change the default to medium, edit the `node.config` object and set the `spec.workerLatencyProfile` parameter to the appropriate value.
140
-
136
+
To change the medium profile to default or change the default to medium, edit the `node.config` object and set the `spec.workerLatencyProfile` parameter to the appropriate value.
0 commit comments