Skip to content

Commit 375162b

Browse files
authored
Merge pull request #93664 from mburke5678/autoscale-vpa-oom-args
OCPBUGS55396 VPA Recommender OOM args are available but undocumented
2 parents 0adf46e + d177471 commit 375162b

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * nodes/pods/nodes-pods-vertical-autoscaler.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="nodes-pods-vertical-autoscaler-oom_{context}"]
7+
= Custom memory bump-up after OOM event
8+
9+
If your cluster experiences an OOM (out of memory) event, the Vertical Pod Autoscaler Operator (VPA) increases the memory recommendation based on the memory consumption observed during the OOM event and a specified multiplier value in order to prevent future crashes due to insufficient memory.
10+
11+
The recommendation is the higher of two calculations: the memory in use by the pod when the OOM event happened multiplied by a specified number of bytes or a specified percentage. The calculation is represented by the following formula:
12+
13+
[source,text]
14+
----
15+
recommendation = max(memory-usage-in-oom-event + oom-min-bump-up-bytes, memory-usage-in-oom-event * oom-bump-up-ratio)
16+
----
17+
18+
You can configure the memory increase by specifying the following values in the recommender pod:
19+
20+
* `oom-min-bump-up-bytes`. This value, in bytes, is a specific increase in memory after an OOM event occurs. The default is `100MiB`.
21+
* `oom-bump-up-ratio`. This value is a percentage increase in memory when the OOM event occurred. The default value is `1.2`.
22+
23+
For example, if the pod memory usage during an OOM event is 100MB, and `oom-min-bump-up-bytes` is set to 150MB with a `oom-min-bump-ratio` of 1.2, after an OOM event, the VPA would recommend increasing the memory request for that pod to 150 MB, as it is higher than at 120MB (100MB * 1.2).
24+
25+
.Example recommender deployment object
26+
27+
[source,yaml]
28+
----
29+
apiVersion: apps/v1
30+
kind: Deployment
31+
metadata:
32+
name: vpa-recommender-default
33+
namespace: openshift-vertical-pod-autoscaler
34+
# ...
35+
spec:
36+
# ...
37+
template:
38+
# ...
39+
spec
40+
containers:
41+
- name: recommender
42+
args:
43+
- --oom-bump-up-ratio=2.0
44+
- --oom-min-bump-up-bytes=524288000
45+
# ...
46+
----

nodes/pods/nodes-pods-vertical-autoscaler.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ include::modules/nodes-pods-vertical-autoscaler-using-about.adoc[leveloffset=+1]
4242

4343
include::modules/nodes-pods-vertical-autoscaler-tuning.adoc[leveloffset=+2]
4444

45+
include::modules/nodes-pods-vertical-autoscaler-oom.adoc[leveloffset=+2]
46+
47+
.Additional resources
48+
* xref:../../nodes/clusters/nodes-cluster-resource-configure.adoc#nodes-cluster-resource-configure-oom_nodes-cluster-resource-configure[Understanding OOM kill policy]
49+
4550
include::modules/nodes-pods-vertical-autoscaler-custom.adoc[leveloffset=+2]
4651

4752
include::modules/nodes-pods-vertical-autoscaler-configuring.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)