• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting CPU

    Pages (3): 1 2 3 Next »

     
    • 0 Vote(s) - 0 Average

    CPU

    Jellyfin CPU usage Issues
    thbkk
    Offline

    Junior Member

    Posts: 15
    Threads: 4
    Joined: 2024 Sep
    Reputation: 0
    #1
    2024-10-17, 05:48 AM
    I am running Jellyfin on my Raspberry Pi with all transcoding settings disabled, using it exclusively for direct play. The system has sufficient RAM and generally runs smoothly. However, when I access Jellyfin through
    http://192.168.1.69:8096/
    and navigate to the settings, the CPU usage spikes dramatically for 1-2 minutes. The same issue occurs when I open the Jellyfin app on an Android device, with multiple peaks of extremely high CPU usage. Unfortunately, this causes the system to become unresponsive, sometimes even resulting in a crash.
    Do you know why Jellyfin is unstable and why these CPU spikes occur even when no video is being streamed?
    Fate
    Offline

    Member

    Posts: 219
    Threads: 3
    Joined: 2023 Jun
    Reputation: 16
    #2
    2024-10-17, 08:45 AM (This post was last modified: 2024-10-17, 08:46 AM by Fate. Edited 1 time in total.)
    Try logging into the Pi and watch top (then C) for commandline view and check which jellyfin/ffmpeg process is using the CPU.

    Also try to get the error log when jellyfin crashed.
    alleycat
    Offline

    Member

    Posts: 69
    Threads: 19
    Joined: 2024 Sep
    Reputation: 0
    Country:United States
    #3
    2024-10-17, 12:36 PM (This post was last modified: 2024-10-17, 12:40 PM by alleycat. Edited 1 time in total.)
    You did see this in the documentation? I understand if you had a Pi laying around and wanted to try it... Just using it on a lan, you might get away with it.

    "Potentially Problematic Hardware

    These hardware platforms might lead to a poor Jellyfin experience. Please be careful to avoid them when shopping for hardware.

        Most SBCs (Single Board Computers): Most SBCs (Including Raspberry Pis and especially the Pi 5) are too slow to provide a good Jellyfin experience. If You really want to run Jellyfin on a SBC, please look at models based on the following platforms: Rockchip RK3588 / RK3588S, Intel Core, Intel 12th gen N series."
    Jellyfin 10.10.7 (bare metal)
    Ubuntu 24.04.2 LTS, OS 1TB NVMe
    Dell OptiPlex 7050 Intel i7-6700 32GB ram
    Intel Arc A310 ELF
    Storage: TrueNas Mini R Raidz2 45 TiB (Samba shares)
    Gateway: PFsense/HAproxy

    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #4
    2024-10-17, 02:08 PM
    Share the log via pastebin. And also describe your setup. What OS? Is there any virtualization (Docker)? If Docker, which image? Linuxserver or official? How is storage setup? Is the Jellyfin database on a local disk?
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    thbkk
    Offline

    Junior Member

    Posts: 15
    Threads: 4
    Joined: 2024 Sep
    Reputation: 0
    #5
    2024-10-17, 02:41 PM
    I understand that the Raspberry Pi 4 isn't the most powerful hardware for this purpose, but it should be able to handle the task. I'm using Jellyfin in a Docker container on a Raspberry Pi running Raspbian OS, with storage connected via a NAS. The database, I believe, is stored on the Raspberry Pi itself.

    The issue only occurs occasionally. For example, I recently tested playing a 4K movie. Initially, the CPU usage was at maximum, and the playback started lagging. After stopping the movie and starting it again, the playback was smooth, and the CPU usage was normal. This is strange, especially since transcoding is disabled.

    Perhaps I should consider using Jellyfin only with an external player like VLC. That way, I can be sure that no unnecessary transcoding is taking place.

    Please review my logs and CPU usage data.

    Code:
    [2024-10-17 16:14:07.851 +02:00] [INF] [3] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.1.197" request
    [2024-10-17 16:14:32.608 +02:00] [INF] [12] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Webhook Item Added Notifier" Completed after 0 minute(s) and 0 seconds
    [2024-10-17 16:15:02.608 +02:00] [INF] [3] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Webhook Item Added Notifier" Completed after 0 minute(s) and 0 seconds
    [2024-10-17 16:15:21.048 +02:00] [INF] [15] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "123". EnablePlaybackRemuxing: False EnableVideoPlaybackTranscoding: False EnableAudioPlaybackTranscoding: False
    [2024-10-17 16:15:43.170 +02:00] [INF] [23] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Webhook Item Added Notifier" Completed after 0 minute(s) and 0 seconds
    [2024-10-17 16:15:44.046 +02:00] [WRN] [10] Microsoft.AspNetCore.Server.Kestrel: As of "10/17/2024 14:15:43 +00:00", the heartbeat has been running for "00:00:16.3524602" which is longer than "00:00:01". This could be caused by thread pool starvation.
    [2024-10-17 16:16:54.202 +02:00] [INF] [19] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
    [2024-10-17 16:16:54.203 +02:00] [INF] [19] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Webhook Item Added Notifier" Completed after 0 minute(s) and 0 seconds
    [2024-10-17 16:16:54.319 +02:00] [INF] [19] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
    [2024-10-17 16:17:29.555 +02:00] [INF] [12] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Webhook Item Added Notifier" Completed after 0 minute(s) and 0 seconds
    [2024-10-17 16:17:29.706 +02:00] [WRN] [10] Microsoft.AspNetCore.Server.Kestrel: As of "10/17/2024 14:17:29 +00:00", the heartbeat has been running for "00:00:27.4382438" which is longer than "00:00:01". This could be caused by thread pool starvation.
    [2024-10-17 16:18:02.409 +02:00] [INF] [12] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Webhook Item Added Notifier" Completed after 0 minute(s) and 0 seconds
    [2024-10-17 16:18:02.534 +02:00] [WRN] [10] Microsoft.AspNetCore.Server.Kestrel: As of "10/17/2024 14:18:02 +00:00", the heartbeat has been running for "00:00:12.6974712" which is longer than "00:00:01". This could be caused by thread pool starvation.
    [2024-10-17 16:18:32.410 +02:00] [INF] [24] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Webhook Item Added Notifier" Completed after 0 minute(s) and 0 seconds
    [2024-10-17 16:19:44.597 +02:00] [INF] [11] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "Android TV" "0.17.6" playing "ABC". Stopped at "106777" ms


    Attached Files Thumbnail(s)
       
    Fate
    Offline

    Member

    Posts: 219
    Threads: 3
    Joined: 2023 Jun
    Reputation: 16
    #6
    2024-10-17, 03:13 PM (This post was last modified: 2024-10-17, 03:16 PM by Fate. Edited 2 times in total.)
    Well that is not really what we need, do you have a transcode log or a log from within jellyfin as well?

    Also even if you disable video transcoding this would allow for audio transcoding or burning in subtitles which are CPU tasks.
    Thinking about it even just repackaging the container to HLS will be a heavy task for a raspi4

    Also Docker within raspi is another performance penalty....
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #7
    2024-10-17, 03:25 PM
    There are multiple ffmpeg processes, which tells me this is either a library scan or trickplays generating.

    If you see this again, run this command and share the output.

    Code:
    sudo ps -aux | egrep "jellyfin|ffmpeg" | cat

    If these are ffmpeg processes related to either a library scan or trickplays, there are settings to cap the number of threads.

    Dashboard > General > Parallel library scan tasks limit/Parallel image encoding limit
    Dashboard > Playback > Trickplay > FFmpeg Threads
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    thbkk
    Offline

    Junior Member

    Posts: 15
    Threads: 4
    Joined: 2024 Sep
    Reputation: 0
    #8
    2024-10-17, 06:19 PM
    Currently, no problems. AS I said, sometimes no problem but then another CPU peaks. I keep you updated.

    Dashboard > General > Parallel library scan tasks limit/Parallel image encoding limit
    Dashboard > Playback > Trickplay > FFmpeg Threads

    I already set both to 1.

    root 2138 0.0 0.0 208 8 ? S 08:43 0:00 s6-supervise svc-jellyfin
    root 2633 4.8 31.5 274847668 1167300 ? Ssl 08:43 33:48 /usr/bin/jellyfin --ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg
    raspi 91968 0.0 0.0 6040 640 pts/1 S+ 20:17 0:00 grep -E --color=auto jellyfin|ffmpeg
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #9
    2024-10-17, 06:26 PM
    You'd have to share your full log the next time it happens. The log should container the full ffmpeg command, which would indicate what is spawning the process.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    thbkk
    Offline

    Junior Member

    Posts: 15
    Threads: 4
    Joined: 2024 Sep
    Reputation: 0
    #10
    2024-10-17, 08:26 PM
    Where can I download the whole log? I just see the logs in jellyfin under admin panel.
    Pages (3): 1 2 3 Next »

    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode