From: Dale <rdalek1967@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: Finally got a SSD drive to put my OS on
Date: Tue, 18 Apr 2023 20:15:15 -0500 [thread overview]
Message-ID: <70cea21f-bdf3-bbee-2f83-e69152c7646c@gmail.com> (raw)
In-Reply-To: <31e6d9f7-3e2b-59aa-f57f-2f18473cd33f@youngman.org.uk>
Wols Lists wrote:
> On 18/04/2023 23:13, Frank Steinmetzger wrote:
>>> /var/tmp/portage on tmpfs. And on every disk I allocate a swap
>>> partition
>>> equal to twice the mobo's max memory. Three drives times 64GB times
>>> two is a
>>> helluva lot of swap.
>
>> Uhm … why? The moniker of swap = 2×RAM comes from times when RAM was
>> scarce.
>> What do you need so much swap for, especially with 32 GB RAM to begin
>> with?
>> And if you really do have use cases which cause regular swapping,
>> it’d be
>> less painful if you just added some more RAM.
>
> Actually, if you know your history, it does NOT come from "times when
> RAM was scarce". It comes from the original Unix swap algorithm which
> NEEDED twice ram.
>
> I've searched (unsuccessfully) on LWN for the story, but at some point
> (I think round about kernel 2.4.10) Linus ripped out all the ugly
> "optimisation" code, and anybody who ran the vanilla kernel with "swap
> but less than twice ram" found it crashed the instant the system
> touched swap. Linus was not sympathetic to people who hadn't read the
> release notes ...
>
> Andrea Arcangeli and someone else (I've forgotten who) wrote two
> competing memory managers in classic "Linus managerial style" as he
> played them off against each other.
>
> I've always allocated swap like that pretty much ever since. Maybe the
> new algorithm hasn't got the old wanting twice ram, maybe it has, I
> never found out, but I've not changed that habit.
>
> (NB This system is pretty recent, my previous system had iirc 8GB (and
> a maxed out value of 16GB), not enough for a lot of the bigger programs.
>
> Before that point, I gather it actually made a difference to the
> efficiency of the system as the optimisations kicked in, but everybody
> believed it was an old wives tale - until Linus did that ...
>
> Cheers,
> Wol
>
>
I've always had some swap but never twice the ram. Even back on my
single core rig with 4GBs of ram, I only had a couple GBs or so of
swap. Heck, I have swappiness set to 1 here on current rig. I don't
want swap used unless it is to prevent a out of memory crash. Given the
amount of memory available today, unless you know you still don't have
enough memory, swap really isn't needed. Adding more memory is a much
better solution.
I've actually considered disabling mine completely but sometimes Firefox
gets a wild hair and starts consuming memory. When my TV stops playing,
I know it's at it again. Hasn't happened in a while tho. That's the
thing about swap, it usually slows a system to a crawl. I can usually
tell if even a few MBs of swap is being used just by the slowness of the
system to respond to even simply changing from one desktop to another.
The need for swap in most cases isn't what it used to be.
Dale
:-) :-)
next prev parent reply other threads:[~2023-04-19 1:15 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-15 22:47 [gentoo-user] Finally got a SSD drive to put my OS on Dale
2023-04-15 23:24 ` Mark Knecht
2023-04-15 23:44 ` thelma
2023-04-16 1:47 ` William Kenworthy
2023-04-16 7:18 ` Peter Humphrey
2023-04-16 8:43 ` William Kenworthy
2023-04-16 15:08 ` Mark Knecht
2023-04-16 15:29 ` Dale
2023-04-16 16:10 ` Mark Knecht
2023-04-16 16:54 ` Dale
2023-04-16 18:14 ` Mark Knecht
2023-04-16 18:53 ` Dale
2023-04-16 19:30 ` Mark Knecht
2023-04-16 22:26 ` Dale
2023-04-16 23:16 ` Frank Steinmetzger
2023-04-17 1:14 ` Dale
2023-04-17 9:40 ` Wols Lists
2023-04-17 17:45 ` Mark Knecht
2023-04-18 0:35 ` Dale
2023-04-18 8:03 ` Frank Steinmetzger
2023-10-07 7:22 ` Dale
2023-04-16 17:46 ` Jorge Almeida
2023-04-16 18:07 ` Frank Steinmetzger
2023-04-16 20:22 ` Mark Knecht
2023-04-16 22:17 ` Frank Steinmetzger
2023-04-17 0:34 ` Mark Knecht
2023-04-18 14:52 ` [gentoo-user] " Nikos Chantziaras
2023-04-18 15:05 ` Dale
2023-04-18 15:36 ` Nikos Chantziaras
2023-04-18 20:01 ` Dale
2023-04-18 20:53 ` Wol
2023-04-18 22:13 ` Frank Steinmetzger
2023-04-18 23:08 ` Wols Lists
2023-04-19 1:15 ` Dale [this message]
2023-04-18 20:57 ` Mark Knecht
2023-04-18 21:15 ` Dale
2023-04-18 21:25 ` Mark Knecht
2023-04-19 1:36 ` Dale
2023-04-18 22:18 ` Frank Steinmetzger
2023-04-18 22:41 ` Frank Steinmetzger
2023-04-19 1:45 ` Dale
2023-04-19 8:00 ` Nikos Chantziaras
2023-04-19 9:42 ` Dale
2023-04-19 10:34 ` Peter Humphrey
2023-04-19 17:14 ` Mark Knecht
2023-04-19 17:59 ` Dale
2023-04-19 18:13 ` Mark Knecht
2023-04-19 19:26 ` Dale
2023-04-19 19:38 ` Nikos Chantziaras
2023-04-19 20:00 ` Mark Knecht
2023-04-19 22:13 ` Frank Steinmetzger
2023-04-19 23:32 ` Dale
2023-04-20 1:09 ` Mark Knecht
2023-04-20 4:23 ` Dale
2023-04-20 4:41 ` eric
2023-04-20 9:48 ` Dale
2023-04-20 23:02 ` Wol
2023-04-20 8:55 ` Frank Steinmetzger
2023-04-20 8:52 ` Frank Steinmetzger
2023-04-20 9:29 ` Dale
2023-04-20 10:08 ` Peter Humphrey
2023-04-20 10:59 ` Dale
2023-04-20 13:23 ` Nikos Chantziaras
2023-04-20 12:23 ` Frank Steinmetzger
2023-04-20 9:46 ` Peter Humphrey
2023-04-20 9:49 ` Dale
2023-04-18 17:52 ` Mark Knecht
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=70cea21f-bdf3-bbee-2f83-e69152c7646c@gmail.com \
--to=rdalek1967@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