From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: Network performance with small packets Date: Thu, 27 Jan 2011 21:00:31 +0200 Message-ID: <20110127190031.GC5228@redhat.com> References: <20110126151700.GA14113@redhat.com> <1296153874.1640.27.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Steve Dobbelstein , kvm@vger.kernel.org To: Shirley Ma Return-path: Received: from mx1.redhat.com ([209.132.183.28]:24188 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752865Ab1A0TAt (ORCPT ); Thu, 27 Jan 2011 14:00:49 -0500 Content-Disposition: inline In-Reply-To: <1296153874.1640.27.camel@localhost.localdomain> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Jan 27, 2011 at 10:44:34AM -0800, Shirley Ma wrote: > On Wed, 2011-01-26 at 17:17 +0200, Michael S. Tsirkin wrote: > > I am seeing a similar problem, and am trying to fix that. > > My current theory is that this is a variant of a receive livelock: > > if the application isn't fast enough to process > > incoming data, the guest net stack switches > > from prequeue to backlog handling. > > > > One thing I noticed is that locking the vhost thread > > and the vcpu to the same physical CPU almost doubles the > > bandwidth. Can you confirm that in your setup? > > > > My current guess is that when we lock both to > > a single CPU, netperf in guest gets scheduled > > slowing down the vhost thread in the host. > > > > I also noticed that this specific workload > > performs better with vhost off: presumably > > we are loading the guest less. > > I found similar issue for small message size TCP_STREAM test when guest > as TX. I found when I slow down TX, the BW performance will be doubled > for 1K to 4K message size. > > Shirley Interesting. In particular running vhost and the transmitting guest on the same host would have the effect of slowing down TX. Does it double the BW for you too? -- MST