Re: Very high memory usage with KVM

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

 



Hi Avi.

On Sunday, 26 July 2009 19:19:39 +0300,
Avi Kivity wrote:

> >>kvm memory management with pre 2.6.27 host kernels is pretty weak.
> >>Using a newer host kernel (and newer kvm) may solve this problem.
> >
> >Initially I am going to see how it improves the situation upgrading
> >to KVM-84 of backports of Hardy Heron, since at the moment last
> >kernel available for Hardy is the one I has commented.
> >
> >I would like to know if the newest versions of KVM published in the
> >official site of the project solve a bug recently reported in Ubuntu
> >Launchpad [1]. Also I was observing errors of type 'to swapper Not
> >tainted' or 'java Not tainted' in the VM (aps2, with a high rate of
> >I/O) and that I've commented in a previous message sent to the list
> >[2]. I would want to know if you could indicate to me if this can be
> >due to KVM bug that would be solved in a later version.

> My guess is that it is due to poor swapping with pre-2.6.27 hosts.
> 15 GB used out of 16GB total is just 6% reserve, which may be a bit
> too low.  With a 2.6.27 host some small amount of memory would be
> swapped out, before that you'd see thrashing.  Another way to check
> is to drop one guest (or reduce total memory needed by 1GB) and see
> if you get the same results or if things improve.

I was testing in another equipment of similar characteristics with 4 VMs of
3.5 GiB of RAM on LVM and rather less the 16 GB of RAM in use in the host
machine and 4 GIB available of the 8 GIB of swap, and after to update to
KVM-88 the use of virtual memory improved enough.

At the moment these are the statistics of memory usage:

root@ss03:~# free
             total       used       free     shared    buffers     cached
Mem:      16463396    6700900    9762496          0    2805756     391884
-/+ buffers/cache:    3503260   12960136
Swap:      8319948          0    8319948


Still I didn't update the kernel, so I am using KVM-88 with kernel
2.6.24-19. I would like to know if this can have some disadvantage, since
in the official site of the project I was reading that kernel has to be
2.6.25 or newer to run the kvm 76 userspace (or any newer release).

The reason by which I didn't update kernel is because I was with some
problems with the network interface on the host machine. Perhaps this
problem is off-topic, but if somebody can help me with this, then it would
contribute whereupon it can improve the KVM performance.

I've downloaded to the source code of 2.6.30.3 and I compiled it with:

# fakeroot make-kpkg clean
# fakeroot make-kpkg --initrd --append-to-version=-dgb kernel_image kernel_headers

Although the compilation finishes without problems, I am having a
problem booting the operating system. The interfaces fail to load. This
equipment is a Proliant DL380 G5 with two NetXtreme II BCM5708 Ethernet
Gigabit interfaces.

With kernel of the Ubuntu Hardy repositories I did not have any kind of
problem, but with kernel compiled by myself I obtain the following error
message during the boot that it suggests cannot accede to firmware of
this network interface:

Aug  4 17:38:39 ss03 kernel: [    4.750023] bnx2 0000:03:00.0: firmware: requesting bnx2/bnx2-mips-06-4.6.16.fw
Aug  4 17:38:39 ss03 kernel: [    4.751070] bnx2: Can't load firmware file "bnx2/bnx2-mips-06-4.6.16.fw"
Aug  4 17:38:39 ss03 kernel: [    4.751141] bnx2 0000:03:00.0: PCI INT A disabled
Aug  4 17:38:39 ss03 kernel: [    4.751167] bnx2: probe of 0000:03:00.0 failed with error -2
Aug  4 17:38:39 ss03 kernel: [    4.751244] bnx2 0000:05:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17

The peculiar thing is that if I do:

# rmmod bnx2
# modprobe bnx2

Yes it loads the interfaces. I read something of this in a bug report of
Debian GNU/Linux [1] and tried with the suggestion to do:

# update-initramfs -u

The files seem to be:

# find / | grep bnx
/boot/lib/modules/2.6.30.3-dgb/kernel/drivers/net/bnx2.ko
/sys/bus/pci/drivers/bnx2
/sys/bus/pci/drivers/bnx2/0000:03:00.0
/sys/bus/pci/drivers/bnx2/0000:05:00.0
/sys/bus/pci/drivers/bnx2/module
/sys/bus/pci/drivers/bnx2/uevent
/sys/bus/pci/drivers/bnx2/unbind
/sys/bus/pci/drivers/bnx2/bind
/sys/bus/pci/drivers/bnx2/new_id
/sys/bus/pci/drivers/bnx2/remove_id
/sys/module/bnx2
/sys/module/bnx2/holders
/sys/module/bnx2/version
/sys/module/bnx2/srcversion
/sys/module/bnx2/initstate
/sys/module/bnx2/refcnt
/sys/module/bnx2/sections
/sys/module/bnx2/sections/.note.gnu.build-id
/sys/module/bnx2/sections/.text
/sys/module/bnx2/sections/.exit.text
/sys/module/bnx2/sections/.devinit.text
/sys/module/bnx2/sections/.init.text
/sys/module/bnx2/sections/.devexit.text
/sys/module/bnx2/sections/.rodata
/sys/module/bnx2/sections/.rodata.str1.1
/sys/module/bnx2/sections/.smp_locks
/sys/module/bnx2/sections/__bug_table
/sys/module/bnx2/sections/.rodata.str1.8
/sys/module/bnx2/sections/__param
/sys/module/bnx2/sections/.devinit.rodata
/sys/module/bnx2/sections/.data
/sys/module/bnx2/sections/.devinit.data
/sys/module/bnx2/sections/.gnu.linkonce.this_module
/sys/module/bnx2/sections/.bss
/sys/module/bnx2/sections/.symtab
/sys/module/bnx2/sections/.strtab
/sys/module/bnx2/notes
/sys/module/bnx2/notes/.note.gnu.build-id
/sys/module/bnx2/drivers
/sys/module/bnx2/drivers/pci:bnx2
/lib/firmware/bnx2
/lib/firmware/bnx2/bnx2-rv2p-06-4.6.16.fw
/lib/firmware/bnx2/bnx2-mips-06-4.6.16.fw
/lib/firmware/bnx2/bnx2-rv2p-09-4.6.15.fw
/lib/firmware/bnx2/bnx2-mips-09-4.6.17.fw
/lib/modules/2.6.30.4-dgb/kernel/drivers/net/bnx2.ko
/lib/modules/2.6.24-19-server/kernel/drivers/net/bnx2.ko


But after boot I have again the same problem.

/etc/initramfs-tools/modules doesn't make reference to some module. I do
not see that in Ubuntu Hardy firmware-bnx2 is a package, although am not
sure either if it is necessary with kernel compiled from the sources.

With 2.6.30.4 it happens the same exactly.


Thanks for your reply.

Regards,
Daniel

[1] http://www.linux-kvm.org/page/Downloads
-- 
Fingerprint: BFB3 08D6 B4D1 31B2 72B9  29CE 6696 BF1B 14E6 1D37
Powered by Debian GNU/Linux Squeeze - Linux user #188.598

Attachment: signature.asc
Description: Digital signature


[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