MMC cell usage and swap space

Hello everyone,

I have noticed that the Librem 5 swaps quite a bit (especially if I launch waydroid to get to my bank 2FA application, for example)

Has anyone tried moving the swap space to the SD card, in order to preserve the internal cells? Should I be concerned?

Thank you, in advance.

I think that might be prohibitively slow.

Did you consider using zramswap?

If you use that you could extend RAM further by adding writeback.

If you’d know which apps might use too much memory and thereby would slow down the device by swapping a lot you could try with cgroups.

If you do anything cool that is not just using zramswap only as Kyle describes in his article don’t forget to let us know :slight_smile: !

1 Like

Thanks for the suggestion about zramswap - I will try it right away.

I hardly ever run out of memory. I use the phone as a basic communications tool and basic web browsing. I’m not the kind that will use it to play mega 3D games or compile an entire OS in it.

HOWEVER

Sometimes I need waydroid, and then it’s swap nightmare. I hope this will help.

I will surely report back in case of something new. I may go for zramswap + a small additional swap partition on the SD card so at least writes would be spread between internal MMC and SD. It’s only when I need waydroid for banking (bank 2FA), so it’s really not a big deal.

Very odd - I installed zramswap and couldn’t get it to work. Device busy.

So I went to check swapon -s and my swap is already set to /dev/zram0. What the heck? Am I already good to go?

It is common that installing a system service includes automatically configuring and starting it.

There’s no swap configured by default in PureOS images on Librem 5 (aside of zram, but RAM cell usage is not a big concern :wink: ), so if it does indeed swap to eMMC you must have configured it yourself.

There’s the package pureos-settings_0.2_all.deb. At the time of writing it seems to only configure zram-swap (and pull in the packages needed).

zram is already configured in librem5-base, no need for pureos-settings. At some point those will likely get reconciled to not differ between the phone and laptops, but that’s probably something for crimson.

1 Like

Thank you.

I brainfarted reading the output of the commands. I am on default settings. I will keep it this way unless I have actual problems. Thank you!

After 1,5 month with the phone, I am almost ready to make the cut.