Fedora has it by default since a while, and at first I thought it's a
very stupid idea. In practise, I can't be bothered anymore to create
these annoying swap partitions. They're only a waste of disc space.
There haven't been any issues with it, and when the machine runs out
of memory, using swap partitions or swap files isn't going to fix
that.
But with zram taking over half its memory, its into swap and slowing down quicker, and plumb out of memory for big jobs, when it could still be working fine with bigger, albeit probably slower than zram, swap.
I've no clue how much the zram compression slows it in terms of thru put.
I wiped out the git clone of linuxcnc by re-arranging that SSD yesterday, but I'll do another build later today and see how long it takes with real swap.
Thank you. Take care & stay well..
Cheers, Gene Heskett.
I might be wrong, but zram probably wouldn't be so popular if it always consumed 100% of the space allocated to it.
Instead, I believe zram works like this:
In other words, zram works a bit like a swap disk, but it also acts a bit like compressing data in RAM.
So, applications won't see a slowdown in memory access because
they still talk directly to RAM. However, if an application has
been swapped to zram, then decompressing the page from zram WILL
be quicker than pulling the page from a block device, even an NVMe
drive.
Attachment:
OpenPGP_signature.asc
Description: OpenPGP digital signature