Jump to content

Zram questions


wurmfood

Recommended Posts

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?

Link to comment
Share on other sites

  • wurmfood changed the title to Zram questions
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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines