2023-06-21, 08:09 PM
Looking through the entries, Jellyin itself is using 17% of the memory, which if it's 16G is 2.7GB so pretty close to what systemctl said. FFMpeg is also using another 1.1%, and since it's a child process of Jellyfin, it would be counted, so we're basically at the ~3GB that systemctl reported:
However, nothing else in the output seems to be using any more RAM than this.
Looking back at your graph, all it says is "Memory Usage". What monitoring tool is this? It's very likely that what you're seeing is not Jellyfin - or anything - actually using all the RAM, but Linux's page cache being put to use. https://www.linuxatemyram.com/ This is super common to see in more Linux-naive monitoring tools that treat anything using memory as "used" even though that memory is actually free to applications.
You can check this yourself with
Graphing/monitoring Linux memory usage should be differentiating between these values so that one could see the actual application memory usage versus page cache usage, but your graph doesn't seem to be, so I suspect you're not seeing the whole picture there and thus thinking that Jellyfin is "using all the RAM" when in reality it's only using ~19% of it.
Really, things only become a problem when you actually start seeing swap space being used. If swap isn't being used, even sitting at "100%" memory usage is fine as it's all page cache. Once things start swapping, or you start getting Out Of Memory errors in your syslogs (or
Hopefully that helps!
Code:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
[///]
jellyfin 2204 3.2 17.7 7034120 2850508 ? Ssl Jun20 51:08 /usr/bin/jellyfin --webdir=/usr/share/jellyfin/web --restartpath=/usr/lib/jellyfin/restart.sh --ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg
jellyfin 15988 2.9 1.1 9498676 191252 ? Sl 19:16 0:23 /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 50000000 -init_hw_device cuda=cu:0 -filter_hw_device cu -hwaccel cuda -hwaccel_output_format cuda -threads 1 -a
However, nothing else in the output seems to be using any more RAM than this.
Looking back at your graph, all it says is "Memory Usage". What monitoring tool is this? It's very likely that what you're seeing is not Jellyfin - or anything - actually using all the RAM, but Linux's page cache being put to use. https://www.linuxatemyram.com/ This is super common to see in more Linux-naive monitoring tools that treat anything using memory as "used" even though that memory is actually free to applications.
You can check this yourself with
free -m
to see buff/cache
, available
and free
; free
will, after some time, start to get very low, but buff/cache
increases along with available
. buff/cache
is memory used by the page cache i.e. caching files on the filesystem in memory for faster access, while available
is the memory in the cache that is actually available for appliations to use.Graphing/monitoring Linux memory usage should be differentiating between these values so that one could see the actual application memory usage versus page cache usage, but your graph doesn't seem to be, so I suspect you're not seeing the whole picture there and thus thinking that Jellyfin is "using all the RAM" when in reality it's only using ~19% of it.
Really, things only become a problem when you actually start seeing swap space being used. If swap isn't being used, even sitting at "100%" memory usage is fine as it's all page cache. Once things start swapping, or you start getting Out Of Memory errors in your syslogs (or
dmesg
), then you are truly out of memory.Hopefully that helps!