Virtio network performance poorer than emulated e1000

Balachandar
2010-07-22T23:53:52Z

I am resending this email as Freddie didn't use 'reply to all' when
replying to this message. I am also updating to answer Freddie's
questions..

I can see that virtio network performance is poorer than emaulated
e1000 nic. I did some simple ping test and with emulated e1000 the
average rtt is around 600 microsec. With virtio the average rtt is 800
microsec. I am using a tap + bridge configuration. I run kvm as
follows

kvm -m 512 -hda vdisk.img \
-net nic,model=virtio \
-net tap,ifname=tap0,script=qemu-ifup,downscript=no

I am running Debian squeeze distribution with guest and host kernel 2.6.34.

Does anyone else see some results like this or is it only me? Could
changing the distribution help as i am running a testing one?

Actually we are having a custom application which just measures
ping-pong latency. The results that i get with virtio is around 750
micro seconds. The result i get with emulated e1000 is around 250
micro sec. Also i tried to use vhost but the virtio latency remained
the same.

Also i tried the tests with guest and host 2.6.26 kernel. I get better
results for virtio than e1000. I get 550 for e1000 and 500 for virtio.

Actually my application needs as minimum latency as needed. I am ready
to trade-off throughput and cpu utilization. I was very excited when i
saw the vhost-net module with people claiming low latencies. I am
worried that i am missing some performance offered by virtio and
vhost.

Thanks,
Bala