From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Memory usage with qemu-kvm-0.12.1.1 Date: Sun, 27 Dec 2009 18:03:18 +0200 Message-ID: <4B378546.6070104@redhat.com> References: <20091227155107.GK7104@defiant.freesoftware> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "hugh.dickins@tiscali.co.uk" , Rik van Riel To: dbareiro@gmx.net, KVM General Return-path: Received: from mx1.redhat.com ([209.132.183.28]:58451 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751881AbZL0QDZ (ORCPT ); Sun, 27 Dec 2009 11:03:25 -0500 In-Reply-To: <20091227155107.GK7104@defiant.freesoftware> Sender: kvm-owner@vger.kernel.org List-ID: On 12/27/2009 05:51 PM, Daniel Bareiro wrote: > Hi, all! > > I installed qemu-kvm-0.12.1.1 in one equipment of my house yesterday to > test it with Linux 2.6.32 compiled by myself from the source code of > kernel.org. > > From the night of yesterday that I am observing a high use of swap. This > is the Service Log Entries from Nagios: > > 12-26-2009 21:57:33 12-26-2009 23:42:33 0d 1h 45m 0s SERVICE WARNING (HARD) SWAP WARNING - 30% free (142 MB out of 486 MB) > 12-26-2009 23:42:33 12-27-2009 00:00:00 0d 0h 17m 27s SERVICE CRITICAL (HARD) SWAP CRITICAL - 9% free (41 MB out of 486 MB) > 12-27-2009 00:00:00 12-27-2009 06:27:33 0d 6h 27m 33s SERVICE CRITICAL (HARD) SWAP CRITICAL - 5% free (22 MB out of 486 MB) > 12-27-2009 06:27:33 12-27-2009 12:49:51 0d 6h 22m 18s+ SERVICE WARNING (HARD) SWAP WARNING - 14% free (67 MB out of 486 MB) > > The hour has been ART (GMT-3). > > The VMs running in this host are the following: > > +--------------------+----------+------------------+ > | OS | RAM | SWAP | > +====================+==========+==================+ > | Debian Lenny amd64 | 512 MB | 1 GB / 0 used | > | Debian Lenny amd64 | 512 MB | 512 MB / 0 used | > | Debian Lenny amd64 | 512 MB | 1 GB / 584k used | > | Debian Lenny i386 | 512 MB | 512 MB / 0 used | > | OpenBSD 4.6 i386 | 512 MB | 1 GB / 0 used | > +--------------------+----------+------------------+ > > This is what I obtain with 'free' in the host: > > root@ubuntu:~# free > total used free shared buffers cached > Mem: 4060340 3989512 70828 0 1804272 95212 > -/+ buffers/cache: 2090028 1970312 > Swap: 497972 415680 82292 > > > To what that so high use of swap can be due? > > Probably a regression in Linux swapping. Rik, Hugh, are you aware of any? Hugh posted something but it appears to be performance related, not causing early swap. Try setting /proc/sys/vm/swappiness to 0, and running your guests with cache=none (a good idea in any case). Also, qemu might be leaking memory. Please post 'pmap $pid' for all of your guests (do that before any of the other tests, on your swapped-out system). -- error compiling committee.c: too many arguments to function