From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bG69J-00033h-NO for qemu-devel@nongnu.org; Thu, 23 Jun 2016 11:02:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bG69E-0000dv-Lc for qemu-devel@nongnu.org; Thu, 23 Jun 2016 11:02:33 -0400 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:48025 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bG69E-0000db-CN for qemu-devel@nongnu.org; Thu, 23 Jun 2016 11:02:28 -0400 References: <5768F923.7040502@kamp.de> <20160621131815.GB2264@work-vm> <576BF910.70304@kamp.de> <20160623150004.GD2291@work-vm> From: Peter Lieven Message-ID: <576BF9FF.8080708@kamp.de> Date: Thu, 23 Jun 2016 17:02:23 +0200 MIME-Version: 1.0 In-Reply-To: <20160623150004.GD2291@work-vm> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Qemu and heavily increased RSS usage List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert" Cc: "qemu-devel@nongnu.org" , Paolo Bonzini , Fam Zheng , Peter Maydell Am 23.06.2016 um 17:00 schrieb Dr. David Alan Gilbert: > * Peter Lieven (pl@kamp.de) wrote: >> Am 21.06.2016 um 15:18 schrieb Dr. David Alan Gilbert: >>> * Peter Lieven (pl@kamp.de) wrote: >>>> Hi, >>>> >>>> while upgrading from Qemu 2.2.0 to Qemu 2.5.1.1 I noticed that the RSS memory usage has heavily increased. >>>> We use hugepages so the RSS memory does not include VM memory. In Qemu 2.2.0 it used to be ~30MB per vServer >>>> and increased to up to 300 - 400MB for Qemu 2.5.1.1 (same with master). The memory increases over time, but seems >>>> not to grow indefinetly. I tried to bisect, but had no result so far that made sense. I also tried valgrind / massif, but >>>> valgrind does not see the allocation (at least at exit) and massif fails to rund due to - so it pretends - heap corruption. >>>> >>>> Any help or ideas how to debug further would be appreciated. >>> I think I'd try stripping devices off; can you get a similar difference >>> to happen with a guest with no USB, no hugepages, no VGA and a simple >>> locally stored IDE disk? >>> >>> If you're having trouble bisecting is it possible it's a change >>> in one of the libraries it's linked against? >>> >>> There was someone asking the other day on #qemu who had a setup that >>> was apparently using much more RAM than expected and we didn't >>> manage to track it down but I can't remember the version being used. >> I currently trying to track the increased usage from release to release. The first increase of RSS usage from ~25MB to ~35MB directly >> after machine setup is introduced by this patch: > OK, while 10MB is bad, I'm more interested in where your other 270MB have gone - hopefully > it's not 27 separate 10MB chunks! I'm trying to figure out the exact commits, but its very hard to bisect so far. This is the first commit that really introduces an easy to reproduce RSS increase. Maybe this is the root cause. I don't know. Peter