RE: Degrading Network performance as KVM/kernel version increases

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

 



>I can't say anything about the kernel version making things worse. At 
>least for the qemu-kvm version, you should be using -device and -netdev

>instead of -net nic -net tap (see 
>*http://git.qemu.org/qemu.git/tree/docs/qdev-device-use.txt since it's 
>not in the 0.12 tree).*

Thanks for your suggestion Brian I was not doing this correctly. After
changing to -device and -netdev I did get a significant performance
increase although overall performance is still much worse than what I
was getting in the 2.3.31.5 kernel with version 11.  Below is part of my
startup script. Any chance you notice anything else wrong?  

Before your suggestion (what was working well with version 11 & 2.6.31):
  modprobe kvm
  modprobe kvm_intel
  modprobe tun
  echo -e "Setting up bridge device br0" "\r"
  brctl addbr br0
  ifconfig br0 192.168.100.254 netmask 255.255.255.0 up
  brctl addif br0 eth7
  ifconfig eth7 down
  ifconfig eth7 0.0.0.0
  for ((i=0; i < NUM_OF_DEVICES ; i++)); do
               echo -e "Setting up " "\r"
               tunctl -b -g ${KVMNET_GID} -t kvmnet$i
               brctl addif br0 kvmnet$i
               ifconfig kvmnet$i up 0.0.0.0 promisc
 done
 echo "1" > /proc/sys/net/ipv4/ip_forward
 iptables -t nat -A POSTROUTING -s 192.168.100.0/24 -o eth7 -j
MASQUERADE
 for ((i=0; i < NUM_OF_DEVICES ; i++)); do
	    echo -e "Creating Virtual disk" $i "\r"
	    qemu-img create -f qcow2 vdisk_$i.img $VDISK_SIZE
	    echo -e "Starting Virtual Machine" $i "\r"
	    /root/bin/qemu-system-x86_64 -cpu host -drive
file=./vdisk_$i.img,if=virtio,boot=on -cdrom ./$2 -boot d \
		-net nic,model=virtio,macaddr=52:54:00:12:34:3$i \
		-net tap,ifname=kvmnet$i,script=no \
		-m 1024 \
		-smp 2 \
		-usb \
		-usbdevice tablet \
		-localtime \
		-daemonize \
            -vga std


After changing to -device and -netdev(working better with the latest
stuff but still much worse than 2.6.31):
	modprobe kvm
      modprobe kvm_intel
      modprobe tun
      echo -e "Setting up bridge device br0" "\r"
      brctl addbr br0
      ifconfig br0 192.168.100.254 netmask 255.255.255.0 up
      brctl addif br0 eth7
      ifconfig eth7 down
      ifconfig eth7 0.0.0.0
      for ((i=0; i < NUM_OF_DEVICES ; i++)); do
               echo -e "Setting up " "\r"
               tunctl -b -g ${KVMNET_GID} -t kvmnet$i
               brctl addif br0 kvmnet$i
               ifconfig kvmnet$i up 0.0.0.0 promisc
       done
	echo "1" > /proc/sys/net/ipv4/ip_forward
	iptables -t nat -A POSTROUTING -s 192.168.100.0/24 -o eth7 -j
MASQUERADE
	for ((i=0; i < NUM_OF_DEVICES ; i++)); do
	    echo -e "Creating Virtual disk" $i "\r"
	    qemu-img create -f qcow2 vdisk_$i.img $VDISK_SIZE
	    echo -e "Starting Virtual Machine" $i "\r"
	    /root/bin/qemu-system-x86_64 -cpu host -drive
file=./vdisk_$i.img,if=virtio,boot=on -cdrom ./$2 -boot d \
		-netdev type=tap,id=tap.0,script=no,ifname=kvmnet$i \
		-device
virtio-net-pci,netdev=tap.0,mac=52:54:00:12:34:3$i \
		-m 1024 \
		-smp 2 \
		-usb \
		-usbdevice tablet \
		-localtime \
		-daemonize \
            -vga std



>Vhost-net is probably your best bet for maximizing throughput. You
might 
>try a separate post just for the vhost error if nobody chimes in about 
>it here.

I will do that.

Thanks again for the input! --Matt
--
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