Como dimensionar memória para VMware sem excessos

How to size memory for VMware without overprovisioning

A RAM expansion that seems sufficient in the inventory can fail during the first HA event. The reason is simple: the host's physical capacity does not equal the memory available to the virtual machines. To learn how to size memory for VMware safely, you need to consider the actual workload consumption, the continuity reserve, the NUMA architecture of the processors, and the correct configuration of the ECC modules in the server.

In vSphere environments, buying memory based solely on the sum of the RAM configured in the VMs creates two opposing risks. The first is undersizing the cluster and operating under ballooning, compression, or host swapping. The second is locking up the budget in modules that do not deliver practical gains because CPU, storage, or licensing are the true limiting factors. Enterprise sizing starts with measurement and ends with the platform's certified compatibility.

How to size memory for VMware based on the actual workload

The starting point is active consumption, not provisioned memory. A VM configured with 32 GB may keep 8 GB to 12 GB effectively active most of the time, while another with the same configuration may consume almost all the RAM during closing times, database processing, or report execution. Use historical metrics from vCenter to observe Active Memory, Consumed Memory, granted memory, and peaks over complete operating cycles.

The analysis window must cover, at minimum, representative weeks and include known peaks: accounting closing, backup routines, payroll processing, ERP updates, database consolidations, and seasonal workloads. Averages hide problems. For capacity, what matters is the behavior during the moments of greatest simultaneity among the VMs.

The initial calculation can be expressed as follows:

Cluster required memory = peak active memory of the VMs + hypervisor overhead + HA reserve + growth margin.

The overhead includes ESXi, management agents, drivers, cache, and internal virtualization structures. It varies according to the host generation, number of VMs, adapters, and enabled features. Do not treat this value as irrelevant. In dense hosts, the hypervisor's operational share and the memory required by many small VMs start to have a concrete impact.

The growth margin depends on planning. For a stable environment, 15% to 20% may be adequate. When new business units, physical application migration, or VDI expansion are planned, a reserve of 25% to 30% avoids a new acquisition right after the project. There is no universal percentage: the choice must reflect the approved VM pipeline and the hardware renewal cycle.

HA changes the cluster's useful capacity

High availability does not create additional memory. It requires that the cluster withstand the loss of one or more hosts without interrupting priority workloads. In a cluster with four identical servers, planned to tolerate the failure of one host, the useful capacity is not four times the installed memory. In practice, it should be operated as if only three hosts were available for the protected workloads.

Consider four hosts with 768 GB of RAM each. The physical capacity is 3,072 GB. If the goal is N+1, 768 GB need to remain available to absorb the VMs of an unavailable host. Even before considering overhead and expansion margin, the usable base drops to 2,304 GB.

The vSphere admission control mechanism needs to be aligned with this calculation. Slot-based policies can generate distorted readings when there is a large difference in VM sizes. In corporate infrastructures with heterogeneous workloads, the reserve by resource percentage or dedicated capacity usually offers a more predictable view. Still, it is necessary to validate whether the reservations configured in the VMs do not block migrations during an HA event.

It is also worth separating criticality from capacity. Not every VM needs to receive the same level of protection. Development environments, labs, and temporary workloads can have different restart rules than transactional applications. This classification reduces memory cost without compromising the systems that support the operation.

Avoid relying on memory overcommit

VMware manages overcommit with mechanisms such as Transparent Page Sharing, ballooning, compression, and host swapping. They exist to handle variations and increase efficiency in certain scenarios, but they should not be the basis of a critical production environment.

Page sharing has limited benefits in many current workloads, especially because of large pages, encryption, and low content repetition between operating systems. Ballooning is less aggressive than swapping, but it already indicates pressure: the driver inside the VM needs to reclaim memory for the hypervisor. If the guest operating system has little free RAM, this can lead to internal paging and degrade the application's response.

ESXi swapping is the most sensitive signal. When memory pages move to storage, latency stops being a detail and becomes an impact perceived by the user or the application. Even with high-performance enterprise SSDs, RAM remains several orders of magnitude faster than persistent I/O. Recurring ballooning alerts, high compression, swap in/out, and co-stop must enter the evaluation before approving new VMs.

NUMA, processors, and memory channels

In servers with two or more sockets, RAM is organized in NUMA domains. Each processor has its own memory controllers and channels. When a VM accesses memory local to the processor executing its vCPUs, latency is lower. When it accesses memory linked to another socket, there is inter-processor traffic and potentially lower performance.

This point is decisive for databases, analytics, dense VDI, and virtual machines with a large number of vCPUs and RAM. A VM with 24 vCPUs and 512 GB, for example, needs to be analyzed in relation to the host's physical topology. If it exceeds the practical capacity of a NUMA node, ESXi may distribute it among nodes. This is not necessarily wrong, but it needs to be planned in the design.

The module population also interferes. HPE ProLiant, Dell PowerEdge, and Lenovo ThinkSystem platforms have specific rules for channel, rank, speed, and DIMM combination occupancy. Filling a single channel per CPU, maintaining symmetry between sockets, normally delivers a better balance than installing modules of random capacities. Depending on the server generation and the Intel Xeon or AMD EPYC processor, increasing the number of DIMMs per channel can reduce the effective memory frequency.

Therefore, 12 modules of 64 GB may be technically more suitable than 24 modules of 32 GB on a certain platform, while the reverse scenario may make sense on another. Do not choose solely based on the lowest cost per gigabyte. Evaluate final capacity, free slots for expansion, bandwidth, supported speed, and the manufacturer's population guide.

Size by host, not just by the cluster total

A cluster can show total slack and still fail to redistribute VMs. This happens when there is an imbalance between hosts, rigid affinities, very large VMs, or limits imposed by CPU and NUMA. DRS helps distribute workloads, but it does not replace a coherent capacity design.

When defining the RAM of each host, check if the largest protected VM can be restarted on the remaining hosts. Also evaluate the ratio between memory and physical cores. A server with many cores but little RAM can limit consolidation. A host with abundant memory and insufficient CPU can keep VMs running, but with processing contention. The proper relationship depends on the profile: VDI tends to require planning by user and login peak; databases require attention to reserved memory and cache; web applications may favor a higher density of smaller VMs.

In new projects, standardizing the host configuration simplifies HA, DRS, component inventory, and future expansions. Equivalent hosts in CPU, RAM capacity, and connectivity reduce operational exceptions. In gradual expansions, confirm compatibility between DIMM generations, server firmware, and installed processors before incorporating memory into the fleet.

Technical checklist before purchase

Before defining ECC DDR4 or DDR5 memory SKUs, consolidate four fronts: the active peak per VM group, the capacity that needs to survive a host failure, the approved growth margin, and the physical topology of each server. Next, validate the exact equipment model, generation, processors, number of slots, channels per CPU, supported speed, and already installed modules.

Mixing capacities, speeds, ranks, or manufacturers may even be accepted in some equipment, but it can reduce frequency, prevent startup, or make behavior less predictable. For mission-critical infrastructure, the recommendation is to use ECC modules compatible with the server and maintain a symmetrical population between the sockets. Document part numbers, DIMM positions, and capacity per host so that future expansions preserve the standard.

Sizing memory for VMware is not about maximizing installed GB. It is about ensuring that each host sustains the expected workload, that the cluster survives a planned failure, and that the memory architecture keeps pace with CPU, NUMA, and business growth. With consumption data, a defined HA policy, and compatible modules, the acquisition stops being an estimate and becomes a controlled infrastructure decision.

Leave a comment