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 1RgOnA-0005hR-Q6 for garchives@archives.gentoo.org; Thu, 29 Dec 2011 22:49:45 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5882921C02B; Thu, 29 Dec 2011 22:49:31 +0000 (UTC) Received: from mail-we0-f181.google.com (mail-we0-f181.google.com [74.125.82.181]) by pigeon.gentoo.org (Postfix) with ESMTP id 5A69E21C02B for ; Thu, 29 Dec 2011 22:48:30 +0000 (UTC) Received: by werm12 with SMTP id m12so7753333wer.40 for ; Thu, 29 Dec 2011 14:48:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:in-reply-to:references:organization :x-mailer:mime-version:content-type:content-transfer-encoding; bh=SWZMPnTEskKFdyCdYaSGugDIB1nzFv0EbDs0RA1PAlE=; b=rbz4wuxYj6hCZrdHRKW8GDoZlPHQhudMD4Dq7zMdUh2hJwC2JO0xOnCw4kQ0+uqR57 1RChrriUyvLiWOqAZc5sxfBnrddPUJXs9car69xztNOzTIlU2VWnx0I8pLkd9Fxn49el takN6M/mpSJBNgyYgtRNoGvb5xPEnOsCEDr4M= Received: by 10.216.143.206 with SMTP id l56mr26774522wej.46.1325198909602; Thu, 29 Dec 2011 14:48:29 -0800 (PST) Received: from rohan.example.com (196-215-2-107.dynamic.isadsl.co.za. [196.215.2.107]) by mx.google.com with ESMTPS id i9sm35632472wie.8.2011.12.29.14.48.27 (version=SSLv3 cipher=OTHER); Thu, 29 Dec 2011 14:48:28 -0800 (PST) Date: Fri, 30 Dec 2011 00:48:18 +0200 From: Alan McKinnon To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] To swap or not to swap? Is it really needed? Message-ID: <20111230004818.4f40ca5d@rohan.example.com> In-Reply-To: References: Organization: Internet Solutions X-Mailer: Claws Mail 3.7.8 (GTK+ 2.24.4; x86_64-pc-linux-gnu) 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 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 1f285f3b-b472-4464-9896-4788b76a009e X-Archives-Hash: e5f9e61fc484abcf13b5052b0f1c50c7 On Thu, 29 Dec 2011 20:34:16 -0200 Claudio Roberto Fran=C3=A7a Pereira wrote: > I've run my box with 2x2GB of RAM for a while, but a couple weeks ago > one of my chips died, and now I'm stuck with 1x2GB. That's not that > terrible, I'm using Gentoo all day, rarely switching to Windows 7 > anyways, who really likes RAM. > 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. >=20 > I thought of falling back from KDE 4 to awesome (tried it earlier in > an old notebook last year) given the memory footprint of KDE, but it > seems that my hard disk was the culprit here. > I've heard that Linux need a little swap partition, maybe just 512MB, > for some tasks, but I'm not going to turn it on anytime soon. It's a > desktop machine, 24/7, and I couldn't care less about suspend-to-disk. >=20 > So, should I ban swap partitions entirely from my life? Is that ok? This question comes up about every three months or so, and the end result is always the same: the same people chip in with the same answers and we all come to the same conclusion. You should check the Gentoo archives for the most recent gigantic thread on this, that one was particularly illuminating. But to summarize: You haven't given any real info for people to answer your actual question. To do that, we need to know what exactly your machine is doing and why, please what your swap settings are. Generally, the kernel is happiest with a little bit of swap (512 MB is a very much more than a little) and you can get by with that if your apps fit into ram. KDE is reasonably smart with ram usage, if you only have 2G it will try fit into that. If you have 22G it will try to use lots. If your machine was really slow, it was likely thrashing. But no-one can say for sure - what was your disk doing at the time? What did vmstat say was going on? To summarize a summary, the answer to "can I ban swap?" is "maybe" --=20 Alan McKinnnon alan.mckinnon@gmail.com