Skip to content

Commit 4fe355a

Browse files
authored
Merge pull request #86671 from jherrman/CNV-50922_4.16
[enterprise-4.16] OSDOCS#50922: Improving docs for setting up memory overcommit
2 parents d8e7ee8 + 6c4e25d commit 4fe355a

File tree

1 file changed

+29
-18
lines changed

1 file changed

+29
-18
lines changed

modules/virt-using-wasp-agent-to-configure-higher-vm-workload-density.adoc

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -236,29 +236,35 @@ spec:
236236
labels:
237237
severity: critical
238238
----
239-
. Configure {VirtProductName} to use memory overcommit either by using the {product-title} web console or by editing the HyperConverged custom resource (CR) file as shown in the following example.
239+
. Configure {VirtProductName} to use memory overcommit either by using the {product-title} web console or by editing the HyperConverged custom resource (CR) file in the CLI.
240240
+
241-
Example:
241+
--
242+
* Web console
242243
+
243-
[source,yaml]
244+
. In the {product-title} web console, go to *Virtualization* -> *Overview* -> *Settings* -> *General settings* -> *Memory density*.
245+
. Set *Enable memory density* to on.
246+
247+
248+
* CLI
249+
** Configure your {VirtProductName} to enable higher memory density and set the overcommit rate:
250+
+
251+
[source,terminal]
244252
----
245-
apiVersion: hco.kubevirt.io/v1beta1
246-
kind: HyperConverged
247-
metadata:
248-
name: kubevirt-hyperconverged
249-
namespace: openshift-cnv
250-
spec:
251-
higherWorkloadDensity:
252-
memoryOvercommitPercentage: 150
253+
$ oc -n openshift-cnv patch HyperConverged/kubevirt-hyperconverged --type='json' -p='[ \
254+
{ \
255+
"op": "replace", \
256+
"path": "/spec/higherWorkloadDensity/memoryOvercommitPercentage", \
257+
"value": 150 \
258+
} \
259+
]'
253260
----
254-
. Apply all the configurations to compute nodes in your cluster by entering the following command:
255261
+
262+
.Successful output
256263
[source,terminal]
257264
----
258-
$ oc patch --type=merge \
259-
-f <../manifests/hco-set-memory-overcommit.yaml> \
260-
--patch-file <../manifests/hco-set-memory-overcommit.yaml>
265+
hyperconverged.hco.kubevirt.io/kubevirt-hyperconverged patched
261266
----
267+
--
262268
+
263269
[NOTE]
264270
====
@@ -308,11 +314,16 @@ If swap is provisioned correctly, an amount greater than zero is displayed, simi
308314
+
309315
[source,terminal]
310316
----
311-
$ oc get -n openshift-cnv HyperConverged kubevirt-hyperconverged -o jsonpath="{.spec.higherWorkloadDensity.memoryOvercommitPercentage}"
312-
150
317+
$ oc -n openshift-cnv get HyperConverged/kubevirt-hyperconverged -o jsonpath='{.spec.higherWorkloadDensity}{"\n"}'
318+
----
319+
+
320+
.Example output
321+
[source,terminal]
322+
----
323+
{"memoryOvercommitPercentage":150}
313324
----
314325
+
315-
The returned value, for example `150`, must match the value you had previously configured.
326+
The returned value must match the value you had previously configured.
316327
317328
318329

0 commit comments

Comments
 (0)