On Fri, Nov 26, 2010 at 12:04 PM, Stefan Hajnoczi <stefanha@xxxxxxxxx> wrote: > On Fri, Nov 26, 2010 at 7:19 PM, Freddie Cash <fjwcash@xxxxxxxxx> wrote: >> Within 2 weeks of booting, the host machine is using 2 GB of swap, and >> disk I/O wait is through the roof. ÂRestarting all of the VMs will >> free up RAM, but restarting the whole box is the only way to get >> performance back up. >> >> A guest configured to use 8 GB of RAM will have 9 GB virt and 7.5 GB >> res shown in top. ÂIn fact, every single VM shows virt above the limit >> set for the VM. ÂUsually by close to 25%. > > Not sure about specific known issues with those Debian package versions, but... > > Virtual memory does not mean much. ÂFor example, a 64-bit process can > map in 32 GB and never touch it. ÂThe virt number will be >32 GB but > actually no RAM is being used. ÂOr it could be a memory mapped file, > which is backed by the disk and can pages can dropped if physical > memory runs low. ÂLooking at the virtual memory figure is not that > useful. > > Also remember that qemu-kvm itself requires memory to perform the > device emulation and virtualization. ÂIf you have an 8 GB VM, plan for > more than 8 GB to be used. ÂClearly this memory overhead should be > kept low, is your 25% virtual memory overhead figure from a small VM > because 9 GB virtual / 8 GB VM is 12.5% not 25%? > > What is the sum of all VMs' RAM? ÂI'm guessing you may have > overcommitted resources (e.g. 2 x 8 GB VM on a 16 GB machine). ÂIf you > don't leave host Linux system some resources you will get bad VM > performance. Nope, not overcommitted. Sum of RAM for all VMs (in MB): 512 + 768 + 1024 + 512 + 512 + 1024 + 1024 + 768 + 8192 = 14226 Leaving a little under 2 GB for the host. Doing further googling, could it be a caching issue in the host? We currently have no cache= settings for any of our virtual disks. I believe the default is still write-through? so the host is trying to cache everything. >From top on the host: Mem: 16539696k total, 16467616k used, 72080k free, 3153416k buffers Swap: 3253120k total, 2072976k used, 1180144k free, 194832k cached Over 2 GB of swap used, and 3 GB in buffers. One of our VMs is a Zimbra install, so it's doing a lot of reads/writes to disk (~2100 users) (the 8 GB VM). Another is our main web server, running Apache + Drupal + MySQL (1 GB VM), so also doing a fair bit of read/write to disk. The others are lightly-used web servers and Windows VMs used for remote desktop. I'm going to restart the VMs over the weekend using cache=none for the virtio disks and see if that makes a difference. Anyone know how to force libvirt to use cache='none' in the <driver> block? libvirt-bin 0.8.3 and virt-manager 0.8.4 ignore it if I edit the domain.xml file directly, and there's nowhere to set it in the virt-manager GUI. (Only 1 of the VMs is managed via libvirt currently.) -- Freddie Cash fjwcash@xxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html