On Fri, Jun 5, 2020 at 4:35 AM Vitaly Zaitsev via devel <devel@xxxxxxxxxxxxxxxxxxxxxxx> wrote: > > On 04.06.2020 22:30, Ben Cotton wrote: > > Swap is useful, except when it's slow. zram is a RAM drive that uses > > compression. Create a swap-on-zram during start-up. And no longer use > > swap partitions by default. > > I'm strongly against this, because zram will replace disk swap and > disable hibernation, which is very useful on laptops. Already discussed in the 'support hibernation' thread. Most laptops today have UEFI Secure Boot enabled by default and therefore hibernation isn't possible. And even when the laptop doesn't have Secure Boot enabled, there's a forest of bugs. It works for some people and not others. It was working for me on one laptop in February, consistently doesn't work now and I haven't gotten a reply yet from upstream about the problem. > > I suggest zswap instead (with zswap-cli[1] implementation). > > [1]: https://github.com/xvitaly/zswap-cli I am a fan of zswap too, but it needs deconfliction logic with swap-on-zram. The generator would need to come after the fstab-generator, so that it could know if there is a swap-on-drive partition. From that it could do swap-on-zram if there is no swap-on-drive. And setup zswap if there is (instead of two swap devices). The kernel has support for 32 swap devices, since almost forever. I've done enough testing with zswap in all the same conditions I've used zram, that I'm confident this can be implemented with this feature in the F33 time frame. But someone needs to help out with the zram-generator code to teach it how to use zswap. There is a sysfs interface to do it so that's pretty straightforward and I think that's how zram-generator does things now for zram, it's not yet using zramctl for setup. I can plan to have supplementary tests for zswap on the test day. Hypothetically zswap is a bit smarter because of the LRU basis it uses to decide what to toss out of the memory cache to the swap-on-drive. Whereas two swaps where /dev/zram0 has higher priority, gets favored until it's full, then uses /dev/swapondrive. But in my testing I haven't been able to prove zswap is better. -- Chris Murphy _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx