How to run a stress-free EndeavourOS

I’d like to add the point of choosing a file system. You don’t have to grab BTRFS unless you’re aware of its features and really need them. You could be better off using ext4.

Personally, I’ve used BTRFS without any issues, done it just because it’s a new file system, but never employed any of its functionalities. So with my Linux experience growing up, I realised that there’s no point in chasing the newest features just because of hype. As Dalto said, ‘you’re adding complexity for no real purpose’.

I decided to stick with XFS as it combines robustness and performance of ext4, but doesn’t have any of its limitations (except of partition shrinkage, which I don’t need) and ships with CoW, that’s quiet useful.

4 Likes

FYI, these don’t care about bit-flipping or bit-rot which is caused by random small bit errors in RAM, CPU cache or cable or mainboard’s bus. Your eyes cannot see bit errors in more than a billion bits.

These checksum-free filesystems do not alert you when data is corrupted while your system continues to run without notice in the future. But that’s okay if your data isn’t worth and you trust hardware more than software. :wink:

You probably need to refresh your knowledge on this subject. Here the original documentation whereby you should be able to know how XFS maintains data integrity. The file system has significantly been upgraded over the years.

I knew that XFS only verifies metadata, not your data.

By the way, Red Hat has used XFS in their enterprise distribution since RHEL 7.

Many large enterprise use various verification tools for servers, not just XFS alone.
For example: expensive ECC-RAM, auto comparison between A and B in redundancy, database has its own native checksum tool, and more … That is not XFS job.

I’m ok with it. I just compared pros and cons of each file system, and chose what best fits my needs. Even If ZFS were to become open-sourced in Linux, I would probably not use it as I don’t need the bundle of features it provides.

Your disagreement comes from ignorance of how swap works and from misunderstanding of its purpose. The primary purpose of swap is not to protect you from an OOM situation. It is also a very poor substitution for RAM. It doesn’t matter how much RAM you have, even if you never exhaust it, you will benefit from some swap (for 32 GiB of RAM, in my experience, a 6 GiB swap file works great).

5 Likes

I suppose their ignorance is based on YouTube videos they’re constantly watching on different channels. They’re not going to read original sources of information on any matter.

1 Like

If someone using btrfs the size of the root doesn’t matter because all the sub-volumes share the space of the same btrfs filesystem. And no need to manually clean out packages from your cache manually because you can use paccache for that and to done it automatically you can setup a pacman hook so that you don’t have to look after it. Updating mirrors you don’t have to do that manually either, you can setup reflector to automatically update your mirrors.

I would like to see what happens when someone setups up a multi-boot system with an installation running KDE Plasma 5 and another installation on the same system with KDE Plasma 6 with a shared homedir, if that doesn’t break anything I might be believe it. Different versions of software will or can use different types of configuration settings, if both KDE Plasma 5 and 6 write their configurations to some of the same configuration files things are likely to break. So it probably will depend on the situation, when or when not a shared homedir will break things, but I don’t agree with you that it can be seen as a general truth that sharing your homedir across installations with not break things.

paccahe has a systemd service too if one wants to automate cleaning of the package cache.

1 Like

@Kresimir + @Anthony

  • Your disagreement comes from ignorance of how swap works and from misunderstanding of its purpose.
  • I suppose their ignorance is based on YouTube videos they’re constantly watching on different channels. They’re not going to read original sources of information on any matter.

Well, if I were to make a sweeping, insulting comment about you two based on a snippet or two, I might suggest you are both stuck in ~Y2K where the advice “Have some amount of swap” likely originated. Exactly what original sources of information actually say there is a benefit to swap when swap is entirely moot (e.g., you have 128GB of RAM and never, over a period of 1 year observed “used” memory going over 33% of RAM)? In those days when RAM was expensive and the only swap was to HDDs, then the advice might have been a good rule-of-thumb. But, the more affordable a huge RAM cushion becomes and the more related software/hardware evolves, the less absolute (and advisable) that advice.

Swap is indeed a complex topic. SDDs and especially NVMe have heavy swap much more viable (partly thanks to the changes to avoid swap thrashing in linux 5.8); additionally, 5.8’s swappiness redo in linux 5.8 made zRAM more effective; with those changes, Kresimir’s “[swap] is also a very poor substitution for RAM” claim is very often (not always) absolutely untrue (when cost is a factor). For example, every Chromebook now configures zRAM (a form of swap) at 2xRAM … so always more than the holy 6GB swap from dr-linux-he-thinks, and the impact on the capacity of the Chromebook system is phenomenal. And, for Linux distros per se, in many cases, NVMe/SDD swapping can even beat the (sometimes) significant benefits of zRAM swapping.

I suggest, nowadays, swap comes with so many variations and trade-offs that simplistic statements about disk swap are quaint. For most home computers/laptops, I’d kinda go with Fedora’s default swap and change the Y2K rule-of-thumb to a more modern (and less absolute) Typically, have some amount of zRAM. And one of the common exceptions is that if you truly never need swap, you need not bother configuring any … well, unless your “original sources” that I’m so ignorant of actually state some benefit to unused, configured swap like preventing memory faults from cosmic rays, viruses, damage from electrical storms, and other magical effects :wink:

1 Like

It’s hard to follow your message because you seem to be trying to defend your original statement that swap is not necessary, but then you also appear to acknowledge that there is a benefit to using a swap device like zram.

Zram is a swap device, by the way. You will notice the original recommendation includes this as a consideration:

As @Kresimir mentioned, swap is not just for OOM situations and having swap is beneficial no matter now much RAM you have. This is a frequently-linked, highly informative article if you are interested in learning more about that: https://chrisdown.name/2018/01/02/in-defence-of-swap.html

This thread is an interesting read as well: https://unix.stackexchange.com/a/190521

4 Likes

Thanks for not hurling insults in this reply as the first two posters. The first article is dated (i.e., not update with 5.8 changes) and the second article is equally wrong due to its narrow, also dated thinking.

If I over-provision RAM (to the point that the system never swaps even with high swappiness), then the matter is entirely moot. Good grief … is that not obvious. No matter what benefits arise under moderate or high memory pressure, there is zero benefit when there is zero swap. Period. Period. Period. Exclamation mark! And from what I can tell over-provisioned systems are common nowadays.

Now, lets look at the narrow statement, “The main incentive for swap nowadays is not to magically turn 16GiB of RAM into 32 GiB, but to make more efficient use of the installed, available RAM.” The only excuse for that statement is being woefully out-of-date. Regarding magic, I’m most familiar with Chromebooks and zRAM where Chromebooks configure zRAM as 2xRAM; then 4GB systems behave as if they have 8GB (or more), 8GB systems that behave as if they have 16GB (or more), etc. And the fact that Chromebooks employ swap as effective memory multiplier has much evidence; to be sure, Google does not think swap is merely “about making memory reclamation egalitarian and efficient.”

I think, in most cases, swap needs to be considered for the case in hand. For too-much-RAM-to-swap-anyhow systems, swap is moot. Duh. For very memory constrained systems with slow disks and a modern-ish CPU, then you want zRAM (slam dunk IF you are observing good compression). So, I think the references you cite are quaint. And if you look at the number of installed Linux’s (allowing that Chromebooks run Linux), the vast majority use of swap is for the memory multiplier of zRAM, not improving “memory reclamation”. Moreover, when the other Linux distros catch up to Fedora, those devices that zRAM benefits will more often be using swap for the magic RAM multiplier.

In the dark(er) ages of Linux swap, if you swapped more than a little bit, it was typical for the system to go into the toilet and never (or very slowly) come back (exactly how true now, I don’t know). Basically, what you could successfully swap was a handful of almost never needed anonymous pages.

I think claiming the purpose of swap is "making memory reclamation egalitarian and efficient” is reverse engineering a holy purpose for swap that matched its very limited practical use. In other words, it is pseudo-intellectual BS. The purpose of swap is expand the virtual memory of the machine … a purpose that was never realized very well on Linux (well until improved more recently).

The changes in Linux 5.8 (and possibly other changes) allowed zRAM configs of 2xRAM to be practical. I don’t test every use case in Linux, but from anecdotal evidence (for certain work loads), NVMe swap can, in effect, be a memory multiplier, too (i.e., another contradiction of the reverse engineered “purpose” of swap).

Now, on my system, w/o swap:

$ free -h
           total   used    free    shared  buff/cache   available
Mem:      31Gi     10Gi    3.9Gi    525Mi        19Gi        20Gi

It has been up quite a while, “free” has not exhausted, I’ve used vscode, firefox, chrome, vlc, etc., … that is, all that I ever do or will do (w/o a change in purpose in the machine), and what does it actually matter if a few dribbles of anonymous memory are swapped? It matters not.

The spirit of “have some amount of swap” (IMHO) is have just enough swap to cover the a dribble of almost never used anonymous pages. Since that advice was born from pseudo-intellectual BS, the advice is pseudo-intellectual BS.

Sometimes, no swap is OK. Sometimes, a lot of swap is best. And sometimes “some” swap is best (like a broken clock is right twice a day).

1 Like

I think this is the main point you are missing. There is never too much RAM to use swap. The kernel will always take advantage of swap. You don’t have to be using a lot of RAM to be in a position where the kernel can benefit from using swap.

Also, some applications attempt to map memory directly to swap and perform badly or break if they cannot–see this person’s experience for example: Swap or not? - #33 by cjbottaro You can argue that these applications should be written better, but are you trying to set up a system that can only run applications which have been coded to map memory a specific way?

You can announce that reference material explaining how the kernel uses swap is “quaint” or “outdated”, but that doesn’t change anything about how the kernel manages memory use. You may as well call the kernel itself quaint and outdated.

In my opinion, the original advice (which is “have some amount of swap”) is correct. The comments suggesting otherwise–regardless of how emphatically the suggestions are expressed–are missing some crucial facts.

3 Likes

There’s a difference between want and have to. Just because Chromebook manufacturers have to squeeze something out of the limited amount of RAM they ship in their usually highly cost sensitive devices doesn’t mean you want that as a desirable norm.

And going from that totally underprovisioned end of the spectrum to the other: I don’t feel that overprovisioned systems are common. Who pays a few hundred bucks extra for 128 GB of RAM if 32 GB is totally fine, but the system is going to run somewhat better putting some swap - which can be zram - next to it.

2 Likes

absolutely!

The Linux kernel is a virtual memory management system. Why would anyone want to force constraints on how the system is built to operate? By denying the system of swap space, the user is forcing constraints on how the virtual memory subsystem of the kernel was designed to operate. Why stick to a notion that only serves to force the kernel to operate outside of its designed parameters? As long as the user’s system has enough physical storage to allocate a fraction of space to enable swap, why not do that? Is it just to feel confident in the belief that swap is not necessary?

2 Likes

Nobody was determined to insult you, and the commentaries above weren’t supposed to be insulting as well. It’s your own perception.

1 Like

All great points and can’t agree more.

One thing I can add to rolling release distro is to give time. If a user don’t have time to update and maintain then may be not a right distro for them.