Hirdetés

Új hozzászólás Aktív témák

  • ubyegon2
    félisten

    En inkabb a zswap-et kapcsoltam be a zram helyett pont az itt leirtak miatt, nagyon jo iras:
    https://easylinuxtipsproject.blogspot.com/p/swappiness.html

    zswap taxes the CPU less than zRam. Sometimes much less: especially with desktop use the difference can be significant. But there's more at play:

    As explained in depth in this fine article, zswap sits as gatekeeper in front of your disk swap, compresses pages in RAM, and automatically tiers "cold" data (data which is unlikely to be needed soon) to disk. It integrates directly with the kernel's memory management and distributes pressure gracefully.

    zRam on the other hand, is a compressed RAM block device with a hard capacity limit. When you put swap on it and it fills up, there is no automatic eviction, and the kernel has very little leverage to do anything about the situation.

    When the zRam "device" is full, the system either starts to kill processes because of acute memory shortage or falls back to lower-priority swap, causing so-called LRU inversion: your fastest storage tier is clogged with the coldest data, with no way to evict it. That actively forces your working set of "warm" data (data that'll probably be used again soon) onto the slowest storage.

    In such a case, zRam isn't just failing to help. It is, instead, actively making things worse than having no compressed swap at all.

    And even worse, the longer the system has been running, the more broken things get: warm pages drift to disk, cold pages fossilize in zRam, and the gap between what zRam is holding and what you actually need keeps widening. Not exactly helpful....

    zRam only really makes sense for extremely memory-constrained embedded systems, diskless setups, or cases with specific security requirements around keeping private data off persistent storage. And there's even more bad news: swap on zRam is also increasingly becoming unsupported upstream.

    You can find more background information about why zswap is usually better than zRam here. Web page gone? Download an offline copy of that article here.

    Note: Don't install zRam when you use zswap, because it's downright counterproductive in combination with zswap!

    Both zswap and zRam provide a compressed cache and would, when used simultaneously, wind up using more system memory than each individually. Simultaneous use makes therefore no sense and would even be detrimental.

    Köszi, hasznosnak tűnik, amit linkeltél. :K

    Lehet ebben logika amúgyis, hiszen a zswap a swap miatt készült, a zram meg anno a kevés RAM miatt. Valahogy nekem anno a zram jött szembe, bár olvastam a különbségeket, lehet ahol olvastam, ott nem volt így szembeállítva, talán archwikiben néztem. Mondjuk kipróbálni már nem nagyon fogom tudni egyiket sem, amit persze nem bánok, hiszen az erős hardverek miatt van ez.

    De ettől függetlenül nem temetném a zram megoldását sem, gondolván arra, hogy modern disztrók, mint a két említett archklón és úgy látom a Bazzite is default használja.

    Elmentem ezeket a linkeket, néha érdemes ilyeneket összehasonlításként is olvasgatni.

Új hozzászólás Aktív témák