• 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 External ffmpeg process causing disk thrashing

     
    • 0 Vote(s) - 0 Average

    External ffmpeg process causing disk thrashing

    podonnell
    Offline

    Member

    Posts: 103
    Threads: 24
    Joined: 2023 Jul
    Reputation: 0
    Country:United States
    #1
    2024-07-18, 02:54 PM
    Hi,

    I am using an external program that syncs up subtitles with the audio on the corresponding video file. This involves loading the audio stream into an ffmpeg process and analyzing for the length of the file. The process takes about 6 minutes when there's no disk activity, but if I'm watching a video on Jellyfin, it causes major disk thrashing, and the video playing freezes every few seconds.

    I have tested playing the video file outside of Jellyfin -- with MPC-HC in this case -- and there is no freezing.

    Any ideas why this might be problematic with Jellyfin but not externally?

    The videos playing are in 4k, so a bit of disk bandwidth is needed. However they are direct plays and no transcode is happening, so the server should be otherwise idle.
    Only the disk reaches 100% in task manager, all other resources look good.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-07-18, 03:19 PM
    Is the media on a local hard drive or network share?
    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]
    podonnell
    Offline

    Member

    Posts: 103
    Threads: 24
    Joined: 2023 Jul
    Reputation: 0
    Country:United States
    #3
    2024-07-18, 03:45 PM
    (2024-07-18, 03:19 PM)TheDreadPirate Wrote: Is the media on a local hard drive or network share?

    Local HD, I think? JellyFin is running on the same server that the files are contained on
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #4
    2024-07-18, 04:08 PM
    I don't recall you mentioning what your server OS and specs are in your other threads. What are the server specs?

    If the server is Windows, what does task manager say for the disk usage?

    If the server is Linux, use "iotop" to monitor disk usage. You will have to install that package since it isn't included in any Linux distro I've used.
    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]
    podonnell
    Offline

    Member

    Posts: 103
    Threads: 24
    Joined: 2023 Jul
    Reputation: 0
    Country:United States
    #5
    2024-07-18, 04:30 PM
    (2024-07-18, 04:08 PM)TheDreadPirate Wrote: I don't recall you mentioning what your server OS and specs are in your other threads.  What are the server specs?

    If the server is Windows, what does task manager say for the disk usage?

    If the server is Linux, use "iotop" to monitor disk usage.  You will have to install that package since it isn't included in any Linux distro I've used.

    My server is pretty weak - Windows i7 4790k CPU using VAAPI and an old NVIDIA card that doesn't support NVENC, a 570 I think.
    However the disk is a high speed disk used in servers and getting around 350 Mbps read/write in bandwidth tests.

    In task manager, typically the disk is 20% or less when running a JellyFin video. But when this subtitle sync process runs, it goes to 100%.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #6
    2024-07-18, 05:26 PM (This post was last modified: 2024-07-18, 05:36 PM by TheDreadPirate. Edited 1 time in total.)
    That server should be plenty fast in all regards. If it were on Linux.

    For a short period of time I was running Plex, and later Jellyfin, on Windows with a low power Intel J4205 as my CPU. Whenever I played videos, even direct plays, Windows Defender hogged the CPU. Like 60% just for Windows Defender scanning what Jellyfin was doing. Because of this high CPU usage, and a slow-ish CPU, transcodes were out of the question. Doing ANYTHING else on the server caused Jellyfin to buffer.

    I'm wondering if what you're experiencing is the same thing. Since watching via MPC-HC doesn't trigger the same Windows Defender behavior.

    When you stream with Jellyfin, can you open Task Manager and monitor if the CPU usage spikes for Windows Defender?
    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]
    theguymadmax
    Offline

    Community Moderator

    Posts: 1,009
    Threads: 0
    Joined: 2024 Jun
    Reputation: 58
    #7
    2024-07-18, 05:28 PM
    This sounds like normal behavior for windows Smiling-face
    podonnell
    Offline

    Member

    Posts: 103
    Threads: 24
    Joined: 2023 Jul
    Reputation: 0
    Country:United States
    #8
    2024-07-24, 08:44 PM
    (2024-07-18, 05:26 PM)TheDreadPirate Wrote: That server should be plenty fast in all regards.  If it were on Linux.

    For a short period of time I was running Plex, and later Jellyfin, on Windows with a low power Intel J4205 as my CPU.  Whenever I played videos, even direct plays, Windows Defender hogged the CPU.  Like 60% just for Windows Defender scanning what Jellyfin was doing.  Because of this high CPU usage, and a slow-ish CPU, transcodes were out of the question.  Doing ANYTHING else on the server caused Jellyfin to buffer.

    I'm wondering if what you're experiencing is the same thing.  Since watching via MPC-HC doesn't trigger the same Windows Defender behavior.

    When you stream with Jellyfin, can you open Task Manager and monitor if the CPU usage spikes for Windows Defender?

    Yep, watched the CPU and all other resources. Nothing goes above 10%. Oddly the transcoded videos that do make my CPU go up actually don't have the issue, but the direct plays that are only pulling direct from disk have the problem. 

    This is definitely disk thrashing. The ffmpeg and jellyfin video stream are fighting over the read bandwidth of the hard drive.
    « 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