QEMU Guest using huge amounts of compressed memory on boot

QEMU Guest using huge amounts of compressed memory on boot

Virt Manager configuration:

在此输入图像描述

Guest memory usage right after booting (nothing is running): 在此输入图像描述

I'm running virt-manager on a standard Ubuntu 17.10 system. In Proxmox, the same general configuration (with ballooning enabled) would allocate 8GB of the host but the guest would have roughly 1-2GB used out of 16GB instead of this.

I'm pretty sure I have all the guest drivers installed. (qemu guest, virtio stuff, balloon driver & service)

This is not my first QEMU VM, but the only one outside of Proxmox (which I'm assuming does some extra stuff that virt-manager doesn't).

What really exacerbates this issue is if I set the Current allocation to 2GB, the guest has about 15.6GB compressed and most software won't launch or run correctly because there's no free system memory...


Host:

:~$ free -m
              total        used        free      shared  buff/cache   available
Mem:          32163       20273        8949         176        2940       11325
Swap:          2047           2        2045

在此输入图像描述

Hardly anything is running on the host. It looks like the entire 16GB is getting claimed but simultaneously most of that memory is inaccessible to the guest.

答案1

usual and expected behaviour. qemu/kvm allocates the max ram until balloon service is started. afterwards any ram consumed by balloon service is free (from host pov)

相关内容