On 6/16/19 7:02 PM, Wols Lists wrote:
So you didn't read what I wrote ... Par for the course :-(

I did.  I still hear people say it today.  It's not old as in past tense.

The basic Unix mechanism needs twice ram.

I disagree.

It's inherent in the design of the thing. Whether linux no longer uses the Unix mechanism, or it's had the hell optimised out of it I don't know.

Either way, machines today get by on precious little swap - that's fine.

Historic note - the early linux 2.4 vanilla kernels enforced the twice ram rule - a lot of people who didn't read the release notes got nasty shocks when their machines locked up the moment they touched swap ...

I disagree because I ran 2.0, 2.2, 2.4, and 2.6 kernels without swap being twice the ram or greater. Swap did get used. They did not crash when accessing swap.

And okay my machine only has 16GB of ram (and 64GB of swap - 32GB each across two disks), but I'm pretty sure that if I followed your guidelines, an emerge would crash my system as the tmpfs ran out of space ...

I doubt it.

I've routinely done emerges on machines with < 16 GB of memory and 2 GB of swap. Including llvm, clang, gcc, rust, Firefox and Thunderbird.

I routinely do an emerge -DuNe @world on a VPS with 1 GB of memory and 1 GB of swap. It works just fine. If I want to speed things up I enlarge the VPS to 2 GB of memory and 1 GB of swap. Granted, it doesn't try to compile things like Firefox and Thunderbird, thus Rust.

And those people who wrote your guidelines?

I just looked again, and Red Hat has lowered their recommendation from what I remember from a few years ago.

Link - Table 15.1. Recommended System Swap Space
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/storage_administration_guide/ch-swapspace#tb-recommended-system-swap-space

RAM ≤ 2 GB = swap should be 2 times the amount of RAM
2 < RAM ≤ 8 GB = swap should be equal to the amount of RAM
8 < RAM ≤ 64 GB = swap should be at least 4 GB
64 < RAM = swap should be at least 4 GB

Are they the same clueless people who believe the twice ram rule is pure fiction?

I don't consider Red Hat's official statement to be "clueless".

Seeing as how their rules include "twice the RAM" in the first condition, I don't think they thought it was pure fiction.

(As I said, it is *historical* *fact*).

I question the validity of that statement.

And why should I believe people who tell me the rule no longer applies, if they can't tell me WHY it no longer applies? I'd love to be enlightened - why can't anybody do that?

I'm not saying you should believe people.

My opinion is that the 2 x RAM no longer applies because systems don't utilize swap space. As such it's a waste of disk space to dedicate 2 x RAM to swap.

Look at the output of free. Or better, run sysstat / SAR and watch swap usage. How much does your system use? How much disk space to you want to dedicate to something that's likely hardly being touched.

Do what you want.

But be prepared to put the shoe on the other foot and explain why you think that you should have 2 x RAM on each disk.

Reply via email to