From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: performance of virtual functions compared to virtio Date: Thu, 21 Apr 2011 11:07:26 +0300 Message-ID: <4DAFE5BE.1070506@redhat.com> References: <4DAF8EF0.8010203@gmail.com> <1303353349.3110.181.camel@x201> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: David Ahern , KVM mailing list To: Alex Williamson Return-path: Received: from mx1.redhat.com ([209.132.183.28]:29177 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754031Ab1DUIHb (ORCPT ); Thu, 21 Apr 2011 04:07:31 -0400 In-Reply-To: <1303353349.3110.181.camel@x201> Sender: kvm-owner@vger.kernel.org List-ID: On 04/21/2011 05:35 AM, Alex Williamson wrote: > Device assignment via a VF provides the lowest latency and most > bandwidth for *getting data off the host system*, though virtio/vhost is > getting better. If all you care about is VM-VM on the same host or > VM-host, then virtio is only limited by memory bandwidth/latency and > host processor cycles. Your processor has 25GB/s of memory bandwidth. > On the other hand, the VF has to send data all the way out to the wire > and all the way back up through the NIC to get to the other VM/host. > You're using a 1Gb/s NIC. Your results actually seem to indicate you're > getting better than wire rate, so maybe you're only passing through an > internal switch on the NIC, in any case, VFs are not optimal for > communication within the same physical system. They are optimal for off > host communication. Thanks, > Note I think in both cases we can make significant improvements: - for VFs, steer device interrupts to the cpus which run the vcpus that will receive the interrupts eventually (ISTR some work about this, but not sure) - for virtio, use a DMA engine to copy data (I think there exists code in upstream which does this, but has this been enabled/tuned?) -- error compiling committee.c: too many arguments to function