Re: Memory leaks in virtio drivers?

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

 



27.11.2010 00:38, Freddie Cash wrote:
> On Fri, Nov 26, 2010 at 1:00 PM, Michael Tokarev <mjt@xxxxxxxxxx> wrote:
[]
>> Well, how about reading the changelog first, before asking? They're
>> there for a reason, right?
> 
> I read everything under /usr/share/doc/[qemu|kvm|libvirt], along with
> the release notes on the qemu/kvm websites, and ended up with more
> questions than answers, hence why I posted.  :)  I also read through a
> bunch of old threads on the kvm mailing list, several bug reports for
> qemu, qemu-kvm, libvirt, rhel, and so forth.

No, I mean the changelog for the more recent debian packages.
But it was more of a joke actually, please don't treat it too
seriously.

> The repeating theme through them all was that mem leaks in virtio
> cropped up every other release or so, including some major ones in the
> 0.12.x series (0.12.3 and 0.12.4 especially).  The symptoms we're
> having now are the same ones we originally had with KVM-72 when we
> first switched from SCSI-emulated disks to virtio.

qemu-kvm has a long history of bugs, that's true.
That's why I kept 0.12 in Debian stable, instead
of switching to 0.13.  Lots of code, lots of new
code too, difficult to have it bug-free from the
beginning.

Besides, maybe you hit yet another, still unknown
bug of this theme - which is also a possibility
ofcourse.  No, kvm-0.12.5 (+ a few patches) is
used to run guests in production, with quite
some uptime too, and unlike with <=0.12.4, there
were nothing wrong so far.

>> 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.
> 
> Hrm, I'll have to do some more googling on this.  There's nothing
> about it in the man pages or --help output, but I've seen it
> references on the mailing list.  Same for KSM (as suggested in another
> message), although would that be helpful with such a variety of VM
> guest OSes (Debian Etch, Debian Lenny, Ubuntu Server, Windows XP,
> Windows 2003)?

KSM may help, but it wont work with hugepages (since
the more the page size is, the less chances to find
another page with same contents).

Hugepages - see -mem-path parameter.  It's not widely
known feature.  The idea is that you allocate hugepages
at boot, mount hugetlbfs, and give path to it in -mem-path,
so that instead of malloc() kvm uses mmap() there.  Or
something of that theme.

Hugepages are unswappable and unsharable (KSM), but they're
much lighter in terms of pagetables and tlb misses.

/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