frankdenneman Frank Denneman is the Chief Technologist for AI at VMware by Broadcom. He is an author of the vSphere host and clustering deep dive series, as well as a podcast host for the Unexplored Territory podcast. You can follow him on Twitter @frankdenneman

Reserve all guest memory (all locked)

47 sec read

Some applications do not perform well when memory is reclaimed from the virtual machine. Most users set a virtual machine memory reservation to prevent memory reclamation and to ensure stable performance levels.
Memory reservation settings are static, meaning that when you change the memory configuration of the virtual machine itself the memory reservation remains the same. If you want to keep the reservation equal to the virtual machine memory reservation, the UI (included in both the vSphere client and the web client) offers the setting: “Reserve all guest memory (all locked)”.
This setting is linked to the virtual machine memory configuration. The memory reservation is immediately readjusted when the memory configuration changes. Increase the memory size and the memory reservation is automatically increased as well. Reduce the memory size of a virtual machine, and the reservation is immediately reduced.
The behavior is extremely useful when using the vSphere client as management tool. Within the vSphere client the memory configuration and the memory reservation settings do not share the same screen. While changing the memory configuration one can easily forget to adjust the memory reservation.
00-virtual-machine-memory-configuration-vSphere client
01-reserve-all-guest-memory-vSphere-client
The web client is redesigned and shows the memory configuration and reservation in a single screen. Yet having a setting that automates and controls alignment of memory configuration and reservation reduce the change for human error.

02-reserve-all-guest-memory-web-client

frankdenneman Frank Denneman is the Chief Technologist for AI at VMware by Broadcom. He is an author of the vSphere host and clustering deep dive series, as well as a podcast host for the Unexplored Territory podcast. You can follow him on Twitter @frankdenneman

Memory Deep Dive Summary

This is last part of the memory deep dive. As the total series count 7667 words, I thought it would be a good idea...
frankdenneman
4 min read

Memory Deep Dive: NUMA and Data Locality

This is part 6 of the memory deep dive. This is a series of articles that I wrote to share what I learned while...
frankdenneman
7 min read

Memory Deep Dive: DDR4 Memory

This is part 5 of the memory deep dive. This is a series of articles that I wrote to share what I learned while...
frankdenneman
6 min read

9 Replies to “Reserve all guest memory (all locked)”

  1. Frank, thanks for the interesting blog post. I wonder, if you’re exploring some of the new aspects of the Web GUI, could you perhaps expand on the “Latency Sensitivity” setting that appeared under the “VM Options”/”Advanced” section in a future post? There’s really very little out in the wild about what it is and what it does beyond a quick mention in a whitepaper (http://www.vmware.com/files/pdf/techpaper/Whats-New-VMware-vSphere-51-Performance-Technical-Whitepaper.pdf) and within the API documentation (http://pubs.vmware.com/vsphere-51/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc%2Fvim.LatencySensitivity.SensitivityLevel.html).
    Cheers,
    Sam

  2. Nice feature.
    Today, I use a powercli script to reajust VM memory in depending of their service level agrement. For a gold VM, I reserve full memory size. For a silver VM, I reserve half memory size. For a bronze VM, I don’t reserve memory.
    I launch this script one time per day.

  3. You mention ‘some applications’. Do you have examples? Does MS Exchange of MS SQL benefit from this setting?

  4. Hi Frank,
    Nice feature. Steve Ballmer posted that this is limited to HW version 8. I’m gussing it is limited to vSphere 5.1? I’m still on 5.0 and have no such option available on my HW v8 VM’s.

  5. So the “All locked” feature.. did anyone happened to notice you can no longer reset the memory reservation if the “all locked” is checked. So my question is, how do you disable and/or check to see the all locked box in powershell?

  6. Well, found the solution to reset that silly lock.
    $guest = Get-VM -Name $vm.Name
    $guest_config = New-Object VMware.Vim.VirtualMachineConfigSpec
    $guest_config.memoryReservationLockedToMax = $false
    $guest.ExtensionData.ReconfigVM_task($guest_config)

Comments are closed.