Gentoo Archives: gentoo-user

From: Michael <confabulate@××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] 32GB RAM and Swap
Date: Fri, 01 May 2020 23:18:02
Message-Id: 2866627.CbtlEUcBR6@lenovo.localdomain
In Reply to: Re: [gentoo-user] 32GB RAM and Swap by Raphael MD
1 On Saturday, 2 May 2020 00:08:24 BST Raphael MD wrote:
2 > On Fri, 1 May 2020 at 18:49 J. Roeleveld <joost@××××××××.org> wrote:
3 > > On 1 May 2020 21:50:02 CEST, Raphael MD <raphaxx@×××××.com> wrote:
4 > > >Hello!
5 > > >
6 > > >Could I turn my Linux swap off.
7 > > >I have 32 GB of RAM memory, I suppose my system don’t need swap,
8 > > >because
9 > > >I’vea lot of RAM, is this true?
10 > > >
11 > > >Thanks
12 > >
13 > > This question keeps getting asked every time people go past some imaginary
14 > > large figure of RAM.
15 > >
16 > > First time I encountered it was somewhere in the 1990s. A friend had a
17 > > machine with 64MB ram, a massive amount at that time, and disabled all
18 > > swap. He was surprised his machine crashed because of memory issues,
19 > > until I asked what he was running. The list included several memory
20 > > intensive applications.
21 > > He never asked that again and adds it to all his machines.
22 > >
23 > > My desktop has 32GB and also has some swap. I do regularly see it used and
24 > > not because of memory leaks like Dale is mentioning, although those do
25 > > appear on occasion. On my desktop it's mostly because I have a lot of
26 > > stuff
27 > > running the whole time.
28 > >
29 > > So, yes, you still need swap and always will. Unless you put about 10
30 > > times the current magical figure in a desktop. In my view, that would be
31 > > 320GB for now, and in another 5 years, that would be around 640GB.
32 > > When you have that level of overkill in a desktop, I will not consider OOM
33 > > to be likely.
34 > >
35 > >
36 > > --
37 > > Joost
38 > >
39 > > --
40 > > Sent from my Android device with K-9 Mail. Please excuse my brevity.
41 >
42 > Well, it’s figuring that some sort of swap space is necessary, but
43 > regarding pressure level on kernel, can I setup it to zero or I’m obligated
44 > to put some number because I’ve a swap file?
45 >
46 > Thanks
47
48 Only you know how you're using your PC and if the 32G of RAM can/will be used
49 up at some point. I can assure you if you decide to compile chromium with
50 some silly --jobs number, you *will* run out of memory and wish you had set
51 some swap at the time. I don't think I have ever regretted having swap in
52 place and still revisit old systems I should have retired years ago to add
53 some more swap to make sure a memory hungry application or compilation can run
54 and complete without OOM errors.

Attachments

File name MIME type
signature.asc application/pgp-signature