| Post Reply | RetroFed Forum Forum Index » linuxmemes |
| Author | Message | ||
|---|---|---|---|
ColdWater
lemmy.ca
ColdWater@lemmy.caJoined: 2023-08-09 |
|
||
| 271 Original | |||
|
neon_nova
lemmy.dbzer0.com
neon_nova@lemmy.dbzer0.com Joined: 2024-12-06 |
What is zram? |
||
| 50 | |||
ColdWater
lemmy.ca
ColdWater@lemmy.caJoined: 2023-08-09 |
What is zram?
Swap but better it behave mostly like actual ram and fast too, not as fast as actual ram but still way faster than swap I can open 5 browser tabs one of them playing a video while compiling a software I don't feel my system slow down at all |
||
| 59 | |||
tal
lemmy.today
tal@lemmy.todayJoined: 2023-10-04 |
What is zram?
It's a Linux feature to compress some of your memory and then store it in a RAM disk. For systems with limited memory, it makes it go further. https://en.wikipedia.org/wiki/Zram
|
||
| 38 | |||
|
bulwark
lemmy.world
bulwark@lemmy.world Joined: 2023-07-07 |
Look at Mr. Fancy pants over here with 11 cores. I'm just jealous |
||
| 23 | |||
|
Davel23
fedia.io
Davel23@fedia.io Joined: 2024-03-16 |
Look at Mr. Fancy pants over here with 11 cores. I'm just jealous
|
||
| 1 | |||
|
SomeoneSomewhere
lemmy.nz
SomeoneSomewhere@lemmy.nz Joined: 2023-06-14 |
Look at Mr. Fancy pants over here with 11 cores. I'm just jealous
12, because they're zero-indexed. Probably six cores with hypethreading or the AMD equivalent. |
||
| 58 | |||
ColdWater
lemmy.ca
ColdWater@lemmy.caJoined: 2023-08-09 |
Look at Mr. Fancy pants over here with 11 cores. I'm just jealous
I wish, it's a Ryzen 9 5900hx with only 8cores what you seeing is threads which I have 16 of them |
||
| 12 | |||
undefined
lemmy.hogru.ch
undefined@lemmy.hogru.chJoined: 2024-11-07 |
It's a Linux feature to compress some of your memory and then store it in a RAM disk. For systems with limited memory, it makes it go further. https://en.wikipedia.org/wiki/Zram zram, formerly called compcache, is a Linux kernel module for creating a compressed block device in RAM, i.e. a RAM disk with on-the-fly disk compression. The block device created with zram can then be used for swap or ...
I have a mini PC that has been barreling through NVMe disks but Alpine Linux’ “usb” install mode just wasn’t great either. So I use a “sys” install mode (traditional) on an NVMe disk but have directories like |
||
| 7 | |||
|
atomicbocks
sh.itjust.works
atomicbocks@sh.itjust.works Joined: 2025-02-16 |
12, because they're zero-indexed. Probably six cores with hypethreading or the AMD equivalent.
AMD’s version is called Simultaneous Multithreading (SMT). But just about everyone, even most motherboard firmware that I have seen, calls it hyperthreading still. |
||
| 17 | |||
|
db2
lemmy.world
db2@lemmy.world Joined: 2023-07-29 |
sneers in 48GB |
||
| 20 | |||
|
zurohki
aussie.zone
zurohki@aussie.zone Joined: 2023-06-21 |
sneers in 48GB
I upgraded to 64GB RAM a year or so ago which I didn't really need, but it was cheap so why not. How things have changed. |
||
| 46 | |||
ChaoticNeutralCzech
feddit.org
ChaoticNeutralCzech@feddit.orgJoined: 2024-06-23 |
Edit: No swop? |
||
| 44 | |||
ChaoticNeutralCzech
feddit.org
ChaoticNeutralCzech@feddit.orgJoined: 2024-06-23 |
Like with a slowly rolling unbraked car: Don't take photos if you can prevent the crash |
||
| 14 | |||
daggermoon
piefed.world
daggermoon@piefed.worldJoined: 2026-03-01 |
I upgraded to 64GB RAM a year or so ago which I didn't really need, but it was cheap so why not. How things have changed.
It didn't suck enough already buying PC parts in Australia? |
||
| 9 | |||
|
MonkeMischief
lemmy.today
MonkeMischief@lemmy.today Joined: 2023-10-24 |
Swap but better it behave mostly like actual ram and fast too, not as fast as actual ram but still way faster than swap I can open 5 browser tabs one of them playing a video while compiling a software I don't feel my system slow down at all
I always confuse ZRAM and ZSwap. From my understanding ZRAM is the better one and Zswap is kinda outmoded. It turns into a rabbit hole every time I gotta reference it! Lol |
||
| 23 | |||
|
zurohki
aussie.zone
zurohki@aussie.zone Joined: 2023-06-21 |
It didn't suck enough already buying PC parts in Australia?
Now it's starting to look like upgrades are just a thing of the past and this is going to be my forever machine. |
||
| 9 | |||
daggermoon
piefed.world
daggermoon@piefed.worldJoined: 2026-03-01 |
Now it's starting to look like upgrades are just a thing of the past and this is going to be my forever machine.
I hope you're wrong. |
||
| 5 | |||
pewpew
feddit.it
pewpew@feddit.itJoined: 2023-06-06 |
Swap is overrated (/s) |
||
| 10 | |||
pewpew
feddit.it
pewpew@feddit.itJoined: 2023-06-06 |
Is it just me or building with
Crashes with out of memory every time? |
||
| 2 | |||
Wildmimic
anarchist.nexus
Wildmimic@anarchist.nexusJoined: 2025-09-05 |
I upgraded to 64GB RAM a year or so ago which I didn't really need, but it was cheap so why not. How things have changed.
Did the same, even if it's "just" DDR4 i still feel like RAM nobility nowadays. |
||
| 12 | |||
|
zurohki
aussie.zone
zurohki@aussie.zone Joined: 2023-06-21 |
I hope you're wrong.
I hope I am too, but I just looked at what a CPU, motherboard and RAM upgrade would cost and it looks like this system will be old enough to start high school by the time I replace it. And the system after that? If I buy new in 2030, when will the one after that be? 2045? |
||
| 3 | |||
|
charizardcharz
piefed.world
charizardcharz@piefed.world Joined: 2025-07-09 |
I always confuse ZRAM and ZSwap. From my understanding ZRAM is the better one and Zswap is kinda outmoded. It turns into a rabbit hole every time I gotta reference it! Lol
From my understanding, it's the opposite. Zswap is the better one since it has a ZRAM-like compressed section of RAM and disk-backed swap. That's definitely an oversimplification though. I agree it's confusing. I always look it up during setup so I know which one to use. |
||
| 10 | |||
|
db2
lemmy.world
db2@lemmy.world Joined: 2023-07-29 |
Swap is overrated (/s)
Some people think that. I tried it to see what would happen, I have enough that I never threatened to hit the ceiling during normal use so it was uneventful. I turned swap back on and forgot about it for a couple weeks, when I checked about 12GB of swap was in use. So even if you have plenty of ram don't discount swap, it's still going to help. |
||
| 5 | |||
Illecors
lemmy.cafe
Illecors@lemmy.cafeJoined: 2019-04-16 |
AMD’s version is called Simultaneous Multithreading (SMT). But just about everyone, even most motherboard firmware that I have seen, calls it hyperthreading still.
Which is sad. SMT is the tech, HT is the marketing from intel. |
||
| 6 | |||
|
iocase
lemmy.zip
iocase@lemmy.zip Joined: 2026-05-11 |
Did the same, even if it's "just" DDR4 i still feel like RAM nobility nowadays.
I bought 256 GB of DDR3 for my HP DL380p 3 or so years ago? It was $330 Canadian at the time... |
||
| 1 | |||
|
highball
lemmy.world
highball@lemmy.world Joined: 2024-12-19 |
From my understanding, it's the opposite. Zswap is the better one since it has a ZRAM-like compressed section of RAM and disk-backed swap. That's definitely an oversimplification though. I agree it's confusing. I always look it up during setup so I know which one to use.
There is a lengthy thread on Reddit about the technical differences. Apparently Zswap will take advantage of the kernel eviction strategy for swap space. Apparently Zram doesn't have that. To me that never made sense because, you create a Zram block device and then set that as your storage for swap space. Why would the kernel care, or know, that the swap space is backed by a Zram block device. I do use Zram for my cloud self hosting machines and my dev machine. On the cloud devices they have 1 or 2 GB of ram and on my dev machine I have 32GB of ram. And in both cases it definitely seems like there is swap eviction. I also set the vm.swappiness to 180. Prior to Zram I would set my machines' swappiness to 10. Swapping is highly encouraged on my machine. |
||
| 1 | |||
|
highball
lemmy.world
highball@lemmy.world Joined: 2024-12-19 |
I hope you're wrong.
I think things are going to change. Apple is talking about buying ram from Chinese ram companies. If that happens, a lot of other companies will do the same and that should reduce pressure on ram quite a bit. I'm sure those long term contracts the AI companies have for expensive ass ram will get canceled quick. |
||
| 1 | |||
Baŝto
discuss.tchncs.de
basxto@discuss.tchncs.deJoined: 2023-07-22 |
Still get that issue with swap and whatever zthing I use |
||
| 2 | |||
|
Coki91
lemmy.world
Coki91@lemmy.world Joined: 2025-07-05 |
Swap but better it behave mostly like actual ram and fast too, not as fast as actual ram but still way faster than swap I can open 5 browser tabs one of them playing a video while compiling a software I don't feel my system slow down at all
It's the opposite actually, in terms of implementation Zram is a hack, but it does have it's use case when your system load doesn't far exceed your total RAM, on the other hand swap is tightly integrated into the system and it's on it's way to implement "Virtual Swap" which is effectively Zram but not a hack, making it like a hundred times better, see This blogpost for a detailed explanation |
||
| 7 | |||
|
lavander
lemmy.dbzer0.com
lavander@lemmy.dbzer0.com Joined: 2025-08-11 |
Dummy question… if you have an ssd, why not swap? |
||
| 6 | |||
Digit
lemmy.today
Digit@lemmy.todayJoined: 2026-07-29 |
Hah, sympathies. I had a similar scrot-before-disaster recently... oh yup, there it is https://lemmy.wtf/post/44743724/23091152 ... those pebkac errors still sneak up on us. n_n |
||
| 1 | |||
Digit
lemmy.today
Digit@lemmy.todayJoined: 2026-07-29 |
Swap is overrated (/s)
yeah, until... |
||
| 1 | |||
Digit
lemmy.today
Digit@lemmy.todayJoined: 2026-07-29 |
Some people think that. I tried it to see what would happen, I have enough that I never threatened to hit the ceiling during normal use so it was uneventful. I turned swap back on and forgot about it for a couple weeks, when I checked about 12GB of swap was in use. So even if you have plenty of ram don't discount swap, it's still going to help.
I had a fellow linux user friend of over a decade convince me to try go no swap for a change. I pebkac'd the system before it got a chance to fall foul of having zero swap. ... My next computer even before that pebkac, has swung the other way... >3X RAM amount of swap (And that's on twice the RAM too. Mmm. Roomy.). Not going back to no swap. I prefer the headroom. With fast drives snug on the mainboard, it doesn't hurt dipping into swap. |
||
| 1 | |||
|
ScottyTheEngineer
lemmy.dbzer0.com
ScottyTheEngineer@lemmy.dbzer0.com Joined: 2026-08-16 |
Have you tried downloading more RAM? |
||
| 3 | |||
|
Fmstrat
lemmy.world
Fmstrat@lemmy.world Joined: 2024-04-27 |
There is a lengthy thread on Reddit about the technical differences. Apparently Zswap will take advantage of the kernel eviction strategy for swap space. Apparently Zram doesn't have that. To me that never made sense because, you create a Zram block device and then set that as your storage for swap space. Why would the kernel care, or know, that the swap space is backed by a Zram block device. ...
Why not just set kernel swappiness to 1 and not do any of that? |
||
| 1 | |||
|
Fmstrat
lemmy.world
Fmstrat@lemmy.world Joined: 2024-04-27 |
Dummy question… if you have an ssd, why not swap? Sure not the best but also that is the last resort and on ssd Is not as bad as it used to be on hdd
Yea, I'm wondering if people don't realize the kernel has a swappiness setting. You can turn it down to lower the priority given to swap. |
||
| 1 | |||
|
highball
lemmy.world
highball@lemmy.world Joined: 2024-12-19 |
Why not just set kernel swappiness to 1 and not do any of that?
Because I want to encourage more swapping, not less. |
||
| 1 | |||
|
Fmstrat
lemmy.world
Fmstrat@lemmy.world Joined: 2024-04-27 |
Because I want to encourage more swapping, not less.
But.. Why? If ZRam uses RAM as compressed swap, what advantage does it have over just leaving that RAM available as shared memory? Do you have a specific process that is eating up non-shared? This might be of interest: https://chrisdown.name/2026/03/24/zswap-vs-zram-when-to-use-what.html |
||
| 1 | |||
|
highball
lemmy.world
highball@lemmy.world Joined: 2024-12-19 |
But.. Why? If ZRam uses RAM as compressed swap, what advantage does it have over just leaving that RAM available as shared memory? Do you have a specific process that is eating up non-shared? This might be of interest: https://chrisdown.name/2026/03/24/zswap-vs-zram-when-to-use-what.html
You get more ram for very little slow down, that also, would rarely be the bottleneck. For the servers, ram is a constraint, and it's all just selfhosting. I have a Raspberry Pi that I selfhost with, as well as a couple 10 dollar compute instances in the cloud. More ram is much better than the tiny slow down that might occur during compression or decompression. All my services are all still very snappy, even the mailserver. For my work, I bring up large docker sandboxes of services that I need running to test entire systems. In the past, I would just allocate 32GB to a swapfile. ZRam is way faster. |
||
| 2 | |||
|
Fmstrat
lemmy.world
Fmstrat@lemmy.world Joined: 2024-04-27 |
You get more ram for very little slow down, that also, would rarely be the bottleneck. For the servers, ram is a constraint, and it's all just selfhosting. I have a Raspberry Pi that I selfhost with, as well as a couple 10 dollar compute instances in the cloud. More ram is much better than the tiny slow down that might occur during compression or decompression. All my services are all still ver...
But you also get that with shared memory in zswap, with all the other advantages. I'd really recommend reading the "Architectural differences" in the linked article from Chris Down, as he's way deeper into the kernel code than me, but the biggest problem in a setup like a small memory server is:
I.E. in your use case, zswap is better, not even taking into account all the other details from Chris' article. |
||
| 1 | |||
|
highball
lemmy.world
highball@lemmy.world Joined: 2024-12-19 |
But you also get that with shared memory in zswap, with all the other advantages. I'd really recommend reading the "Architectural differences" in the linked article from Chris Down, as he's way deeper into the kernel code than me, but the biggest problem in a setup like a small memory server is: If you have a ZRAM device, and it fills up, more recently needed pages end up on the backup disk swa...
I looked at the article, same as the reddit thread, probably written by the same person. ZSWAP is just not necessary. ZRAM works and doesn't require disk space w/ 3:1 compression. If I was running out of swap, then yes, I would take a look at ZSWAP to improve my swap situation. It's just not a thing with ZRAM, not for many years. I.E. for my use cases, ZSWAP is irrelevant. |
||
| 2 | |||
| Post Reply |
Back to top |