Re: Memory leaks in virtio drivers?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



26.11.2010 22:19, Freddie Cash wrote:
> Are there still known memory leaks in the virtio block and/or net
> drivers?  If not, have we found one?
> 
> This is our host setup:
>   - Tyan h2000M motherboard
>   - 2x dual-core AMD Opteron 2220 CPUs
>   - 16 GB RAM
>   - quad-port NIC bonded together into 1 kvmbr0 interface
>   - 3Ware 9550SXU-12ML RAID controller
>   - 12x 400 GB SATA drives (4-disk RAID5, 4-disk RAID5, 3-disk RAID5,
> spare disk)
>   - LVM used to stitch the 3 arrays into one volume group
> 
> Running 64-bit Debian 5.0 (Lenny), using qemu-kvm0.12.4 and kernel
> 2.6.32 from lenny-backports.

There were some memleaks in i/o paths fixed in 0.12 series of kvm.
In particular, 0.12.4 upstream version had a memory leak in virtio_blk,
but that bug isn't present in 0.12.4+dfsg-1 - first 0.12.4 version as
appeared in debian (the fix included upstream in 0.12.5).  I know no
other memleaks in later 0.12 series which aren't fixed in debian.

> Guests are Ubuntu Server 8.04 LTS, Debian Lenny, Windows XP, and Windows 2003.

For debian lenny guests using virtio, consider switching to
backports 2.6.32 kernel too - lenny's 2.6.26 has several
defects in virtio implementation.

> All of the Linux VMs use virtio for both network and disk.
> All the Windows VMs use virtio for network and IDE emulation for disk.
> 
> 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%.
> 
> Going back through the mailing list archives and bug archives, there's
> been mention of several memory leaks in the virtio drivers back to
> KVM-72.  Last bug report I read shows them all being fixed in 0.12.4,
> which we're running.

Yes, 0.12.4 had that bug, but it's fixed in 0.12.4+dfsg-1.
The current version in backports is based on 0.12.5.

> Perhaps there's something wrong with our setup?  Perhaps there's still
> a leak to be found?  Perhaps this is fixed in 0.12.5 or newer?

Well, how about reading the changelog first, before asking? They're
there for a reason, right?

Speaking of your setup, in addition to what Stephen said already,
I'd strongly suggest considering hugepages - for this amount of
memory hugepages should help quite alot, and this way you'll eliminate
lots of pagetable entries.

/mjt
--
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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux