From: Xupeng Yun <recordus@gmail.com>
To: kvm@vger.kernel.org
Subject: High latency with VirtIO NIC
Date: Thu, 24 Mar 2011 08:37:16 +0800 [thread overview]
Message-ID: <750D7880952B4EEF856255153646029D@gmail.com> (raw)
Hi,
I deployed KVM on my Gentoo servers for performance testing, but I am now having high
latency problems with the VirtIO NIC:
diggle7 is the KVM host, diggle6 is another physical host in the same physical network, and
app211 is a KVM guest running on diggle7.
------------------------------- ping statistics -------------------------------
diggle7 ~ # ping -c 5 app211
PING app211 (192.168.1.211) 56(84) bytes of data.
64 bytes from app211 (192.168.1.211): icmp_seq=1 ttl=64 time=0.454 ms
64 bytes from app211 (192.168.1.211): icmp_seq=2 ttl=64 time=0.097 ms
64 bytes from app211 (192.168.1.211): icmp_seq=3 ttl=64 time=0.248 ms
64 bytes from app211 (192.168.1.211): icmp_seq=4 ttl=64 time=0.355 ms
64 bytes from app211 (192.168.1.211): icmp_seq=5 ttl=64 time=0.494 ms
--- app211 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3998ms
rtt min/avg/max/mdev = 0.097/0.329/0.494/0.145 ms
diggle7 ~ # ping -c 5 diggle6
PING diggle6 (192.168.1.44) 56(84) bytes of data.
64 bytes from diggle6 (192.168.1.44): icmp_seq=1 ttl=64 time=0.101 ms
64 bytes from diggle6 (192.168.1.44): icmp_seq=2 ttl=64 time=0.076 ms
64 bytes from diggle6 (192.168.1.44): icmp_seq=3 ttl=64 time=0.085 ms
64 bytes from diggle6 (192.168.1.44): icmp_seq=4 ttl=64 time=0.130 ms
64 bytes from diggle6 (192.168.1.44): icmp_seq=5 ttl=64 time=0.083 ms
--- diggle6 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3998ms
rtt min/avg/max/mdev = 0.076/0.095/0.130/0.019 ms
------------------------------- ping statistics -------------------------------
as above, the latency between Host and KVM guest(0.3+ms on average) is much higher
than the latency between the two physical hosts(~0.1ms on average), this might not be
acceptable for latency sensitive applications, for example memcached.
is the latency normal? or is there something wrong with my configuration? here is detailed
information about my hardware and software environment:
Host hardware: DELL R710 + Intel Xeon E5620 @2.40GHz + 96GB memory + BCM5709 GB Ethernet
Host software: Gentoo amd64 + 2.6.36-gentoo-r5 + qemu-kvm-0.13.0
KVM related kernel configs for the host (diggle7):
diggle7 ~ # zgrep -E "(VIRTIO|KVM)" /proc/config.gz
CONFIG_VIRTIO_BLK=m
CONFIG_VIRTIO_NET=m
# CONFIG_VIRTIO_CONSOLE is not set
CONFIG_HW_RANDOM_VIRTIO=m
CONFIG_HAVE_KVM=y
CONFIG_HAVE_KVM_IRQCHIP=y
CONFIG_HAVE_KVM_EVENTFD=y
CONFIG_KVM_APIC_ARCHITECTURE=y
CONFIG_KVM_MMIO=y
CONFIG_KVM=m
CONFIG_KVM_INTEL=m
# CONFIG_KVM_AMD is not set
CONFIG_VIRTIO=m
CONFIG_VIRTIO_RING=m
CONFIG_VIRTIO_PCI=m
CONFIG_VIRTIO_BALLOON=m
Kernel modules loaded on the host:
diggle7 ~ # lsmod
Module Size Used by
virtio_balloon 4098 0
tun 12809 2
bridge 63340 0
stp 1871 1 bridge
llc 4595 2 bridge,stp
drbd 181114 7
lru_cache 6273 1 drbd
virtio_net 10812 0
virtio 3978 2 virtio_balloon,virtio_net
virtio_ring 4692 2 virtio_balloon,virtio_net
xt_state 1218 1
iptable_filter 1626 1
iptable_nat 3806 0
nf_nat 15835 1 iptable_nat
nf_conntrack_ipv4 11106 4 iptable_nat,nf_nat
nf_defrag_ipv4 1361 1 nf_conntrack_ipv4
iptable_mangle 1591 0
ipmi_devintf 7380 0
ipmi_si 37990 0
ipmi_msghandler 31256 2 ipmi_devintf,ipmi_si
kvm_intel 42059 18
kvm 248729 1 kvm_intel
fuse 58921 2
KVM related kernel configs for the guest (app211):
app211 ~ # zgrep -E "(VIRTIO|KVM)" /proc/config.gz
CONFIG_KVM_CLOCK=y
CONFIG_KVM_GUEST=y
CONFIG_VIRTIO_BLK=y
CONFIG_VIRTIO_NET=y
CONFIG_VIRTIO_CONSOLE=y
CONFIG_HW_RANDOM_VIRTIO=y
CONFIG_HAVE_KVM=y
# CONFIG_KVM is not set
CONFIG_VIRTIO=y
CONFIG_VIRTIO_RING=y
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_BALLOON=y
Command line for starting the KVM guest:
diggle7 ~ # pgrep -fl qemu
18154 /usr/bin/qemu-system-x86_64 --enable-kvm -drive file=/vm/app211/app211.qcow2,if=virtio,boot=on,cache=writeback -cdrom /mfs/sysadmin/finnix.iso -boot c -vnc diggle7:211 -net nic,model=virtio,macaddr=52:54:C0:A8:01:D3 -net tap,ifname=app211,script=no -m 30720 -cpu host -smp 16 -daemonize
any help will be appreciated.
Thanks,
Xupeng
next reply other threads:[~2011-03-24 0:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-24 0:37 Xupeng Yun [this message]
2011-03-24 10:22 ` High latency with VirtIO NIC Avi Kivity
2011-03-24 13:45 ` Xupeng Yun
2011-03-24 13:50 ` Xupeng Yun
2011-03-24 14:08 ` Avi Kivity
2011-03-24 14:24 ` Xupeng Yun
2011-03-24 14:27 ` Avi Kivity
2011-03-24 14:34 ` Xupeng Yun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=750D7880952B4EEF856255153646029D@gmail.com \
--to=recordus@gmail.com \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox