On 12/4/20 2:04 PM, Sreyan Chakravarty wrote:
On Sat, 5 Dec 2020, 3:17 am Samuel Sieb, <
zram doesn't take up any significant amount of RAM until it's needed.
Then it compresses the swapped data blocks. I see that I've
misconfigured something and ended up with two zram swaps active, so I
have almost 17GB of zram defined on my 12GB laptop. Currently there is
9GB of swapped data using just over 2GB of RAM. So even if I used the
entire 17GB of zram swap, my system would probably still be ok.
# zramctl
NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram1 lz4 5G 5G 1.3G 1.4G 4
/dev/zram0 lzo-rle 11.6G 3.8G 931.8M 968.5M 4 [SWAP]
The whole zram thing does not make sense to me.
It does take a bit of getting used to.
You allocate swap so that you can swap pages to the disk if you run out
of physical memory.
Thus it makes sense that the backing store will be on the disk.
How does it make sense to keep that store in the RAM? On the very
resource that is scarce.
Its like you want more room, so you half your room and once a half is
used you move onto the next room. This makes no sense. If you want more
room you need get some actual space.
It's more like having a TARDIS in your room if you understand that
reference. It takes up some space, but it's bigger on the inside. :-)
Although in this case, it does take up more space the more you stuff in
it, but it holds more than the space it takes up.
The RAM pages that need to get paged out get compressed and kept in
memory. I suppose you could consider that my system with 12GB of RAM
and 12GB of zram configured could become an 8GB system with 12GB of used
swap. 20GB of virtual memory but still not using the disk.
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-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/users@xxxxxxxxxxxxxxxxxxxxxxx