Jellyfin Forum
High memory usage - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: High memory usage (/t-high-memory-usage)



High memory usage - Jay George - 2023-09-05

Hi All,

Hope someone can help, I noticed that my RPi is running hot at the moment, 80% memory in use, i have a Pi4, 8gb.

I am running Jellyfin in docker, version 10.8.10, Arm 64.

Currently it is using:
14.2%mem
4.69gig virt

stats taken from Glances.

There are no scans taking place, it is only used in iternaly, but there are no streams being played.

Should the memory usage sit that high when idle?  Latest log is too large to attach, but if i can be pointed in what is needed from the log I could dig out that section.
Thanks,
Jay
Operating System: Linux
Architecture: Arm64


RE: High memory usage - skribe - 2023-09-05

Memory usage of several gigs is very normal, and Linux's memory management is very different than Windows' as well. In general, there is little to no need to monitor memory usage. Unused memory is wasted memory, and modern operating systems are highly efficient at memory management. If there is a practical need to reclaim memory, the OS will do so.

There is not, in any case, a known memory leak or similar bug in the jellyfin code, and there hasn't been a recent release to introduce one either. I'm sure you're fine.


RE: High memory usage - nooobieee - 2023-09-05

(2023-09-05, 02:01 PM)skribe Wrote: Memory usage of several gigs is very normal, and Linux's memory management is very different than Windows' as well. In general, there is little to no need to monitor memory usage. Unused memory is wasted memory, and modern operating systems are highly efficient at memory management. If there is a practical need to reclaim memory, the OS will do so.

There is not, in any case, a known memory leak or similar bug in the jellyfin code, and there hasn't been a recent release to introduce one either. I'm sure you're fine.

The memory usage doesn't need to be a leak or bug to be excessive. Using several gigs of memory may be "normal" for Jellyfin, but it is not "normal".

"unused memory" is not wasted memory, it's memory the OS uses for file caching which is essential for applications like media software. A general rule of thumb is that applications (in total) shouldn't take more than 50% of available memory.

I think Jellyfin uses way more memory than it needs and can no doubt do better memory management.


RE: High memory usage - bitmap - 2023-09-05

Does the rPi ever not run hot...? I've owned quite a few and started always buying them with little heatsinks and fans which did a smidgen to help, but running any apps on those little machines is bound to turn them into a tiny space heater.


RE: High memory usage - Jay George - 2023-09-05

Thanks all, nothing to worry about so im happy with that.

@bitmap, it does have a heat sink on it, and it runs around 20 docker containers, but doesnt overheat at all. I live in the UK tho so nothing overheats.


RE: High memory usage - skribe - 2023-09-05

(2023-09-05, 02:30 PM)nooobieee Wrote:
(2023-09-05, 02:01 PM)skribe Wrote: Memory usage of several gigs is very normal, and Linux's memory management is very different than Windows' as well. In general, there is little to no need to monitor memory usage. Unused memory is wasted memory, and modern operating systems are highly efficient at memory management. If there is a practical need to reclaim memory, the OS will do so.

There is not, in any case, a known memory leak or similar bug in the jellyfin code, and there hasn't been a recent release to introduce one either. I'm sure you're fine.

The memory usage doesn't need to be a leak or bug to be excessive. Using several gigs of memory may be "normal" for Jellyfin, but it is not "normal".

"unused memory" is not wasted memory, it's memory the OS uses for file caching which is essential for applications like media software. A general rule of thumb is that applications (in total) shouldn't take more than 50% of available memory.

I think Jellyfin uses way more memory than it needs and can no doubt do better memory management.


Jellyfin is a .net application, and .net isn't particularly conservative with RAM, but it's not in any way a lack of optimization or a problem in need of solving. Jellyfin is not using anything remotely close to 50% of available memory on any system with a reasonable amount of memory to run jellyfin. 14% is well within the range of "normal" RAM usage for a database heavy application.

You do not need to monitor RAM usage on modern operating systems. There is no problem here.


RE: High memory usage - bitmap - 2023-09-05

(2023-09-05, 02:45 PM)Jay George Wrote: Thanks all, nothing to worry about so im happy with that.

@bitmap, it does have a heat sink on it, and it runs around 20 docker containers, but doesnt overheat at all.  I live in the UK tho so nothing overheats.

Oh yeah, I didn't mean overheat. It's just normal for the Pi to be hotter than I'd really like a credit-card sized object to be...I've seen people keep them operating out in the open without a case and I guarantee that's a nice burn imprint waiting to happen.


RE: High memory usage - nooobieee - 2023-11-07

(2023-09-05, 02:49 PM)skribe Wrote: You do not need to monitor RAM usage on modern operating systems. There is no problem here.

https://github.com/jellyfin/jellyfin/issues/6306

Good job to everyone who kept monitoring their memory and reporting this issue since 2021 and the devs who addressed the issue as soon as the root cause was identified. I've installed the patched version and the fix is apparent immediately.