this post was submitted on 17 Jan 2025
27 points (100.0% liked)

Linux

49109 readers
897 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
 

I know this may sound like an over the top useless tinkerink, but I just like to tinker with, play around with stuff and learn, and that may be why I use Linux on my notebook.

I have read some articles about ZRAM and what might be the best configuration and even chatted with some generative models, but didn't come to a decisive conclusion regarding size, compression algorythm etc... I am asking anyone interested to respond about their experience and recommendations given my specs:

OS: Fedora Linux 41 (Workstation Edition) x86_64
CPU: AMD Ryzen 3 7330U (8) @ 4.39 GHz
GPU: Amd Barcelo [Integrated]
Memory: 5.63 GiB (2 GiB is reserved by the GPU)

I use the notebook for school, mainly lightweight programming and using the browser.

I don't expect any magical improvements from the ZRAM as I already use it with the default config, just wanted to learn something new.

all 7 comments
sorted by: hot top controversial new old
[–] [email protected] 7 points 4 days ago (1 children)

I usually run the default arch zram config which is 50% of the RAM. For your case I'd go with 2 or 3 GB

[–] [email protected] 2 points 2 days ago (1 children)

Arch doesn't use zram by default?

[–] [email protected] 2 points 2 days ago* (last edited 2 days ago)

Sorry, it's been a while since I did the install, what I meant is the default config of: https://wiki.archlinux.org/title/Zram#Using_zram-generator

[–] [email protected] 2 points 4 days ago

Maybe you will find this article interesting: https://linuxreviews.org/Zram

[–] [email protected] 2 points 4 days ago (1 children)

For whatever it's worth - I have a laptop with 4GB of RAM and a 4GB ZRAM device, and it can't use all the ZRAM before everything grinds to a halt. I think the way ZRAM works best is if it can "swap out" (compress) anonymous pages that aren't actually needed again right away, freeing up the fast memory for disk caching and other memory needs.

In my case, I think I can reach a point where the amount of memory Linux needs simultaneously active goes beyond the 4GB of RAM, so it's just compressing/uncompressing forever and getting nowhere.

So, I think I'd argue that maybe you can't go too big? I think only anonymous pages can get compressed, and there's probably only so many gigabytes of those in memory at any given time.

[–] [email protected] 2 points 2 days ago

I use a 4gb ram zram device on 2gb ram devices and can fill it up without the system grinding to a halt.

Might need to play with some of the other sysctl parameters