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 1RgSfB-0007NL-E9 for garchives@archives.gentoo.org; Fri, 30 Dec 2011 02:57:45 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4C4F821C095; Fri, 30 Dec 2011 02:57:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id EF17F21C043 for ; Fri, 30 Dec 2011 02:56:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 7D8781B4087 for ; Fri, 30 Dec 2011 02:56:21 +0000 (UTC) X-Virus-Scanned: by amavisd-new using ClamAV at gentoo.org X-Spam-Flag: NO X-Spam-Score: -4.481 X-Spam-Level: X-Spam-Status: No, score=-4.481 tagged_above=-999 required=5.5 tests=[AWL=1.008, BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-1.288, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham Received: from smtp.gentoo.org ([127.0.0.1]) by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MLu11msyV9yI for ; Fri, 30 Dec 2011 02:56:14 +0000 (UTC) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by smtp.gentoo.org (Postfix) with ESMTP id 00DFE1B4099 for ; Fri, 30 Dec 2011 02:56:13 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RgSde-00019G-4o for gentoo-user@gentoo.org; Fri, 30 Dec 2011 03:56:10 +0100 Received: from athedsl-392336.home.otenet.gr ([79.131.84.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 30 Dec 2011 03:56:10 +0100 Received: from realnc by athedsl-392336.home.otenet.gr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 30 Dec 2011 03:56:10 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: Nikos Chantziaras Subject: [gentoo-user] Re: To swap or not to swap? Is it really needed? Date: Fri, 30 Dec 2011 04:56:05 +0200 Organization: Lucas Barks Message-ID: References: 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 Content-Type: text/plain; charset=UTF-8; format=flowed X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: athedsl-392336.home.otenet.gr User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111117 Thunderbird/8.0 In-Reply-To: Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 0cd1e7b9-5161-40ea-b16f-b85635eb69b2 X-Archives-Hash: 4e951da6fba56838f95d9ae4a9bcb9e4 On 12/30/2011 12:34 AM, Claudio Roberto Fran=C3=A7a Pereira wrote: > Anyway, for the last days, my machine has been really slow, with mouse > lag, input delay, and other things. I imediately associated it to the > lack of free RAM, but I always rushed to check the RAM usage with htop > and it were never really high. So today I decided to turn my swap > partition off. And the system is FLYING. I mean, it's pratically a new > machine, now it's usable and reliable. > [...] Usable, yes. Reliable, no ;-) Once RAM runs out, random processes get=20 killed. Possible data loss due to that. > So, should I ban swap partitions entirely from my life? Is that ok? No. You simply tweak swappiness. In your /etc/sysctl.conf, add this: vm.swappiness =3D 20 The default value is 60. Which makes the system use swap very early on.=20 With 20, you pretty much will swap only when really needed. I've read=20 somewhere that values lower than 20 are not recommended, but I don't=20 remember where or why.