KVM optimization

bread-baker

Member
Mar 6, 2010
432
0
16
With ha working great for kvm on drbd I'm tempted to switch a container to kvm. this container is where we do a lot of data entry.
But speed tests on our data show ct 7 times faster then kvm.

The system runs debian etch. Inside the system, memory and cpu usage are low.

In case someone has a suggestion to speed up our kvm, here is the conf file:
Code:
boot: c
bootdisk: ide0
cores: 4
cpu: host
cpuunits: 50000
ide0: drbd-fbc241:vm-103-disk-1
ide2: none,media=cdrom
memory: 512
name: etch-kvm-20
net0: e1000=EA:91:8C:B6:89:EB,bridge=vmbr0
onboot: 1
ostype: l26
scsi0: drbd-fbc241:vm-103-disk-2,backup=no
sockets: 2
 
using virtio would help but the default etch kernel does not have the virtio drivers included. I never tried this but search the web for an etch kernel with virtio drivers, maybe you find something.
 
I finally got around to converting our 4 etch kvm's to use virtio disk. here are notes for future reference

convert etch systems to use virtio


http://www.mail-archive.com/kvm@vger.kernel.org/msg41659.html

* /etc/apt/sources.list
# add backports


deb http://archive.debian.org/debian/ etch main contrib non-free
deb http://archive.debian.org/debian-backports etch-backports main


* kernel needed from backports
aptitude install linux-image-2.6.26-bpo.2-686

* /etc/initramfs-tools/modules
# add
virtio_pci
virtio_blk

# run update-initramfs -u

* /etc/modules
#add
virtio_pci
virtio_blk

* /etc/fstab
# change hda to vda
/dev/vda1 / ext3 defaults,errors=remount-ro 0 1

* /boot/grub/menu.lst
# kopt=root=/dev/vda1 ro

then run
update-grub


*pve
follow change to virtio disk procedures outlined on wiki

remove then re add disks, make sure boot order is correct.
 
Last edited: