From: Avi Kivity <avi@redhat.com>
To: "Pozsár Balázs" <pozsy@uhulinux.hu>
Cc: kvm@vger.kernel.org
Subject: Re: ping latency using vhost_net, macvtap and virtio
Date: Tue, 04 Sep 2012 15:51:17 +0300 [thread overview]
Message-ID: <5045F945.9060605@redhat.com> (raw)
In-Reply-To: <503DD42B.7050808@uhulinux.hu>
On 08/29/2012 11:34 AM, Pozsár Balázs wrote:
>
> Hi all,
>
> I have been testing network throughput and latency and I was wondering
> if my measurements are as expected.
> For the test, I used Fedora 17 for both host and guest, using kernel
> 3.5.2-3.fc17.86_64.
>
> Pinging an external server on the LAN from the host, using a gigabit
> interface, the results are:
> # ping -c 10 172.16.1.1
> PING 172.16.1.1 (172.16.1.1) 56(84) bytes of data.
> 64 bytes from 172.16.1.1: icmp_req=1 ttl=64 time=0.109 ms
> 64 bytes from 172.16.1.1: icmp_req=2 ttl=64 time=0.131 ms
> 64 bytes from 172.16.1.1: icmp_req=3 ttl=64 time=0.145 ms
> 64 bytes from 172.16.1.1: icmp_req=4 ttl=64 time=0.116 ms
> 64 bytes from 172.16.1.1: icmp_req=5 ttl=64 time=0.110 ms
> 64 bytes from 172.16.1.1: icmp_req=6 ttl=64 time=0.114 ms
> 64 bytes from 172.16.1.1: icmp_req=7 ttl=64 time=0.112 ms
> 64 bytes from 172.16.1.1: icmp_req=8 ttl=64 time=0.117 ms
> 64 bytes from 172.16.1.1: icmp_req=9 ttl=64 time=0.119 ms
> 64 bytes from 172.16.1.1: icmp_req=10 ttl=64 time=0.128 ms
>
> --- 172.16.1.1 ping statistics ---
> 10 packets transmitted, 10 received, 0% packet loss, time 8999ms
> rtt min/avg/max/mdev = 0.109/0.120/0.145/0.011 ms
>
>
> Pinging the same external host on the LAN from the guest, the latency
> seems to be much higher:
> # ping -c 10 172.16.1.1
> PING 172.16.1.1 (172.16.1.1) 56(84) bytes of data.
> 64 bytes from 172.16.1.1: icmp_req=1 ttl=64 time=0.206 ms
> 64 bytes from 172.16.1.1: icmp_req=2 ttl=64 time=0.352 ms
> 64 bytes from 172.16.1.1: icmp_req=3 ttl=64 time=0.518 ms
> 64 bytes from 172.16.1.1: icmp_req=4 ttl=64 time=0.351 ms
> 64 bytes from 172.16.1.1: icmp_req=5 ttl=64 time=0.543 ms
> 64 bytes from 172.16.1.1: icmp_req=6 ttl=64 time=0.387 ms
> 64 bytes from 172.16.1.1: icmp_req=7 ttl=64 time=0.348 ms
> 64 bytes from 172.16.1.1: icmp_req=8 ttl=64 time=0.364 ms
> 64 bytes from 172.16.1.1: icmp_req=9 ttl=64 time=0.345 ms
> 64 bytes from 172.16.1.1: icmp_req=10 ttl=64 time=0.334 ms
>
> --- 172.16.1.1 ping statistics ---
> 10 packets transmitted, 10 received, 0% packet loss, time 8999ms
> rtt min/avg/max/mdev = 0.206/0.374/0.543/0.093 ms
>
>
> The LAN, the host and guest are idle otherwise during the tests.
> There are no iptables rules active.
> The vhost_net and macvtap modules are loaded on the host, and qemu was
> started (by libvirtd) with the -netdev vhost=on option.
> The guest is using the virtio_net driver.
>
> Is this expected and normal, or do others see better latencies? Can I
> try anything to make it better?
We've seen this, at least in once case the problem is due to the extra
threads needed for virtualization; each one of them sits on a core, and
if that core is in deep C state it will take quite a while to wake up.
You can verify this by booting the host with idle=poll on the kernel
command line, or simply running some load in the background.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2012-09-04 12:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-29 8:34 ping latency using vhost_net, macvtap and virtio Pozsár Balázs
2012-09-04 12:51 ` Avi Kivity [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-08-27 16:09 Pozsár Balázs
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=5045F945.9060605@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pozsy@uhulinux.hu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.