id = 693 title = "Qemu increased memory usage with TCG" state = "closed" created_at = "2021-10-27T13:03:16.267Z" closed_at = "2021-10-29T21:36:20.552Z" labels = ["Documentation", "accel: TCG"] url = "https://gitlab.com/qemu-project/qemu/-/issues/693" host-os = "Ubuntu 21.04, Debian 11, CentOS 8 Stream" host-arch = "x86" qemu-version = "QEMU emulator version 5.2.0 (Debian 1:5.2+dfsg-11+deb11u1)" guest-os = "Linux / Cirros 0.5.2" guest-arch = "x86" description = """The issue is that instances that are supposed to use only a small amount of memory (like 256MB) suddenly use a much higher amount of RSS when running the accel=tcg, around 512MB in the above example. This was not happening with qemu-4.2 (on Ubuntu 20.04). This is also not happening when using accel=kvm instead. The issue has been first noticed on Debian 11 (Bullseye) with the versions above, but it is happening in the same way on Centos 8 Stream, Ubuntu 21.10 and a pre-release version of Ubuntu 22.04. It also also seen when testing with qemu-6.1 built from source.""" reproduce = """1. Deploy devstack (https://opendev.org/openstack/devstack) with VIRT_TYPE=qemu on a VM 2. Start an instance with cirros image and a flavor allocating 256MB 3. Do a ps and see a RSS size of about 512MB being used after the instance has finished booting 4. Expected result (seen with qemu-4.2 or VIRT_TYPE=kvm): RSS stays < 256MB""" additional = """I can try to find a smaller commandline for manual reproduction if needed. The above sample is generated by OpenStack Nova via libvirt."""