zRam kernel module - compress memory 1gb devices


#1

Dear all,

I was reading about the zRam kernel module which is available from >3.14 kernels. I was wondering if this could be enabled. I know it would eat more CPU but maybe the overall impact for devices with 1gb of ram would be advantageous. >1gb ram users don’t have problems at all I guess.

I recently found my KI Plus s905 freezing after longer usage. I tracked it down and found that this happens when my box only has about 100mb free ram left.

Therefore, I was thinking it might be worth a try if it would not be too much work for the devs to turn it on/implement it.

What do you think? Could we give it a try?


#2

You can also use a lot of memory on 3G too by some processes.
I can’t answer on you question if this takes some improvements on such devices, but…
You can try to increase minimal free memory level
I use 10% for my 3Gb device(it solves my issue with free memory) in autostart.sh:
echo 288768 > /proc/sys/vm/min_free_kbytes
You can try to test the same or little bit smaller 20% of your device memory value.
More details about min_free_kbytes


#3

@boot2k3 thanks for your answer. The standard value for me was set to 16384kb. Isn’t this a rather small value considering that kodi becomes freezy once the free memory goes below 100mb?

What do the other devs think? I run the following now in autorstart:

echo 83340 > /proc/sys/vm/min_free_kbytes

That are about 10% of my available memory. Let’s see if it is enough to lessen freezes.

Any ideas about it or zRam are more than welcome.

Update: I found that kszaq implmented it already once. https://forum.libreelec.tv/thread/524-s905-builds-general-discussion/?postID=6512


#4

Unfortunately, the change didn’t help at all. What I see is that the available memory is shrinking constantly during video playback until it freezes. This is the memory just when the box died.

In the beginning kodi is eating about 20% of the memory, when it dies it is 50% Is there some setting that prevents the memory to go that low? Is this a memory leak?

image