VMWare ESXi/VSphere Disable Balloon Segfault in Services Solution

After looking at several deployments of VMWare, we had one deployment where the company enabled balloon mode which is essentially a way to overcommit memory the hostnode(s) don't have.  Let's say you have put your database into memory or use a cached service in Apache or haproxy/nginx. VMWare will start taking some portions of these and at some point it corrupts things and the application running will either crash, malfunction or segfault.

Another factor is that OOM will be triggered artificially.  Take say a 16G VM that runs on a VMWare ESXi/Vsphere with the EXACT same OS image/kernel, and running the same container.  At some point the one with balloon will probably hit OOM and you may never be able to reproduce it on a non-Balloon VM/host.

Balloon is horrible because it feels like the old days of computing with a slow HDD where you have too little RAM and your computer is swapping.

It sounds similar to KSM in KVM but KSM is smart enough to only work with shared pages of duplicated memory.  Eg. if you had 200 VMs or containers using duplicated memory (eg. using a certain binary) it will combine those into one memory space to conveniently save memory duplication.

Is my VM even using balloon?

vmware-toolbox-cmd stat balloon
0 MB

 

You are looking for the number to be 0 but note it doesn't mean it won't start ballooning later on.  This is more likely when you have processes that use more memory 1-2G+.  Another symptom is that you will likely find the process that is getting ballooned will be slow (eg. even a docker ps or kubectl will be slower than normal).

How to disable balloon in the VM

#Temporarily and instantly disable balloon:

modprobe -r vmw_balloon

# disable for next boot
echo "blacklist vmw_balloon" | tee /etc/modprobe.d/disable-balloon.conf


#update iniitramfs so it will be disabled after reboot

update-initramfs -u
 

 


Tags:

vmware, esxi, vsphere, disable, balloon, segfault, solutionafter, deployments, deployment, enabled, mode, essentially, overcommit, hostnode, database, cached, apache, haproxy, nginx, portions, corrupts, malfunction, factor, oom, triggered, artificially, vm, os, kernel, container, reproduce, computing, hdd, ram, swapping, ksm, kvm, duplicated, eg, vms, containers, binary, combine, conveniently, duplication, toolbox, cmd, stat, mb, doesn, ballooning, processes, symptom, ballooned, docker, ps, kubectl, slower, temporarily, instantly, modprobe, vmw_balloon, echo, quot, blacklist, tee, etc, conf, update, iniitramfs, disabled, reboot, initramfs,

Latest Articles

  • How to combine .txt ACLs without breaking things
  • How to ping all of Googlebot's IPs script
  • 'virtio0' uses a qcow2 feature which is not supported by this qemu version: QCOW version 3
  • Linux bash script to get the IP of a list of hostnames
  • How To Use Camera Webcam in Docker for OBS Studio etc...
  • Computer Server Won't Post Boot Or Enter BIOS Setup After Installing RAID SAS or GPU Card etc..
  • How To Test PHP Scripts from CLI with GET variables/query string
  • apt-cache how to see all available versions of a package in Debian Ubuntu Mint
  • Virtualbox VBox Guest-utils drag and drop files stops working with Windows VMs
  • How To Remove Ubuntu Netplan and Go Back to /etc/network/interfaces
  • How To Force Flash an AMD Instinct GPU To Another Model Using Debian Ubuntu Mint Linux
  • How To compile ollama from source to use unsupported AMD GPU with rocm in Ubuntu Debian
  • QEMU KVM Virtio GPU Windows Cannot Select 1080P
  • Linux Gnome Desktop Ubuntu Mint Debian Gets Slower After Weeks
  • Firefox How to Save Full Page As Screenshot/PDF
  • Nvidia Datacenter Driver Tesla Slow nvidia-smi response and high utilization with 0 usage
  • ffmpeg how to normalize / increase the volume of your audio
  • kdenlive audio blips pops cracks artifacts solution fix
  • haproxy / nginx certbot SSL issues
  • nginx how to see the real IP when behind a CDN