Phosh Update -- Good & Bad

I think pureos on L5 uses ZRAM not swap? these terms aren’t interchangeable i think.

I have 4GB of swap, but some of it is from /dev/zram0 size 1518588, and some of it is from /swapfile 2097148 (which I probably added to expand my swap in the past). I could never quite figure out how to increase zram itself, since default config for zram is 3GB RAM gives you 1.5GB ZRAM or half roughly.

1 Like

I wouldn’t suggest expanding your zram. I just increased the size of the swap file. If I find the guide I used I will post it here. But basically just look at how to increase the size of a swap file. It is the same on the Librem 5.

Ok, I didn’t realize zram != swapfile, I thought it was some special type of swapfile. I have no swapfile but that is easy enough to add.
Thanks both.

i dont think they are the same

Just curious to know: is it possible to substitute ram module in L5 to have more of it?

pretty sure the ram and CPU are part of the main circuit board so wont be possible, the usb connection to the sdcard is usb2.0, in the future if say the Librem 6 would add a usbc bus instead, for the sdcard and peripherals you could use it as swap, still might be slower than the built in ram or memory though, the 32GB memory is also on the main circuit board, and can be used as RAM swap, though a little slower.

I like Apples approach the best where it uses unified memory i believe for everything, swap, ram, memory and storage, and graphics, though not expandable

2 Likes

zram is a compressed ram disk that’s commonly used as swap device.

So, instead of moving to disk, data is effectively compressed and then written back to RAM.
Assuming a 2:1 ratio, 1GB zram is like having 4gb ram in the L5.
Obviously, you can’t have 3GB zram, as there needs to be uncompressed RAM for data in use.
The question is, at which size does it become counterproductive.
Swapping should not happen every second and ideally not every minute.

Compression/decompression takes time obviously. Ideally less than reading/writing to/from storage.
Coming from an era where swap had a ~10ms read delay and 2 digit MB transfer speeds, and then SSDs came along and felt “instant”, it’s amazing to me that compression can still be faster than flash memory access.
There are of course many factors:
CPU speed
Compression algorithm and level
Flash memory speed vs RAM speed

It should also been noted that compression uses a lot of CPU (read: energy). Although I don’t think it has a really noticeable effect in normal use.
But increasing zram beyond a reasonable limit will not only make the system slower but also drain battery. OTOH, more physical RAM also needs more energy, but always, not just during swapping.

Could be interesting to play with the zram settings (algorithm, level) for speed and compression ratio :thinking:

4 Likes

After 10 more days I can say for sure that it solved my issue completely. Just wanna say thanks again.

1 Like

the weird thing is that the pause on executing sudo commands is not consistent. It only happens sometimes. Usually it would only happen if I was docked.

When I get home I’ll try adding my hostname to the host file.