From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: Re: [PATCH] virtio-net: fill only rx queues which are being used Date: Tue, 23 Apr 2013 10:52:43 -0400 Message-ID: <5176A03B.3080407@oracle.com> References: <1366677336-2278-1-git-send-email-sasha.levin@oracle.com> <20130423070845.GA23530@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: rusty@rustcorp.com.au, penberg@kernel.org, will.deacon@arm.com, marc.zyngier@arm.com, kvm@vger.kernel.org, asias@redhat.com, jasowang@redhat.com To: "Michael S. Tsirkin" Return-path: Received: from aserp1040.oracle.com ([141.146.126.69]:32345 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755056Ab3DWOx2 (ORCPT ); Tue, 23 Apr 2013 10:53:28 -0400 In-Reply-To: <20130423070845.GA23530@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 04/23/2013 03:08 AM, Michael S. Tsirkin wrote: > On Mon, Apr 22, 2013 at 08:35:36PM -0400, Sasha Levin wrote: >> Due to MQ support we may allocate a whole bunch of rx queues but >> never use them. With this patch we'll safe the space used by >> the receive buffers until they are actually in use: >> >> sh-4.2# free -h >> total used free shared buffers cached >> Mem: 490M 35M 455M 0B 0B 4.1M >> -/+ buffers/cache: 31M 459M >> Swap: 0B 0B 0B >> sh-4.2# ethtool -L eth0 combined 8 >> sh-4.2# free -h >> total used free shared buffers cached >> Mem: 490M 162M 327M 0B 0B 4.1M >> -/+ buffers/cache: 158M 331M >> Swap: 0B 0B 0B >> >> Signed-off-by: Sasha Levin > > Overall the idea looks fine to me. > > I also ask myself whether we should enable multiqueue capability > with big buffers. 130M extra memory seems excessive. > Want to try on the kvmtools version that has mergeable buffers? > Memory use should be much lower. It is indeed, with mergable buffers: sh-4.2# free -h total used free shared buffers cached Mem: 490M 18M 471M 0B 0B 4.1M -/+ buffers/cache: 14M 476M Swap: 0B 0B 0B sh-4.2# ethtool -L eth0 combined 8 sh-4.2# free -h total used free shared buffers cached Mem: 490M 26M 464M 0B 0B 4.1M -/+ buffers/cache: 22M 468M Swap: 0B 0B 0B (18MB? Nice! :) ) Thanks, Sasha