v19 LibreELEC Testbuilds for x86_64 (Kodi 19.0)
smp1 Wrote:I just started using Generic builds a few days ago and I noticed an issue that appear to be a memory fragmentation that never happened with RPi builds.
The memory usage of kodi.bin increase over time and it will eventually restart due to an OOM killer.
I did a quick search and found this thread where it is suggested that MALLOC_MMAP_THRESHOLD_=131072 should fix the memory fragmentation issue for x86_64 (I'm currently testing with this setting, no issues so far). Also, this Kodi commit that set MALLOC_MMAP_THRESHOLD to 131072 was added back then.

The memory leak fix that was included in yesterday's build solved the long-standing issue with the fast growing RAM usage of kodi.bin process.
However, I still think that there is a room for improvement. IMO the current default settings don't work quite well for systems that play video 24/7 and Kodi need to be restarted every now and then.

I think I found a couple of solutions to this problem.
Solution #1: MALLOC_ARENA_MAX=1 (or =2) in kodi.conf. This setting does not allow kodi.bin process to use (and never free) ungodly amounts of RAM over time.
Solution #2: Jemalloc. I built an image with Jemalloc 5.2.0 using this as a reference. The result is similar to decreasing MALLOC_ARENA_MAX.
Reply


Messages In This Thread
RE: LibreELEC Testbuilds for x86_64 (Kodi 19.0) - by smp1 - 2019-06-17, 20:40
Logout Mark Read Team Forum Stats Members Help
LibreELEC Testbuilds for x86_64 (Kodi 19.0)3