On Sat, Dec 5, 2020 at 10:03 PM Tim via users
<users@lists.fedoraproject.org> wrote:
>
> On Sat, 2020-12-05 at 17:45 -0700, Chris Murphy wrote:
> > There definitely is no free lunch with swap-on-zram, but it helps
> > quite a lot for most workloads.
>
> I'm curious how dedicating some of your RAM for swap, therefore having
> less RAM, is more beneficial than just using your RAM as RAM.

https://fedoraproject.org/wiki/Changes/SwapOnZRAM#Detailed_Description

Let me know if you have questions not answered there. A key point is
this is not a preallocation. Creating a 4G /dev/zram0 device doesn't
reserve or consume 4G. It's dynamically allocated, and even once full
it's not using that amount of memory, instead actual memory consumed
is related to the compression ratio achieved. Typical is 1 to 1.5G
memory consumption to swap out 4G worth of pages, for a net gain of
2.5G - 3G memory for use by other programs. And without having to
write to disk at all.

Not perfect, and not magic. It does have some tradeoffs.

-- 
Chris Murphy
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
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/users@lists.fedoraproject.org

Reply via email to