54
submitted 2 months ago by kiol@discuss.online to c/linux@lemmy.ml

I have been setting up Zram, Swap, Swappiness and EasyOOM daemon on 16gb ram boxes, or lower. Someone asked me about 32gb of ram, or more, and I'm unsure. Wondering if others have experimented with this!

all 45 comments
sorted by: hot top new old
[-] HelloRoot@lemy.lol 24 points 2 months ago
[-] kiol@discuss.online 6 points 2 months ago
[-] mactan@lemmy.ml 6 points 2 months ago* (last edited 2 months ago)

been testing this quite a lot for star citizen which regularly sees 20-40 GB use. zram is the easiest solution to avoiding OOM Killer by a long shot. zswap was swapping over 100 GB to disk cumulative throughout the day and still oom killing the game. zswap is also a pain in the ass to configure for the lay user and harder to get human readable stats. I don't want lay users going anywhere near their bootloader but zswap is all kernel command line to make permanent changes

[-] PetteriPano@lemmy.world 4 points 2 months ago* (last edited 2 months ago)

zram makes sense if you do not have swap.

zswap is probably enabled by default in most distros. It compresses cold pages on the fly so that they're ready to quickly get swapped in and out.

I do hit the swap partition occasionally on my 32GB systems.

It doesn't really kick in until you have proper pressure. I want my swap partition for hibernation, anyway.

[-] Heavybell@lemmy.world 3 points 2 months ago

Yeah, I have 96gb and I still assign a zram swap, just in case. I also have a zram tmp, and a zram for my portage compilation dir (I use Gentoo). The latter gets the most use.

[-] monovergent@lemmy.ml 1 points 2 months ago* (last edited 2 months ago)

My workstation has 48 GB RAM with 50% allocation allowed to zram, no disk swapping. It works just fine. Once I use up the majority of my RAM, it kicks in the same way it would on any other system with less RAM.

[-] motruck@lemmy.zip 2 points 2 months ago

Not according to the chrisdown blog post above.

[-] monovergent@lemmy.ml 1 points 2 months ago

What about it? I see it kicking in at least 10 GB before my RAM is full and I haven't noticed any fundamental differences between how zram works on my 48 GB workstation and my 8 GB devices. Maybe I've never had a workload that filled all 48 GB + extra zram capacity, but it's never given me an issue.

[-] motruck@lemmy.zip 2 points 2 months ago

Use zswap not zram.

[-] SoulKaribou@lemmy.ml 1 points 2 months ago

Shouldn't total ram amount always be powers of 2 (forgot the reason exactly) ? It sounds like 32 +16 wouldn't be ideal ? I remember that from my early days, but maybe it has changed ?

[-] FleetwoodLinux@lemmy.zip 4 points 2 months ago

There are some 24GB sticks around, same with 48GB sticks

[-] monovergent@lemmy.ml 3 points 2 months ago

That is correct, IIRC, the mismatch does limit how much of it can run in dual-channel. Even if a single stick is natively 24 or 48 GB, there is additional strain on the memory controller. It is the way it is on my setup since I had planned an upgrade to a full 64 GB and was holding off until a good deal on the remaining 32 GB kit, which will never come unless the AI bubble bursts.

[-] adarza@lemmy.ca 1 points 2 months ago

i don't see a lot of swap use on my systems, but i do have zswap backed by a swap partition on a couple of them; otherwise i generally i just use a basic swap partition on most everything.

basic systems (browser, email, light docs/media use) i set up for others that are using ext4 might use a swapfile instead if it was the default for whatever distribution i used for it.

[-] Eggymatrix@sh.itjust.works 0 points 2 months ago

Genuinely curious: what are you doing to be needing this?

I cannot think of any modern usecase for swap a part from hybernation

[-] kiol@discuss.online 7 points 2 months ago

I've been using lower ram machines lately, so made me curious about if people are using things like zram with 32gb+

[-] Outsider9042@lemmy.world 6 points 2 months ago

Compiling Librewollf with a sufficient number of jobs is a great way to eat up 32GB of RAM, and the some.

[-] Eggymatrix@sh.itjust.works 0 points 2 months ago

Swapping will make it slower not faster, reduce jobs?

[-] Outsider9042@lemmy.world 2 points 2 months ago

No. Most of the build jobs are fast and small. A couple take up gigabytes at a time. Swap is on SSD anyway. Its fast enough.

I also use NixOS and GuixSD. There are cases where binary caches haven't caught up with the package definition. Situations like Librewolf, LibreOffice and kernel all compiling at the same time.

Sure I could mess around with limiting jobs and build runners... Or I could just have swap, and never worry about it again.

Just a BTRFS swapfile. I'm not worried too much about performance. I rarely hit it and most of the time i don't even need it. Until I do.

[-] Eggymatrix@sh.itjust.works 1 points 2 months ago

Ok, you do you. In my experience that is not how that works, but there is an argument to not worry about it if it works well enough.

[-] amorangi@lemmy.nz 6 points 2 months ago

Local AI can chew it up. Wasn't able to run certain jobs on 64Gb until I switched to zswap.

[-] Eggymatrix@sh.itjust.works 2 points 2 months ago

What kind of token per second are you getting with your model partially on disk?

[-] amorangi@lemmy.nz 1 points 2 months ago

I think it was a video workflow, and it wasn't too bad as it kept the main model in vram and was efficiently passing out whatever it was passing out. But it took nearly all of my 64GB of ram. From memory it was about 20min for a 5 second clip. Not great but not horrible.

this post was submitted on 19 May 2026
54 points (100.0% liked)

Linux

67024 readers
637 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 7 years ago
MODERATORS