From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PAd4n-0002aZ-S3 for garchives@archives.gentoo.org; Tue, 26 Oct 2010 06:32:06 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 95069E0921; Tue, 26 Oct 2010 06:31:19 +0000 (UTC) Received: from mail-iw0-f181.google.com (mail-iw0-f181.google.com [209.85.214.181]) by pigeon.gentoo.org (Postfix) with ESMTP id 7F755E0921 for ; Tue, 26 Oct 2010 06:31:19 +0000 (UTC) Received: by iwn3 with SMTP id 3so7834366iwn.40 for ; Mon, 25 Oct 2010 23:31:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:content-type:content-transfer-encoding; bh=uob7D9b8SvymyFIUbz7g6wOugTJyJwusef6YrsjwUm0=; b=jZyToiZEEcC6hru5z0I02RZ/x7DHh2l3tC9YLUg9ZDFCoScPk58N1NTPAsUks87wKj DgFmNgmec1j/RcB8dgr/ewy4dFKurNwPYIdjpI4332+gY1Qzh0wPlA4AM+nPByOaobaI hDTNszAxVm85XukylH+iPc+dnyRM9l0mqL+uY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; b=sh+75ghNfW82gS1lIZMFu5cwFgcBlD3yPEdzZGgVlptKrx8Nxrv3PC60jehj0qe/9J aErAOg45zfxMaWP8STFGKK7b6nHJMVPJ+1vMeYGKoahmdO1ZDHqc04P5WaTUOHKStk0A ZjEq7q8n77nvfwUyhlH1lwMyc461ZJ56UZ2qc= Received: by 10.231.190.2 with SMTP id dg2mr1270628ibb.136.1288074679296; Mon, 25 Oct 2010 23:31:19 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Sender: fthtmn@gmail.com Received: by 10.231.14.134 with HTTP; Mon, 25 Oct 2010 23:30:46 -0700 (PDT) In-Reply-To: <1288072147.8318.56.camel@localhost> References: <1288072147.8318.56.camel@localhost> From: =?ISO-8859-1?Q?Fatih_T=FCmen?= Date: Tue, 26 Oct 2010 09:30:46 +0300 X-Google-Sender-Auth: 1KUCKBsHMoMnMk3IrnUaAHmFjxo Message-ID: Subject: Re: [gentoo-user] swap usage creeping up To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 1c386533-7012-4898-9211-7d63c23c9f70 X-Archives-Hash: 124dc9f63bd24616f06c24e6ec3aa5ca On Tue, Oct 26, 2010 at 8:49 AM, Iain Buchanan wro= te: > Hi, > > over the last week or so I've noticed unusually large swap usage. =A0I > usually hibernate this laptop and have uptimes up to 12 days so apps can > run for a long time. =A0I don't usually use any swap space (except for a > few k). > > If I swapoff and swapon, the usage falls back to zero but then creeps up > again over a few days. > > $ free -m > =A0 =A0 =A0 =A0 =A0 =A0 total =A0 =A0 =A0 used =A0 =A0 =A0 free =A0 =A0 s= hared =A0 =A0buffers =A0 =A0 cached > Mem: =A0 =A0 =A0 =A0 =A03040 =A0 =A0 =A0 =A0859 =A0 =A0 =A0 2181 =A0 =A0 = =A0 =A0 =A00 =A0 =A0 =A0 =A0 38 =A0 =A0 =A0 =A0415 > -/+ buffers/cache: =A0 =A0 =A0 =A0406 =A0 =A0 =A0 2634 > Swap: =A0 =A0 =A0 =A0 =A0494 =A0 =A0 =A0 =A0431 =A0 =A0 =A0 =A0 62 > Looking at above values 494MB does not seem to be enough for hibernation. Do you add extra swap or close some apps before hibernation? If your system trying to fill up your swap while you have more than 2GB of main memory available, only thing I can think of is your swapiness is set very high. You check and alter is as follows $ cat /proc/sys/vm/swappiness and # echo N > /proc/sys/vm/swappiness where N is a value between 0 and 100. Higher number means more swapping. If I had 3GB of ram I would set it to something closer to 0 or even 0 if I am just gonna use it for hibernation. > nothing unusual there, except for the swap usage itself. =A0'top' doesn't > show any large apps. =A0sorted by mem the top 4 are: > =A0PID USER =A0 =A0 =A0PR =A0NI =A0VIRT =A0RES =A0SHR S %CPU %MEM =A0 =A0= TIME+ =A0COMMAND > =A08318 iain =A0 =A0 =A020 =A0 0 =A0494m 150m =A021m S =A0 =A00 =A05.0 = =A0 1:20.67 evolution > 20424 iain =A0 =A0 =A020 =A0 0 =A0342m =A077m =A030m S =A0 =A00 =A02.5 = =A0 0:01.84 firefox > =A08009 root =A0 =A0 =A020 =A0 0 83364 =A037m 6260 S =A0 =A07 =A01.2 =A03= 8:34.31 X > =A08090 iain =A0 =A0 =A020 =A0 0 =A0159m =A032m 1600 S =A0 =A01 =A01.1 = =A0 3:48.08 skype > > Hm, I just noticed Mem is in %. =A0% of what? =A0% total or % used? =A0Ev= en if > it was % of total RAM that could be as much as 152Mb for evo and 76Mb > for firefox. =A0Not that much really. > % of total main memory excluding swap because its rather difficult to take it into account. 3040*0.05 =3D 152 evolution > any ideas? > You can try to view swap usage on top by pressing f then p and enter and sort by it by F then P and enter. The values wont be very realistic though. Alternatively you could try is to compare resident memory usages before and after swapoff. Given the mem usage of your apps, total mem usage looks normal. What does not seem normal is that swap inclined mem usage. Seriously take a look at your swapiness value. The default value cannot be right every particular case. > thanks :) > -- > Iain Buchanan > > Chuck Norris once skewered a man with the Eiffel tower. > > > -- =A0 =A0Fatih