Originally posted by karolherbst
View Post
Announcement
Collapse
No announcement yet.
Fedora 34 Looking To Tweak Default zRAM Configuration
Collapse
X
-
-
Originally posted by waxhead View Post
I would say that even with zram you would need physical swap regardless. If you swapoff /dev/zram0 for example it would be good to have some backing storage that has plenty of space. Where zram is useful memory is sacred so your zram typically can't / or should not be too large.
I personally find zswap to be more transparent and since it provide me with essentially the same functionality, it is the way to go for me (at least for now).
Leave a comment:
-
Originally posted by waxhead View PostGot it - just like multilevel cache right? e.g. LRU to swap cache first, then LRU of that to SSD, then LRU of that again to HDD (or even tapedrive haha :P )
Leave a comment:
-
Originally posted by karolherbst View PostAnd I think zswap is inferior in low memory systems as you either require a real swap or zram in addition.
Personally, I only use zram with zstd compression. I have a laptop with 2 GiB of RAM and it works perfectly fine like this, without any physical swap. Never once I had an oom.
Leave a comment:
-
Originally posted by karolherbst View Post
you can have different priorities for all your swap devices, but yeah, I am not quite sure which would behave better in this case. I'd assume that with zram pages are just put into disc swap once the zram swap is full, where with zswap they would get moved into swap at some point.
But in the end it really doesn't matter all that much. You can for example use zram instead of tmpfs and reduce your memory consumption. And I think zswap is inferior in low memory systems as you either require a real swap or zram in addition.
I personally find zswap to be more transparent and since it provide me with essentially the same functionality, it is the way to go for me (at least for now).
Leave a comment:
-
Originally posted by waxhead View Post
Are you sure? What if happens if a page is "swapped" out to zram and never used again (e.g. LRU) it will just stay in memory consuming space right?
zswap will evict the page to physical swap and works otherwise more or less the same. (oh and hibernation is not straight away if you got zram , you have to disable swap on zram first IIRC)
But in the end it really doesn't matter all that much. You can for example use zram instead of tmpfs and reduce your memory consumption. And I think zswap is inferior in low memory systems as you either require a real swap or zram in addition.
Leave a comment:
-
Originally posted by karolherbst View PostI really don't understand how people don't get this. There is literally no downside to zram.
zswap will evict the page to physical swap and works otherwise more or less the same. (oh and hibernation is not straight away if you got zram , you have to disable swap on zram first IIRC)
Leave a comment:
-
Originally posted by HyperDrive View PostI mean having multiple swap devices prioritised by access time, not some arbitrary number. Right now, swap devices are used from the highest to the lowest priority (a lower priority device is only used if a higher priority one is full).
The idea would be, for example, if we had three swap devices (zram, SSD, spinning rust), to use the zram device until it filled up, then move the LRU compressed data to the SSD. When the SSD filled up, do the same from the SDD to the spinning rust, and so on.
Leave a comment:
-
bonus points: hibernation wasn't even supported on Fedora before and the swap partition by default (50% of RAM) was too small for hibernation anyway. For reliable hibernation you need twice as much RAM as swap otherwise there is always something you can't save, like VRAM.
Leave a comment:
-
honestly.. zram is compressed storage in RAM, either as a filesystem or swap. The ratio is usually between 2x and 3x. so if you have 4GB of real RAM, you can get up to 12GB of effective RAM. Sure it's slower as you have to compress/decompress, but what's the alternative? swapping into a HDD?... seriously...
Also zram uses RAM only on demand. If your fs has the strip option enabled or you remove something from the swap you free the RAM.
I really don't understand how people don't get this. There is literally no downside to zram.
Leave a comment:
Leave a comment: