ESX Virtualization

VMware ESXi, vSphere, VMware Backup, Hyper-V... how-to, videos....

Nakivo Backup and Replication - #1 Backup solution for Virtual, physical, cloud, NAS and SaaS

Menu
  • Certification
      • VCP-DCV vSphere 8
          • vcp2024-125.
        • Close
    • Close
  • VMware
    • Configuration Maximums
    • vSphere
      • vSphere 8.0
      • vSphere 7.0
      • vSphere 6.7
      • vSphere 6.5
      • vSphere 6.0
      • Close
    • VMworld
      • VMware EXPLORE 2024
      • VMware EXPLORE 2023
      • VMware EXPLORE 2022
      • VMworld 2019
      • VMworld 2018
      • VMworld 2017
      • VMworld 2016
      • VMworld 2015
      • VMworld 2014
      • VMworld 2013
      • VMworld 2012
      • VMworld 2011
      • Close
    • Close
  • Microsoft
    • Windows Server 2012
    • Windows Server 2016
    • Windows Server 2019
    • Close
  • Categories
    • Tips – VMware, Microsoft and General IT tips and definitions, What is this?, How this works?
    • Server Virtualization – VMware ESXi, ESXi Free Hypervizor, VMware vSphere Server Virtualization, VMware Cloud and Datacenter Virtualization
    • Backup – Virtualization Backup Solutions, VMware vSphere Backup and ESXi backup solutions.
    • Desktop Virtualization – Desktop Virtualization, VMware Workstation, VMware Fusion, VMware Horizon View, tips and tutorials
    • How To – ESXi Tutorials, IT and virtualization tutorials, VMware ESXi 4.x, ESXi 5.x and VMware vSphere. VMware Workstation and other IT tutorials.
    • Free – Free virtualization utilities, ESXi Free, Monitoring and free backup utilities for ESXi and Hyper-V. Free IT tools.
    • Videos – VMware Virtualization Videos, VMware ESXi Videos, ESXi 4.x, ESXi 5.x tips and videos.
    • Home Lab
    • Reviews – Virtualization Software and reviews, Disaster and backup recovery software reviews. Virtual infrastructure monitoring software review.
    • Close
  • Partners
    • NAKIVO
    • StarWind
    • Zerto
    • Xorux
    • Close
  • This Web
    • News
    • ESXi Lab
    • About
    • Advertise
    • Archives
    • Disclaimer
    • PDFs and Books
    • Close
  • Free
  • Privacy policy

What is VMware Memory Ballooning?

By Vladan SEGET | Last Updated: October 18, 2017

Shares

This post will detail and explains some basic concept about ESXi memory reclamation technique called ballooning. What is VMware Memory Ballooning is the name of today's post. We'll put it again in our Tips Category. You might already pass your VCP exam and (or) you might know this topic well. We can understand that. This topic is mostly for folks just starting with virtualization and learning about it.

Note that your ESXi host will never use any of the memory reclamation technique if you don't allocate more memory to your VMs, then your ESXi host actually has physically installed. You “will not overcommit memory”, we say.

VMware ballooning is a memory reclamation technique used when ESXi host runs out of memory. Your VMs configured with some RAM within their virtual hardware will consume the memory via their applications running in memory.

Before we dive in, I think it would be a good idea to talk about the different types of memory we have on ESXi. We have the host physical memory, guest physical memory, but also virtual memory which is within each VM and where the applications run.

  • Host physical memory – physical RAM of each ESXi host (server). This is a physical resource.
  • Guest physical memory – The Guest OS memory. A memory that is visible to the guest operating system running in the virtual machine.
  • Virtual Memory – memory where an application runs within a VM. It is a continuous virtual address space presented by the guest operating system to applications. It is the memory that is visible to the applications running in the VM.

Screenshot from VMware PDF – Understanding Memory Resource Management in VMware.

VMware memory ballooning technique

What is VMware Memory Ballooning?

Ballooning is a process where the ESXi host reclaims memory back from the virtual machine. Ballooning is an activity that happens when the ESXi host is running out of physical memory. The demand of the virtual machine is too high for the host to handle.

Each VM has a driver installed via VMware tools. This driver is called a Balloon Driver. The guest operating system is able to decide which memory pages should be swapped to disk. When the host needs to free up some memory it will notify a special driver (vmmemctl) that is installed as part of the VMTools. This driver then consumes some of the memory that the guest OS believes is physically present in the virtual machine. The guest OS will then swap memory to disk reducing the load on the

This driver then consumes some of the memory that the guest OS believes is physically present in the virtual machine. The guest OS will then swap memory to disk reducing the load on the host's physical memory. The host will then reallocate that memory to other virtual machines.

What is VMware Memory Ballooning

Quote from (a very old) VMware PDF:

By inflating the balloon, a virtual machine consumes less physical memory on the host, but more physical memory inside the guest. As a result, the hypervisor offloads some of its memory overload to the guest operating system while slightly loading the virtual machine. That is, the hypervisor transfers the memory pressure from the host to the virtual machine. Ballooning induces guest memory pressure. In response, the balloon driver allocates and pins guest physical memory. The guest operating system determines if it needs to page out guest physical memory to satisfy the balloon driver’s allocation requests. If the virtual machine has plenty of free guest physical memory, inflating the balloon will induce no paging and will not impact guest performance.

As you can see, it is well organized and orchestrated.

Disable VMware Balloon Driver?

You might ask what if (and how) to disable the VMware balloon driver within the guest OS. Is it a good idea? Well, there is a VMware KB article which talks about the Disabling the balloon driver (rather outdated). IMHO I don't see much interest in doing that.

This KB article provides the step-by-step to disable the balloon driver in a VM. But they emit a warning which says:

Disabling the balloon driver in a virtual machine results in performance issues with the ESXi/ESX host.

Where to check if the Balloon driver is installed or not?

Here is an overview from the lab. Connect via Putty and SSH, then run ESXTOP and chose “m” for memory. Use “f” key to change fields.

VMware Memory Ballooning

Where else to check?

You can also use vSphere Client to check if memory gets ballooned or not. If you Select your host > Monitor > Advanced > Memory. In my case I turned off my DRS and did a vMotion on a bunch of my VMs from host01 to host 02 in order to “generate” some memory pressure on my host.

VMware Memory Balooning View2

Wrap Up:

VMware Ballooning isn't the only technique of memory reclamation. There is also other techniques such as VMware Transparent Page Sharing (TPS) which is a proprietary solution to transparently share memory pages between virtual machines and eliminating redundant copies of memory pages.

Then there is memory compression where ESXi will compress the memory before the need for swapping (bad, worst to happen). But we might talk about those in one of our future posts. If you are over-committing your hosts then this is an important topic to review.

TIP: VMware Transparent Page Sharing (TPS) Explained

With our short blog post, we give you the idea how it works and where to look at the metrics, but one must study further to get the whole picture how all memory management techniques work within VMware infrastructure. VMware TPS kicks in first, then there is Ballooning and finally a Swap.

VMware Oversubscription/Overcommit allows administrators basically, to assign more aggregate RAM to virtual machines than is actually physically available inside the server, and still won't penalize the environment and the end users, by low performance.

More from ESX Virtualization:

  • What is VMware Hot-Add RAM and How to use it?
  • What Is VMware Virtual NVMe Device?
  • What is VMware CPU Ready?
  • What is VMware Instant Clone Technology?
  • VMware Virtual Hardware Performance Optimization Tips

Stay tuned through RSS, and social media channels (Twitter, FB, YouTube)

Shares
4/5 - (2 votes)

| Filed Under: Server Virtualization Tagged With: VMware Memory Ballooning

About Vladan SEGET

This website is maintained by Vladan SEGET. Vladan is as an Independent consultant, professional blogger, vExpert x16, Veeam Vanguard x9, VCAP-DCA/DCD, ESX Virtualization site has started as a simple bookmarking site, but quickly found a large following of readers and subscribers.

Connect on: Facebook. Feel free to network via Twitter @vladan.

Comments

  1. Maciej says

    October 21, 2017 at 11:37 am

    Hi Vladan, good article as usual. But i think you could write few words about memory state calculations, minfree etc. because it is not always clear for all.
    Regards

    • Vladan SEGET says

      October 26, 2017 at 10:20 pm

      Good Idea Maciej, keep them comming -:).
      Will do.
      ++

  2. Anthony Maw says

    February 1, 2018 at 1:55 am

    Thanks for the explanation. But it would be useful to clarify if the VMTools Balloon driver requests pageable or non-pageable memory from the Guest VM. If it’s just pageable memory then the Guest is liable to page the Balloon driver’s memory to disk which defeats the purpose. If it’s non-pageable memory then the Balloon driver forces the Guest OS to dump other running application’s pageable memory to disk. Of course ESX has to know that the fake requested non-pageable memory is from the Balloon driver in order to release physical RAM.

Private Sponsors

Featured

  • Thinking about HCI? G2, an independent tech solutions peer review platform, has published its Winter 2023 Reports on Hyperconverged Infrastructure (HCI) Solutions.
  • Zerto: One Platform for Disaster Recovery, Backup & Cloud Mobility: Try FREE Hands-On Labs Today!
Click to Become a Sponsor

Most Recent

  • Nakivo Backup and Replication v11.1 BETA adds more Proxmox friendly features
  • Vulnerability in your VMs – VMware Tools Update
  • FREE version of StarWind VSAN vs Trial of Full version
  • Commvault’s Innovations at RSA Conference 2025 San Francisco
  • VMware ESXi FREE is FREE again!
  • Installation of StarWind VSAN Plugin for vSphere
  • Protect Mixed environments with Nakivo Physical Machine recovery (bare metal)
  • No more FREE licenses of VMware vSphere for vExperts – What’s your options?
  • Tails – Your Private OS on USB Stick
  • StarWind V2V Converter Now has CLI

Get new posts by email:

 

 

 

 

Support us on Ko-Fi

 

 

Buy Me a Coffee at ko-fi.com

Sponsors

Free Trials

  • DC Scope for VMware vSphere – optimization, capacity planning, and cost management. Download FREE Trial Here.
  • Augmented Inline Deduplication, Altaro VM Backup v9 For #VMware and #Hyper-V – Grab your copy now download TRIAL.

VMware Engineer Jobs

VMware Engineer Jobs

YouTube

…

Find us on Facebook

ESX Virtualization

…

Copyright © 2025 ·Dynamik-Gen · Genesis Framework · Log in