home.social

#gentoolinux — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #gentoolinux, aggregated by home.social.

  1. #TIL (Today I Learned) about Linux that the advice to configure zram for swap is bad advice. You should use zswap instead.

    Using zram is likely to be actually counterproductive and can make your computer *slower* than if you didn't try to make optimizations.

    The way zram works is that it first fills up the space in RAM until that's full and then it moves to fill the lower-prioritized space on the SSD. But: zram has no way to free the RAM. 😯 Therefore, once zram moves from RAM to disk, all the data you recently used and will thus likely soon need again, are guaranteed to be on the slow SSD, not in the fast RAM.

    Zram is good for embedded systems, with very little RAM … systems that possibly don't even have disk storage … where you therefore have to make the most out of the limited RAM you have.

    On typical machines though, prefer zswap and omit configuring zram entirely.

    If you use GRUB, all you need is this line in GRUB's configuration file:

    ```
    GRUB_CMDLINE_LINUX="zswap.enabled=1 zswap.compressor=lz4"
    ```

    Sources:

    - chrisdown.name/2026/03/24/zswa
    - wiki.archlinux.org/title/Zswap

    #Linux #Arch #ArchLinux #Gentoo #GentooLinux

  2. #TIL (Today I Learned) about Linux that the advice to configure zram for swap is bad advice. You should use zswap instead.

    Using zram is likely to be actually counterproductive and can make your computer *slower* than if you didn't try to make optimizations.

    The way zram works is that it first fills up the space in RAM until that's full and then it moves to fill the lower-prioritized space on the SSD. But: zram has no way to free the RAM. 😯 Therefore, once zram moves from RAM to disk, all the data you recently used and will thus likely soon need again, are guaranteed to be on the slow SSD, not in the fast RAM.

    Zram is good for embedded systems, with very little RAM … systems that possibly don't even have disk storage … where you therefore have to make the most out of the limited RAM you have.

    On typical machines though, prefer zswap and omit configuring zram entirely.

    If you use GRUB, all you need is this line in GRUB's configuration file:

    ```
    GRUB_CMDLINE_LINUX="zswap.enabled=1 zswap.compressor=lz4"
    ```

    Sources:

    - chrisdown.name/2026/03/24/zswa
    - wiki.archlinux.org/title/Zswap

    #Linux #Arch #ArchLinux #Gentoo #GentooLinux

  3. (Today I Learned) about Linux that the advice to configure zram for swap is bad advice. You should use zswap instead.

    Using zram is likely to be actually counterproductive and can make your computer *slower* than if you didn't try to make optimizations.

    The way zram works is that it first fills up the space in RAM until that's full and then it moves to fill the lower-prioritized space on the SSD. But: zram has no way to free the RAM. 😯 Therefore, once zram moves from RAM to disk, all the data you recently used and will thus likely soon need again, are guaranteed to be on the slow SSD, not in the fast RAM.

    Zram is good for embedded systems, with very little RAM … systems that possibly don't even have disk storage … where you therefore have to make the most out of the limited RAM you have.

    On typical machines though, prefer zswap and omit configuring zram entirely.

    If you use GRUB, all you need is this line in GRUB's configuration file:

    ```
    GRUB_CMDLINE_LINUX="zswap.enabled=1 zswap.compressor=lz4"
    ```

    Sources:

    - chrisdown.name/2026/03/24/zswa
    - wiki.archlinux.org/title/Zswap

  4. #TIL (Today I Learned) about Linux that the advice to configure zram for swap is bad advice. You should use zswap instead.

    Using zram is likely to be actually counterproductive and can make your computer *slower* than if you didn't try to make optimizations.

    The way zram works is that it first fills up the space in RAM until that's full and then it moves to fill the lower-prioritized space on the SSD. But: zram has no way to free the RAM. 😯 Therefore, once zram moves from RAM to disk, all the data you recently used and will thus likely soon need again, are guaranteed to be on the slow SSD, not in the fast RAM.

    Zram is good for embedded systems, with very little RAM … systems that possibly don't even have disk storage … where you therefore have to make the most out of the limited RAM you have.

    On typical machines though, prefer zswap and omit configuring zram entirely.

    If you use GRUB, all you need is this line in GRUB's configuration file:

    ```
    GRUB_CMDLINE_LINUX="zswap.enabled=1 zswap.compressor=lz4"
    ```

    Sources:

    - chrisdown.name/2026/03/24/zswa
    - wiki.archlinux.org/title/Zswap

    #Linux #Arch #ArchLinux #Gentoo #GentooLinux

  5. #TIL (Today I Learned) about Linux that the advice to configure zram for swap is bad advice. You should use zswap instead.

    Using zram is likely to be actually counterproductive and can make your computer *slower* than if you didn't try to make optimizations.

    The way zram works is that it first fills up the space in RAM until that's full and then it moves to fill the lower-prioritized space on the SSD. But: zram has no way to free the RAM. 😯 Therefore, once zram moves from RAM to disk, all the data you recently used and will thus likely soon need again, are guaranteed to be on the slow SSD, not in the fast RAM.

    Zram is good for embedded systems, with very little RAM … systems that possibly don't even have disk storage … where you therefore have to make the most out of the limited RAM you have.

    On typical machines though, prefer zswap and omit configuring zram entirely.

    If you use GRUB, all you need is this line in GRUB's configuration file:

    ```
    GRUB_CMDLINE_LINUX="zswap.enabled=1 zswap.compressor=lz4"
    ```

    Sources:

    - chrisdown.name/2026/03/24/zswa
    - wiki.archlinux.org/title/Zswap

    #Linux #Arch #ArchLinux #Gentoo #GentooLinux