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 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
  • Docker how to find real container child process ID
  • Alibaba Aliyun how to reset password solution 'Setup does not meet the requirements, please resetting'
  • RTL88X Series 80Mhz hostapd mode for Linux Debian Kali
  • How To Deploy Your Own Mastodon Server in Docker
  • ffmpeg burning subtitles in non-English errors [Parsed_subtitles_0 @ 0x561d3a0b3b80] Glyph 0x6709 not found, selecting one more font for (Sans, 700, 0)
  • rsyslog in container config
  • Interesting Whisper AI CPU vs GPU Test
  • How to install pytorch with cuda capability for AI acceleration with Nvidia Tesla etc.. GPUs
  • How to Spider the web archive.org to recover your old website/webpage
  • Debian 10 /etc/apt/sources.list