From: Duncan <1i5t5.duncan@cox.net>
To: gentoo-amd64@lists.gentoo.org
Subject: [gentoo-amd64] Re: What should the swap size be for 4G ram?
Date: Sat, 22 Sep 2007 17:23:41 +0000 (UTC) [thread overview]
Message-ID: <pan.2007.09.22.17.23.41@cox.net> (raw)
In-Reply-To: 46F53191.8040204@thefreemanclan.net
Richard Freeman <rich@thefreemanclan.net> posted
46F53191.8040204@thefreemanclan.net, excerpted below, on Sat, 22 Sep 2007
11:15:29 -0400:
> That's Ok, I got a chuckle out of it. You have Duncan who doesn't use
> swap at all (I think),
I ran entirely without for awhile back when I had a gig of memory, but I
turned it back on to allow suspend to disk (aka hibernate), then got the
4-way RAID before I upped memory, and set it up for 4x4-gig of striped
swap. The kernel will stripe swap automatically when you set swap
partitions to the same priority, as I've done here. I didn't setup the
swap on top of RAID-0.
I do use swap occasionally; the last time was when I recompiled qt-3 I
think -- with unlimited jobs and $PORTAGE_TMPDIR on tmpfs! IIRC it ran
up 200+ load average (1 minute), used up all 8 gigs memory, and ran 7
gigs into swap, before the system got slow enough it wasn't updating
ksysguard any more and I couldn't tell how much worse it got. =8^)
I'm glad I was running striped swap or it probably would have been there
quite some time, but it ran a nearly frozen GUI for several minutes, then
started coming back to life, as I could see the load and memory usage
climbing back down.
FWIW I'm running the kernel 2.6.23-rcs, which of course have the new CFS
CPU scheduler. I wasn't too happy with it originally, as it'd zero out X
responsiveness much faster than the old scheduler did, but it has gotten
somewhat better as the rcs have progressed. I don't think it's quite
where the old one was yet, but if one truly wants "fair", one should
expect to play with priorities/niceness a bit more to keep smooth X
operation when running 200+ load average and heavy swapping. It's
certainly reasonable now; something I couldn't have said back around rc-3
or 4, when I was pretty unhappy with it. I guess we see how good they
did when it releases and we see if there's any outcry on people having
trouble with X or whatever.
Back to swap, striped swap isn't so bad. Running more than 4 gig of
single-spindle swap can be a killer tho, as the effects of a multi-gig
swap-storm on a slow single-spindle disk setup aren't pretty! =8^(
That said, the main reason I run swap now is for suspend-to-disk aka
hibernate. It's nice to be able to have the system shut off when I'm at
work or sleeping, and turn it back on to have it restore the session as I
left it. Unfortunately, it can only use a single swap device for the
suspend image, so since I have the 16 gigs spread across 4 disks equally,
the max suspend image I can create is 4 gigs, only half of my physical
memory size! I'm thinking about layering swap on top of RAID-0
(assembled based on the kernel command line, so before the restore
starts) to see if I can avoid that and get a full 8 gig suspend image to
match my memory size, plus faster read-in as well, but haven't tried it
yet and am not positive it's supported. IOW, the automatic combination
of swap partitions into striped swap works for swap, but not for the
suspend image, unfortunately, so (if it works) there's still reason to
layer swap on RAID-0 after all.
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
--
gentoo-amd64@gentoo.org mailing list
next prev parent reply other threads:[~2007-09-22 17:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-22 3:16 [gentoo-amd64] What should the swap size be for 4G ram? P.V.Anthony
2007-09-22 3:22 ` P.V.Anthony
2007-09-22 15:15 ` Richard Freeman
2007-09-22 15:22 ` Volker Armin Hemmann
2007-09-22 16:24 ` B Vance
2007-09-22 17:23 ` Richard Freeman
2007-09-22 17:23 ` Duncan [this message]
2007-09-22 20:22 ` [gentoo-amd64] " Volker Armin Hemmann
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=pan.2007.09.22.17.23.41@cox.net \
--to=1i5t5.duncan@cox.net \
--cc=gentoo-amd64@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