If you are overcommitting memory with ESX/ESXi, to support the intra-guest swapping induced by ballooning,
ensure that your guest operating systems also have sufficient swap space. This guest-level swap space must
be greater than or equal to the difference between the virtual machine’s configured memory size and its
Reservation.
C
AUTION
If memory is overcommitted, and the guest operating system is configured with insufficient swap
space, the guest operating system in the virtual machine can fail.
To prevent virtual machine failure, increase the size of the swap space in your virtual machines.
n
Windows guest operating systems— Windows operating systems refer to their swap space as paging files.
Some Windows operating systems try to increase the size of paging files automatically, if there is sufficient
free disk space.
See your Microsoft Windows documentation or search the Windows help files for “paging files.” Follow
the instructions for changing the size of the virtual memory paging file.
n
Linux guest operating system — Linux operating systems refer to their swap space as swap files. For
information on increasing swap files, see the following Linux man pages:
n
mkswap
— Sets up a Linux swap area.
n
swapon
— Enables devices and files for paging and swapping.
Guest operating systems with a lot of memory and small virtual disks (for example, a virtual machine with
8GB RAM and a 2GB virtual disk) are more susceptible to having insufficient swap space.
Delete Swap Files
If an ESX/ESXi host fails, and that host had running virtual machines that were using swap files, those swap
files continue to exist and take up disk space even after the ESX/ESXi host restarts. These swap files can consume
many gigabytes of disk space so ensure that you delete them properly.
Procedure
1
Restart the virtual machine that was on the host that failed.
2
Stop the virtual machine.
The swap file for the virtual machine is deleted.
Sharing Memory Across Virtual Machines
Many ESX/ESXi workloads present opportunities for sharing memory across virtual machines (as well as
within a single virtual machine).
For example, several virtual machines might be running instances of the same guest operating system, have
the same applications or components loaded, or contain common data. In such cases, an ESX/ESXi host uses a
proprietary transparent page sharing technique to securely eliminate redundant copies of memory pages. With
memory sharing, a workload running in virtual machines often consumes less memory than it would when
running on physical machines. As a result, higher levels of overcommitment can be supported efficiently.
Use the
Mem.ShareScanTime
and
Mem.ShareScanGHz
advanced settings to control the rate at which the system
scans memory to identify opportunities for sharing memory.
You can also disable sharing for individual virtual machines by setting the
sched.mem.pshare.enable
option
to FALSE (this option defaults to TRUE). See
“Set Advanced Virtual Machine Attributes,”
on page 101.
ESX/ESXi memory sharing runs as a background activity that scans for sharing opportunities over time. The
amount of memory saved varies over time. For a fairly constant workload, the amount generally increases
slowly until all sharing opportunities are exploited.
vSphere Resource Management Guide
34
VMware, Inc.
Содержание ESX 4.0
Страница 6: ...vSphere Resource Management Guide 6 VMware Inc...
Страница 44: ...vSphere Resource Management Guide 44 VMware Inc...
Страница 52: ...vSphere Resource Management Guide 52 VMware Inc...
Страница 72: ...vSphere Resource Management Guide 72 VMware Inc...
Страница 80: ...vSphere Resource Management Guide 80 VMware Inc...