Jellyfin Forum
Jellyfin CPU usage "jump" every 5 minutes - 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: Jellyfin CPU usage "jump" every 5 minutes (/t-jellyfin-cpu-usage-jump-every-5-minutes)

Pages: 1 2


Jellyfin CPU usage "jump" every 5 minutes - biohead - 2024-12-29

I'm running two independent instances of JF as LXCs in Proxmox. They're completely independent - separate LXC, separate libraries.
One of them seems to be running a task every 5 minutes that I'm struggling to trace. It results in a tiny CPU jump every 5 minutes - negligible really, but it's there on one and not the other. It's not always been present either, so I'm just trying to see what's happened in order t ofix it.

[Image: Ow9yZnQ.png]

In the grand scheme of things, it's not affecting anything - but the other instance doesn't do this so I'm trying to trace it to see if needs intervention.
I've checked the scheduled tasks and it doesn't seem to align with anything in there.

I enabled the full debug log and attached (had to zip as was 6mb for just 2 events). There's an awful lot in there relating to Microsoft ASPcore but not sure if that's the 

When I check in htop, it just points to "/usr/bin/jellyfin --webdir=/usr/share/jellyfin/web --ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg" with no extra info on the task. 
I've tried to use ps aux when it's running and logging to a file but I either seem to be missing it or it's not got the details.
Code:
USER        PID %CPU %MEM    VSZ  RSS TTY      STAT START  TIME COMMAND
root          1  0.0  0.5 102160 11776 ?        Ss  08:33  0:00 /sbin/init
root          54  0.0  2.1  77556 44288 ?        Ss  08:33  0:01 /lib/systemd/systemd-journald
systemd+      98  0.0  0.3  17896  8320 ?        Ss  08:33  0:00 /lib/systemd/systemd-networkd
root        105  0.0  0.1  3600  2176 ?        Ss  08:33  0:00 /usr/sbin/cron -f
message+    106  0.0  0.2  9136  4352 ?        Ss  08:33  0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
root        113  0.0  0.3  17020  7808 ?        Ss  08:33  0:00 /lib/systemd/systemd-logind
root        132  0.0  0.0  2516  1536 pts/0    Ss+  08:33  0:00 /sbin/agetty -o -p -- \u --noclear --keep-baud - 115200,38400,9600 linux
root        133  0.0  0.1  6124  3712 pts/1    Ss  08:33  0:00 /bin/login -p --
root        134  0.0  0.0  2516  1664 pts/2    Ss+  08:33  0:00 /sbin/agetty -o -p -- \u --noclear - linux
root        135  0.0  0.4  15432  8832 ?        Ss  08:33  0:00 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
jellyfin    137  0.0 16.6 274236076 348232 ?    Ssl  08:33  0:29 /usr/bin/jellyfin --webdir=/usr/share/jellyfin/web --ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg
root        288  0.0  0.1  42660  3864 ?        Ss  08:33  0:00 /usr/lib/postfix/sbin/master -w
postfix      289  0.0  0.2  43048  5760 ?        S    08:33  0:00 pickup -l -t unix -u -c
postfix      290  0.0  0.2  43092  5760 ?        S    08:33  0:00 qmgr -l -t unix -u
root        353  0.0  0.5  17992 10624 ?        Ss  08:34  0:00 sshd: root@pts/3
root        356  0.0  0.4  18756 10112 ?        Ss  08:34  0:00 /lib/systemd/systemd --user
root        357  0.0  0.2 103220  4584 ?        S    08:34  0:00 (sd-pam)
root        373  0.0  0.1  4976  3840 pts/3    Ss  08:34  0:00 -bash
root        454  0.0  0.1  4984  3968 pts/1    S    08:44  0:00 -bash
root        457  0.0  0.1  4744  3328 pts/1    S+  08:44  0:00 htop
root        465  0.0  0.1  8100  4096 pts/3    R+  08:45  0:00 ps aux

Has anyone got some guidance on next steps I can follow?


RE: Jellyfin CPU usage "jump" every 5 minutes - TheDreadPirate - 2024-12-29

Honestly, debug logs are not helpful for this kind of problem. Having the plain info/warning/error logs would help more.

Is anyone watching content during this period?


RE: Jellyfin CPU usage "jump" every 5 minutes - biohead - 2024-12-29

These are logs from today with the standard logging settings:
Code:
        "MinimumLevel": {
            "Default": "Information",
            "Override": {
                "Microsoft": "Warning",
                "System": "Warning"

Code:
[2024-12-29 09:01:26.781 +00:00] [INF] [12] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Update Plugins" Completed after 0 minute(s) and 0 seconds
[2024-12-29 09:01:28.305 +00:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: FFmpeg: "/usr/lib/jellyfin-ffmpeg/ffmpeg"
[2024-12-29 09:01:28.306 +00:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: ServerId: "95c4923831cb4e68b59eb3c783c8ced4"
[2024-12-29 09:01:28.306 +00:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Core startup complete
[2024-12-29 09:01:28.306 +00:00] [INF] [1] Main: Startup complete 0:00:10.1148262
[2024-12-29 09:02:15.265 +00:00] [INF] [8] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "10.11.10.121" request
[2024-12-29 09:03:22.984 +00:00] [INF] [26] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "10.11.10.129" request
[2024-12-29 09:06:15.392 +00:00] [INF] [23] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[2024-12-29 09:09:03.393 +00:00] [INF] [10] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[2024-12-29 09:11:51.393 +00:00] [INF] [28] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[2024-12-29 09:13:10.447 +00:00] [INF] [22] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "10.11.10.129" closed
[2024-12-29 19:00:51.393 +00:00] [INF] [23] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[2024-12-29 19:01:03.393 +00:00] [INF] [23] Emby.Server.Implementations.Session.SessionWebSocketListener: Lost 1 WebSockets.
[2024-12-29 19:10:44.289 +00:00] [INF] [30] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "10.11.10.129" request

Nothing at all showing since disabling the debug logging to right now.

This happens even when no-one is watching content. I do have an android TV box - although after seeing a few comments I've had it unplugged today and till the same behaviour is shown.


RE: Jellyfin CPU usage "jump" every 5 minutes - TheDreadPirate - 2024-12-29

What plugins do you have installed?


RE: Jellyfin CPU usage "jump" every 5 minutes - biohead - 2024-12-30

Nothing except out of the box and Reports:
AudioDB;
MusicBrainz;
OMDb;
Reports;
Studio Images;
TMDb;


RE: Jellyfin CPU usage "jump" every 5 minutes - TheDreadPirate - 2024-12-30

Can you try re-creating the container? AFAIK, none of those plugins does anything on a regular schedule. Nor does Jellyfin itself.

Actually. A thought occurred. Do you have any "TV" clients? Either Roku or Android TV?


RE: Jellyfin CPU usage "jump" every 5 minutes - biohead - 2024-12-30

Yes, I do have an Android TV box - a fairly recent addition.

Yesterday I had it unplugged to see if that was the cause (seeing some mentioned of the AndroidTV client) and I was seeing the spikes still.
I can try again, fully rebooting the container too once it's offline just to be sure.


RE: Jellyfin CPU usage "jump" every 5 minutes - waddoo - 2025-01-03

I am seeing the same CPU spikes in Jellyfin occurring every 5 minutes. Though interestingly I also see my nginxproxymanager Docker IO network also spiking at the same time at 5 minute intervals, but not showing the same CPU utilization as JellyFin. I did verify, no one was signed in and using Jellyfin for quite some time.

Imgur gallery of my Jellyfin activity and some visual aids. https://imgur.com/a/Vrt7Dp5


RE: Jellyfin CPU usage "jump" every 5 minutes - bitmap - 2025-01-03

I wonder if this could have to do with trickplay and media segments. In the debug log, which holy crap that's a lotta log, at the 9:00 mark, which is 5 minutes from container start, you begin to see DB queries related to trickplay and media segments. Those continue for some time (pages and pages using pg dn) but it's hard to parse the debug log...


RE: Jellyfin CPU usage "jump" every 5 minutes - biohead - 2025-01-05

OK, so this morning the CPU usage has dropped back in line to almost 0 when not in use - the "spikes" have stopped.

Last night I did a few things to try dig into this - basics such as tidied up some media, including a known bad file, and update some LXCs and apps (the Arr's and Jellyseer). Jellyseer was the final update I did for the night and it broke the container - BUT the spikes have stopped...