From: Nikos Chantziaras <realnc@arcor.de>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Re: To swap or not to swap? Is it really needed?
Date: Fri, 30 Dec 2011 04:56:05 +0200 [thread overview]
Message-ID: <jdj97r$1rh$1@dough.gmane.org> (raw)
In-Reply-To: <CAGo3Weo10WAPosiSXy+FihBo4fmre9qcnmVq7MxWRvsG3DVNeg@mail.gmail.com>
On 12/30/2011 12:34 AM, Claudio Roberto França 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
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 = 20
The default value is 60. Which makes the system use swap very early on.
With 20, you pretty much will swap only when really needed. I've read
somewhere that values lower than 20 are not recommended, but I don't
remember where or why.
prev parent reply other threads:[~2011-12-30 2:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-29 22:34 [gentoo-user] To swap or not to swap? Is it really needed? Claudio Roberto França Pereira
2011-12-29 22:48 ` Alan McKinnon
2011-12-29 23:11 ` Claudio Roberto França Pereira
2011-12-30 0:03 ` Paul Hartman
2011-12-30 2:23 ` Claudio Roberto França Pereira
2011-12-30 3:54 ` Michael Mol
2011-12-30 7:31 ` Dale
2011-12-30 13:32 ` Michael Mol
2011-12-30 14:02 ` Paul Hartman
2011-12-30 14:11 ` Peter Humphrey
2011-12-30 14:18 ` Paul Hartman
2011-12-30 14:24 ` Dale
2011-12-29 23:09 ` Dale
2011-12-30 2:56 ` Nikos Chantziaras [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='jdj97r$1rh$1@dough.gmane.org' \
--to=realnc@arcor.de \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox