1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00

Merge pull request #48226 from apinnick/enterprise-4.11

[enterprise-4.10] BZ2109446: Remove guest overcommit section
This commit is contained in:
Avital Pinnick
2022-07-25 18:31:11 +03:00
committed by GitHub
3 changed files with 0 additions and 99 deletions

View File

@@ -3218,8 +3218,6 @@ Topics:
File: virt-efi-mode-for-vms
- Name: Configuring PXE booting for virtual machines
File: virt-configuring-pxe-booting
- Name: Managing guest memory
File: virt-managing-guest-memory
- Name: Using huge pages with virtual machines
File: virt-using-huge-pages-with-vms
- Name: Enabling dedicated resources for a virtual machine

View File

@@ -1,51 +0,0 @@
// Module included in the following assemblies:
//
// * virt/virtual_machines/advanced_vm_management/virt-managing-guest-memory.adoc
:_content-type: PROCEDURE
[id="virt-configuring-guest-memory-overcommitment_{context}"]
= Configuring guest memory overcommitment
If your virtual workload requires more memory than available, you can use memory overcommitment to allocate all or most of the host's memory to your virtual machine instances (VMIs). Enabling memory overcommitment means that you can maximize resources that are normally reserved for the host.
For example, if the host has 32 GB RAM, you can use memory overcommitment to fit 8 virtual machines (VMs) with 4 GB RAM each. This allocation works under the assumption that the virtual machines will not use all of their memory at the same time.
[IMPORTANT]
====
Memory overcommitment increases the potential for virtual machine processes to be killed due to memory pressure (OOM killed).
The potential for a VM to be OOM killed varies based on your specific configuration, node memory, available swap space, virtual machine memory consumption, the use of kernel same-page merging (KSM), and other factors.
====
.Procedure
. To explicitly tell the virtual machine instance that it has more memory available than was requested from the cluster, edit the virtual machine configuration file and set `spec.domain.memory.guest` to a higher value than `spec.domain.resources.requests.memory`. This process is called memory overcommitment.
+
In this example, `1024M` is requested from the cluster, but the virtual machine instance is told that it has `2048M` available. As long as there is enough free memory available on the node, the virtual machine instance will consume up to 2048M.
+
[source,yaml]
----
kind: VirtualMachine
spec:
template:
domain:
resources:
requests:
memory: 1024M
memory:
guest: 2048M
----
+
[NOTE]
====
The same eviction rules as those for pods apply to the virtual machine instance if the node is under memory pressure.
====
. Create the virtual machine:
+
[source,terminal]
----
$ oc create -f <file_name>.yaml
----

View File

@@ -1,46 +0,0 @@
// Module included in the following assemblies:
//
// * virt/virtual_machines/advanced_vm_management/virt-managing-guest-memory.adoc
:_content-type: PROCEDURE
[id="virt-disabling-guest-memory-overhead-accounting_{context}"]
= Disabling guest memory overhead accounting
A small amount of memory is requested by each virtual machine instance in addition to the amount that you request. This additional memory is used for the infrastructure that wraps each `VirtualMachineInstance` process.
Though it is not usually advisable, it is possible to increase the virtual machine instance density on the node by disabling guest memory overhead accounting.
[IMPORTANT]
====
Disabling guest memory overhead accounting increases the potential for virtual machine processes to be killed due to memory pressure (OOM killed).
The potential for a VM to be OOM killed varies based on your specific configuration, node memory, available swap space, virtual machine memory consumption, the use of kernel same-page merging (KSM), and other factors.
====
.Procedure
. To disable guest memory overhead accounting, edit the YAML configuration file and set the `overcommitGuestOverhead` value to `true`. This parameter is disabled by default.
+
[source,yaml]
----
kind: VirtualMachine
spec:
template:
domain:
resources:
overcommitGuestOverhead: true
requests:
memory: 1024M
----
+
[NOTE]
====
If `overcommitGuestOverhead` is enabled, it adds the guest overhead to memory limits, if present.
====
. Create the virtual machine:
+
[source,terminal]
----
$ oc create -f <file_name>.yaml
----