this post was submitted on 06 Feb 2024
139 points (96.6% liked)

Linux

48332 readers
491 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Examples could be things like specific configuration defaults or general decision-making in leadership.

What would you change?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 5 points 9 months ago (1 children)

Btrfs with compression enabled and subvolumes set.

And enable/automate maintenance services for BTRFS. For example: balace should be run on heavily used system disks or scrub could help detect errors even on single disks.

ZRAM (With proper sysctl.conf like PopOS does).

Could you explain the preference of ZRAM over ZSWAP? I thought the latter was the more advanced and better performing solution. Is there some magic in Pop's config?

[–] [email protected] 4 points 9 months ago (1 children)

It is just that zram is much faster than zswap because it uses the ram to store compressed memory. Android already uses it by default.

These are worth reading:

https://old.reddit.com/r/Fedora/comments/mzun99/new_zram_tuning_benchmarks/ https://linuxreviews.org/The_Benefits_Of_Having_A_Compressed_zram_Swap_Device_On_Linux

[–] [email protected] 1 points 9 months ago* (last edited 9 months ago) (1 children)

Thanks for the links! I updated my config from z3fold to zsmalloc and adjusted the vm.page-cluster to test these out.

Reading a bit more, I think when using large max_pool_percent (>30) with Zswap the two solutions are more similar than not. A crucial difference is what use-case is more acceptable since Zswap can cause unresponsiveness (and potential lockup) under high memory pressure. While Zram could result in an OOM crash in a similar worst-case scenario.

[–] [email protected] 1 points 9 months ago* (last edited 9 months ago)

Oh I can tell you that zram will not result in an OOM that zswap would prevent:

I once ran into a bug when using foobar2000 with wine to convert my music library that resulted in an insanely high ram usage, like my 16 GIB ram was filled and then my 32 GIB zram was also filled and the PC froze.

I just went and edited my zram config to make my zram 48GIB and ran foobar again, it ended the conversion without issue kek. No idea wtf happened but whatever data was being written in memory was being compressed good by zRAM, like very few people would even use a swap partition or file that is more than 32 GIB to begin with.

I also tested running Zelda tears of the kingdom in yuzu using 4GiB of ram with a big zram and it worked, that game in yuzu is a ramhog and on windows people need 16 GiB of ram and they still max out their swapfile.

There is also a vid on yt titled zram vs windows pagefile where a user running endevour demostrates how zram can take a bunch of Minecraft mods while windows with the help its of pagefile cant

Edit: Here is the vid: https://www.youtube.com/watch?v=nMYTBsjeoTc