public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Paul Hartman <paul.hartman+gentoo@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] To swap or not to swap? Is it really needed?
Date: Thu, 29 Dec 2011 18:03:41 -0600	[thread overview]
Message-ID: <CAEH5T2MuS3fkaV4U_f=gE64NHd-puE98gK40K3tDKw3qzJaRxw@mail.gmail.com> (raw)
In-Reply-To: <CAGo3Weq3kpbV5gPHaA4M2weYs1rxQBiu0i2WmXNEgYoNJndOmw@mail.gmail.com>

On Thu, Dec 29, 2011 at 5:11 PM, Claudio Roberto França Pereira
<spideybr@gmail.com> wrote:
> Sorry for being so general, for not giving any real info. I'm new to
> system monitoring, I just learnt about iostat and swapon -s, now about
> vmstat. I mainly tried to catch anything unusual in top/htop.
>
> Trying to be more specifically, my system is a core 2 duo, dual core
> 3ghz processor, 4gb of ram (now 2gb), ATI radeon HD4850 with 512mb of
> vram. I used to play a lot on this box, now a lot less. On Gentoo,
> when I play is some browser game or cowsay (it's in games-misc!), not
> anything relevant. I'm using radeon open source drivers, by the way.
> My main use, currently, is web surfing, firefox with LOTS of tabs,
> email, social networks and random browsing. Firefox alone uses lots of
> ram, almost always it's using more than a half GB, sometimes it passes
> the 1gb mark. I also do Qt develop on this, but nothing heavy. No
> virtual machines, no 3d rendering, no heavy processing, no
> hibernation.
>
> So, I'm just a basic common web surfer. In this case, can I say it's
> at least SAFE to disable swap? I'll look into "last month's" thread on
> this.
>

Safe to disable, sure. "swapoff" your device(s) and see how it goes.
If you start to get out-of-memory errors, you know you've made the
wrong decision. :)

I think general opinion is that swap is slow and kills performance,
you want to avoid it happening if at all possible. If you have enough
RAM to avoid using it entirely, great. Tuning the sysctl settings like
Dale said, while still having swap partition "just in case" is the way
I'd go. If the system is swapping all the time, maybe you just need
more RAM.

While you're looking at recent threads, check the one about ZRAM also.
It is a good alternative to (or complement to) disk-based swap, if
your normal swap usage is less than the amount of ZRAM you've
allocated.

Some things, like suspend-to-disk, might require a swap device
on-disk. I have never used that feature myself, so I'm not familiar
with the details.



  reply	other threads:[~2011-12-30  0:05 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 [this message]
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 ` [gentoo-user] " Nikos Chantziaras

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='CAEH5T2MuS3fkaV4U_f=gE64NHd-puE98gK40K3tDKw3qzJaRxw@mail.gmail.com' \
    --to=paul.hartman+gentoo@gmail.com \
    --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