From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39373) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3YGt-0003Pb-VA for qemu-devel@nongnu.org; Wed, 15 Jan 2014 16:45:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3YGl-0000WE-He for qemu-devel@nongnu.org; Wed, 15 Jan 2014 16:45:11 -0500 Received: from mail-ee0-x22f.google.com ([2a00:1450:4013:c00::22f]:50854) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3YGl-0000SK-Ap for qemu-devel@nongnu.org; Wed, 15 Jan 2014 16:45:03 -0500 Received: by mail-ee0-f47.google.com with SMTP id d49so374972eek.6 for ; Wed, 15 Jan 2014 13:45:01 -0800 (PST) Message-ID: <52D7015A.8080507@gmail.com> Date: Wed, 15 Jan 2014 22:44:58 +0100 From: Piotr Karbowski MIME-Version: 1.0 References: <52CF2A0F.1060305@gmail.com> <20140115100353.GA2154@redhat.com> <52D6FF59.8010905@gmail.com> In-Reply-To: <52D6FF59.8010905@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Enabling vhost-net cause insane high memory usage. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Piotr Karbowski , "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org On 01/15/2014 10:36 PM, Piotr Karbowski wrote: > Hello, > > On 01/15/2014 11:03 AM, Michael S. Tsirkin wrote: >> >> Could you explain how you measure that exactly? >> > > I check the resident memory (RES) of qemu-system-x86_64 proces. > > >> Yes, this should not happen. >> One interesting thing to try would be switching device type from >> virtio-net to e1000. >> >> This means vhost will be initialized but not started. >> > > So with virtio-net-pci + vhost=on I have VM process on 580-590 MB of RES > memory, if I disable vhost OR set e1000 NIC and leave vhost enabled, its > take just 109-120 MB of resident memory. > > The memory usage check is done after few minutes after VM start, and the > vm have minimal debian7 system without even single additional service. Quick note, the test was done on VM with 512 MB memory set, if I test it on the 2 GB one, RES with vhost-enabled virtio-net-pci goes a bit above 2 GB shortly after start. -- Piotr.