Zram and hibernation: which one is preferable?

I’ve recently got into zram, and it seems to promise a more efficient way of using memory than the traditional one I use (RAM without compression and swap file). However, it seems to me that if I use zram I can no longer use the swapfile for hibernation (at least, there is no easy solution to implement, if I’m not mistaken). I use hibernation from time to time, even if it’s not so important to me. So my question would be: do you think the benefits of using zram outweigh the costs of giving up hibernation?

zram and hibernation are not mutually exclusive

Hibernation into the swap file should not be affected.
But: no one knows what you did and how you did it.

You don’t know what I did and how I did it because I’m not asking for help or assistance. Anyway, if you’re interested:

I have set up zram following the procedure here (zram - ArchWiki) and it works perfectly, but hibernation (for which I use a swap file, I don’t have a swap partition and I can’t / don’t want to create a new one) stops working, it gives the message

Call to Hibernate failed: Not enough suitable swap space for hibernation available on compatible block devices and file systems

I did some search and making the two work requires at least some workarounds which I’m not so happy to try, so I was just asking: assuming you have to give up one of the two (zram and hibernation), which one would you give up?

It kinda sounded like it to me. :man_shrugging:

I understood that - I was trying to convey to you that you don’t have to give up one for the other.
I know that because it works for me for ages …

Without anything else, your message looks like your swap file is simply not big enough.

as an addition after some minutes:
I have used the method described in item 1.4 in that Arch wiki - zramswap
Never had a problem.

1 Like

Why are you asking us though? We don’t know what YOU prefer on YOUR system. Just use that. :slight_smile:

If I post in “Non-technical Questions”, by definition I’m not. Anyway, thanks for the tip, I might give it a try.

No, I don’t; but that’s not to say it couldn’t - it would greatly depend on the individual use case, I think. There is another option, however, which you may or may not have considered; and that is zswap.

Rather than having me attempting to sing it’s praises, take a look here:

I hope you find it useful. Cheers.

1 Like

Well, we don’t know that, because Non-technical Questions is for, um, non-technical questions, while yours is — guess what — a technical question, and it doesn’t belong in that category. :roll_eyes:

1 Like

I believe I was asking for users’ preferences, not technical solutions to a problem which indeed I didn’t describe or ask help for. If that was not clear, apologies.

The topic can be closed, as far as I’m concerned.

Was any response helpful, in any way?

If so, you could at least acknowledge whatever post that might have been with a little tick; so that the thread will close naturally, as a matter of course.

Cheers.

Well, that kind of questions then rather falls under the “social media” moniker, which is generally not encouraged in the public sections of the forum, given that this is a designated support forum.

We do however have a Member Hub where similar discussions can safely take place, but for that, you need Trust Level 2 access — I am specifically mentioning that for the other readers, as you yourself do indeed appear to have TL2. I’ll get back to this a little farther down.

Accepted. :wink:

Well, if you found any particular reply in this thread to be the most helpful one with regard to your inquiry, then please mark said post as the solution.

I will now indeed close the thread myself — you should still be able to mark the solution, but if not, then just contact one of the moderators via a PM and tell them which post to mark. Should you however wish to continue discussing this particular topic, or you would want to start a similar one, then I would invite you to do so in the Member Hub, given that you have access to it. :wink: