From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dor Laor Subject: Re: kvm network latency, higher with virtio ? Date: Wed, 16 Sep 2009 11:47:07 +0300 Message-ID: <4AB0A60B.3090207@redhat.com> References: <20090915151509.GC22518@esaurito.net> <20090916072731.GA28995@redhat.com> Reply-To: dlaor@redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Luca Bigliardi , kvm@vger.kernel.org To: "Michael S. Tsirkin" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:30312 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751649AbZIPIrU (ORCPT ); Wed, 16 Sep 2009 04:47:20 -0400 In-Reply-To: <20090916072731.GA28995@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 09/16/2009 10:27 AM, Michael S. Tsirkin wrote: > On Tue, Sep 15, 2009 at 05:15:09PM +0200, Luca Bigliardi wrote: >> Hi, >> I'm running some tests between two linux instances bridged together. >> >> If I try to ping 10 times I obtain the following results: >> >> -net nic,model=virtio -net tap : >> rtt min/avg/max/mdev = 0.756/0.967/2.115/0.389 ms >> >> -net nic,model=rtl8139 -net tap : >> rtt min/avg/max/mdev = 0.301/0.449/1.173/0.248 ms >> >> So it seems with virtio the latency is higher. Is it normal? > > Yes, the main reason is the TX timer it uses for interrupt/vm exit mitigation. Originally we used the tx mitigation timer in order to provide better throughput on the expense of latency. Measurements of older versions of virtio proved that we can cancel this timer and achieve better latency while not hurting throughput. Vhost wouldn't use it. For the time being until be get vhost, we should probably remove it from qemu. > >> The results I'm reporting were obtained with >> - host >> qemu-kvm 0.11-rc2 >> kvm-kmod-2.6.30.1 >> kernel: 2.6.30.5 (HIGH_RES_TIMERS=y as suggested in >> http://www.linux-kvm.org/page/Virtio ) >> - guest >> kernel: 2.6.31 >> >> but I also tested older versions always obtaining latency values at least two >> times higher than rtl8139/e1000 . >> >> Thank you, >> Luca >> >> -- >> To unsubscribe from this list: send the line "unsubscribe kvm" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html