From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754466AbbBOHkk (ORCPT ); Sun, 15 Feb 2015 02:40:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36969 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751124AbbBOHkj (ORCPT ); Sun, 15 Feb 2015 02:40:39 -0500 Date: Sun, 15 Feb 2015 07:48:32 +0008 From: Jason Wang Subject: Re: how to optimize virtio-vhost in 10G net To: Ding Xiao Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Message-Id: <1423986032.21931.0@smtp.corp.redhat.com> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 15, 2015 at 3:30 PM, Ding Xiao wrote: > I am test virtio-vhost in 10G environment > > host info > cpu E2680@2.7GHz > memory 16G > network intel 82599BE > os centos 7 > > VM info > cpu 4 > memory 4G > network using virtio vhost > os centos 7 > > I using pktgen to send udp package, the result like follow > 64b 230Mb/s > 1400b 5.9Gb/s > > I test the speed in VMware too, the result like follow > 64b 700Mb/s > 1400 9.3Gb/s > > I am very surprised why the speed with virtio-vhost is slow > so I test to analysis this by using perf tool > I found the tun_sendmsg occupancy rate of 35% It looks like you're using pktgen in guest. Pktgen has known issue with driver that does not have tx completion. See discussion here: https://patchwork.kernel.org/patch/1800711/ So you can't trust pktgen result in this case. > > tun_sendmsg using copy_from_user to get the data from VM > Perhaps mapping could improve the performance ? If you enable vhost_net zerocopy, you will see obvious improvements. > > or other Another improvement method ? I suggest that you can use other benchmark tools (or apply the patch in the above link with pktgen). > > -- > 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