Thread (24 messages) 24 messages, 8 authors, 2022-06-27

Re: a new install - - - putting the system on raid

From: Wols Lists <hidden>
Date: 2022-06-25 11:42:04

On 25/06/2022 09:27, Pascal Hambourg wrote:
Le 24/06/2022 à 01:44, Wol a écrit :
quoted
On 23/06/2022 23:27, Pascal Hambourg wrote:
quoted
quoted
Firstly, the system shouldn't be swapping. MOST systems, under MOST 
workloads, don't need swap.
Conversely, some systems, under some workloads, do need swap. And 
when they do, swap needs to be as reliable as any other storage space.
And if your system is one of the ?majority? that shouldn't swap, the 
cost/benefit analysis is COMPLETELY different for swap than for main 
storage. So don't treat them the same.
If your system should not swap, then why use any swap at all ?
Same reason I do? I have a whole bunch of rarely used, and not-at-all 
critical tmpfs's, so the system occasionally spills into swap. A system 
failure is no grief - reboot, carry on where it left off ...
quoted
quoted
quoted
And secondly, the *system* should not be using swap. User space, 
yes. So a bunch of running stuff might crash. But the system should 
stay up.
Firstly, the *system* is not only the kernel. Many user space 
processes are part of the *system*. Secondly, you were the one who 
wrote:

"/tmp - is usually tmpfs nowadays, if you need disk backing, just 
make sure you've got a big-enough swap (tmpfs defaults to half ram, 
make it bigger and let it swap)."
And? /tmp is *explicitly* not to be trusted in the event of problems. 
If you lose a disk and it takes /tmp out, sorry.
Source ?
Linux Filesystem Hierarchy Standard? The presence of ANY files in /tmp 
is not to be trusted - even if you created it ten seconds ago ...
quoted
(Oh, and I didn't tell o1bigtenor NOT to raid his swap. I asked him 
WHY he would want to. Maybe he has good reason. But I know him of old, 
and have good reason to suspect he's going OTT.)
I think you do not need a good reason to have swap on RAID when all the 
rest is on RAID. It is the other way around : you need a good reason not 
to have swap on RAID.
quoted
I run xosview. Even with gentoo, and a massive tmpfs, swap in-use sits 
at 0B practically ALL the time. Why would I want to protect it?
Because you may not want anything to crash when a drive fails while the 
swap is used. If you don't care, well, don't protect the swap.
And most people nowadays - certainly on a single-user system - will have 
no reason to care. Certainly my system, with 32GB of ram, is very 
unlikely to spill into swap in normal operation ...

Cheers,
Wol
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help