98

To be clear, I don't blame the poster of this comment at all for the content of their post – this is accepted as "common knowledge" by a lot of Linux sysadmins and is probably one of the most likely things that you will hear from one if you ask them to talk about swap. It is unfortunately also, however, a misunderstanding of the purpose and use of swap, especially on modern systems.

you are viewing a single comment's thread
view the rest of the comments
[-] secret300 8 points 1 week ago

especially since it can needlessly wear out your ssd

ZRAM bby

[-] recursive_recursion@programming.dev -1 points 1 week ago* (last edited 1 week ago)

after a quick preliminary search,
a couple of things I've found out:

this might not necessarily be adopted by the mainstream desktop users, due to the nature of zram compressing data in addition to disallowing hibernation

Hibernating to swap on zram is not supported, even when zram is configured with a backing device on permanent storage. logind will protect against trying to hibernate to a swap space on zram.

  • data compression by nature incurs dataloss so there are both pro & con tradeoffs to which should be communicated to the user otherwise they might receive an unnecessary worse user experience:
    • "why is my computer so buggy?"
      • (the system is working as it's coded but not working in they way the user expects it to)
        • this would be unfortunate as they might leave back to Windows or MacOS
    • I could be completely wrong about this, if so please comment or disregard this section entirely

to me atm; zram seems great for server based systems rather than for desktop users' systems


one other method for zram mainstream adoption is to encourage an eccentric system that I'm currently using, which is to have the host system only contain minimal packages to run Virtual Machines:

  • zram compression might be fine as the main services/programs are run within their relevant and/or separated VM containers
    • this simultaneously achieves:
      • Wikipedia - Separation of Concerns
      • enhanced security as the host is further firewalled/bubblewrapped from the guest like Flatpaking/containerization (and malware is less likely to activate due to malicious users being unhelpful in letting their programs run in a VM 😢🤗)
  • hibernation can still be achived by save-stating VMs (VM restoration at will basically achieves hibernation so it doesn't really matter if the host is shutdown so long as all VMs are saved by the user before host shutdown)

sorry for the long comment!
stuff like this interests me the most so I've spent a lot of time in learning and tinkering around🤗

[-] voodooattack@lemmy.world 14 points 1 week ago

data compression by nature incurs dataloss

What? It’s not a jpeg file. It’s a lossless compression algorithm.

It’s a lossless compression algorithm.

if so that's pretty dope!

load more comments (1 replies)
load more comments (1 replies)
load more comments (1 replies)
this post was submitted on 06 Jul 2024
98 points (94.5% liked)

Linux

4436 readers
32 users here now

A community for everything relating to the linux operating system

Also check out !linux_memes@programming.dev

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 1 year ago
MODERATORS