VMware predisposition
This page describes the basic settings of the VMware virtual machine, so as to achieve the smallest possible limitation from the virtualization platform. This guide is suitable for setting up UCS, it is not suitable to practice it across the board.
Disable hot plug (vCPU, RAM)
- vCPU - full reservation
- RAM - full reservation
- Disk: Paravirtual (SCSI), Thick provisioned
Network: VMXNET3
Guest: install the latest version of open-vm-tools
limit the number of virtual hardware to the minimum necessary
Reference documents
Documentation for VMware version 7.x and 8.x
- [vsphere-esxi-vcenter-server-80-performance-best-practices.pdf](https://www.vmware.com/content/dam/digitalmarketing/vmware/en/pdf/techpaper/performance/vsphere- esxi-vcenter-server-80-performance-best-practices.pdf)
- [vsphere-esxi-vcenter-server-70U3-performance-best-practices.pdf](https://www.vmware.com/content/dam/digitalmarketing/vmware/en/pdf/techpaper/performance/vsphere- esxi-vcenter-server-70U3-performance-best-practices.pdf)
Host (HW + BIOS)
- Always enable hyper-threading, and do not overcommit CPU
- the performance of 1 CPU core is NOT equal to 1 thread, a thread can process a limited set of instructions in parallel!
- BIOS Power Management Mode: Maximum Performance
- [BIOS Configuration](https://docs.vmware.com/en/VMware-vCloud-NFV-OpenStack-Edition/3.3/vmwa-vcloud-nfv-performance-tuning-guide/GUID-718BCBED-2B00-4281- 998F-9810EAECDA97.html)
- CPU Power and Performance Management Mode: Maximum Performance
- Processor Settings: Turbo Mode enabled
- Processor Settings: C States deactivated
Basic setup summary
Use:
- Virtual Hardware Version - the most current version
- Poweroff is required for the application (reboot is not enough)
- High performance
- Low latency
- Disable Hot Add (vCPU, RAM)
- Current version of open-vm-tools (inside the VM)
RAM
- Reserve all guest memory (All locked)
- checked
- Allocate Memory Resources
#!/bin/bash
# -m show output in mebibytes
free -m
Exit:
total used free shared buff/cache available
Mem: 15857 7658 854 1201 7344 6689
Swap: 1955 0 1955
In this case, set the RAM reservation to 15857 MB
vCPU
Set full reservation for vCPU.
- Reservations: 0
- Limit: unlimited
- vCPU and vNUMA rightsizing rules
VMware Tenant: How to find out the required CPU reservation?
#!/bin/bash
grep -E "cpu MHz|model name" /proc/cpuinfo
Exit:
model name : Intel(R) Xeon(R) Gold 6326 CPU @ 2.90GHz
cpu MHz : 2893.203
model name : Intel(R) Xeon(R) Gold 6326 CPU @ 2.90GHz
cpu MHz : 2893.203
model name : Intel(R) Xeon(R) Gold 6326 CPU @ 2.90GHz
cpu MHz : 2893.203
model name : Intel(R) Xeon(R) Gold 6326 CPU @ 2.90GHz
cpu MHz : 2893.203
From the output mentioned above, we know: Number of cores = 4 Base frequency = 2.9Ghz
Minimum allocation: Min. Ghz allocation = number of cores * base frequency In this case, you need to allocate at least 11.6 GHz (4 * 2.9 = 11.6 GHz).
If we include overhead for the host and Turbo Frequency is used, it will probably be appropriate to allocate more. The theoretical maximum is the number of cores * turbo frequency From the example mentioned above: [Intel Xeon Gold 6326](https://www.intel.com/content/www/us/en/products/sku/215274/intel-xeon-gold-6326-processor-24m-cache- 2-90-ghz/specifications.html) Turbo frequency is 3.5GHz So the theoretical peak is: 3.5 * 4 = 14GHz
Network cards
Use:
- VMXNET3
- Virtual Network Interrupt Coalescing
- ethernetX.coalescingScheme to disabled
- komunikcae "inside" does not use Coalescing by default
- will increase CPU utilization!
- will reduce latency on the network
- suitable to set on "input VM"
Disks
When allocating disks, use:
- Thick provisioned - Eager zeroed
- Initial allocation is slower
- Paravirtual (SCSI)