wurmfood Posted April 8, 2021 Posted April 8, 2021 I'm trying to understand the role of zram and having some difficulties with it. I've looked in several places and my understanding is this: - It's a block device in RAM that uses compression - It functions similar to swap I notice that mine is set to about 2 Gb: wurmfood@helios64:~$ cat /proc/swaps Filename Type Size Used Priority /dev/zram0 partition 1945084 0 5 My questions: 1. Does that mean 2 Gb of the device RAM is used for the zram swap device? 2. I can understand this on devices with slower storage, but would it be reasonable to disable this and instead use swap on an SSD? 0 Quote
Werner Posted April 8, 2021 Posted April 8, 2021 4 minutes ago, wurmfood said: Does that mean 2 Gb of the device RAM is used for the zram swap device? Yes. 4 minutes ago, wurmfood said: but would it be reasonable to disable this and instead use swap on an SSD? Also yes. Armbian by default uses 50% if available memory for zram. If you have a fast harddrive like SSD or NVMe attached it of course makes sense to put a common swap there. 1 Quote
wurmfood Posted April 8, 2021 Author Posted April 8, 2021 Thank you. I wanted to make sure I understood it correctly since I hadn't encountered this on other Linux systems. 0 Quote
Werner Posted April 8, 2021 Posted April 8, 2021 Most of them do not run of a sdcard which limited life span so they can rely on a normal swap partition. 0 Quote
gprovost Posted April 8, 2021 Posted April 8, 2021 You can change the settings in /etc/default/armbian-zram-config Maybe the default settings are effectively overkill with 4GB of RAM. 0 Quote
johnnyGr Posted September 26, 2022 Posted September 26, 2022 How would i set this on a odroid n2+ booting from 64gb emmc and 2TB ssd attached using usb. Is emmc more relyable than a usb stick? 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.