Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: webrsync {SOLVED}
Date: Sat, 29 Feb 2020 14:13:57
Message-Id: 2907989c-19da-4f79-84c5-93a035b6092d@gmail.com
In Reply to: Re: [gentoo-user] Re: webrsync {SOLVED} by Rich Freeman
1 Rich Freeman wrote:
2 > On Sat, Feb 29, 2020 at 4:33 AM Wols Lists <antlists@××××××××××××.uk> wrote:
3 >> I just have a massive swap space, and /var/tmp/portage is a tmpfs. So
4 >> everything gets a fast tmpfs build, and it spills into swap as required
5 >> (hopefully almost never).
6 >>
7 > I can articulate a bunch of reasons that on paper say that this is the
8 > best approach.
9 >
10 > In practice I've found that swap on linux is sub-optimal at best. I
11 > only enable swap when I absolutely have to as a result. I'll reduce
12 > -j to lower memory demand before adding swap usually. On more
13 > RAM-constrained hosts I'll enable swap when building specific
14 > packages, or try to avoid those packages entirely.
15 >
16 > Maybe something has changed in the last few years and swap is actually
17 > useful, but I'm skeptical. I always tend to end up with GB of free
18 > RAM and a churning hard drive when I enable it. On SSD I'm sure it
19 > will perform better, but then I'm running through erase cycles
20 > instead.
21 >
22 > Like I said, on paper adding swap should only make things better.
23 > But, that is only true if the kernel makes the correct choices about
24 > prioritizing swap vs cache use. Sure, I could set swappiness to zero
25 > or whatever, but then that just turns swap into a NOOP best case and
26 > it isn't like I have OOM issues, so why bother?.
27 >
28
29
30 I have a large swap space on my rig.  Like you tho, I hate when it is
31 used because it renders my system almost unresponsive.  Even switching
32 from one desktop to another can take a minute or even longer.  I think
33 swappiness is set to 20 or some low number.  I only use it because while
34 slow, I can usually kill the offending process before things start
35 crashing.  I just start htop, highlight the offending process and kill
36 it.  Usually it is a web browser or something that doesn't get hurt to
37 much from being killed.
38
39 While swap can be a necessary evil, I hate when even 1MB is used. 
40 Runaway processes is one reason I expanded my memory to 32GBs. It gives
41 me more wiggle room for portage to be on tmpfs.
42
43 You are not alone in your experience with this. 
44
45 Dale
46
47 :-)  :-) 

Replies

Subject Author
Re: [gentoo-user] Re: webrsync {SOLVED} Rich Freeman <rich0@g.o>