• 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 Technical limits with Jellyfin ?

    Pages (2): « Previous 1 2

     
    • 0 Vote(s) - 0 Average

    Technical limits with Jellyfin ?

    ZmgwsYzhM2nV
    Offline

    Junior Member

    Posts: 15
    Threads: 1
    Joined: 2023 Jun
    Reputation: 0
    #11
    2023-10-06, 10:50 PM
    As I'm thinking of transferring my Jellyfin install to a TrueNAS Scale server (using the built-in TrueCharts app), are you recommending against that? Even if I store config files etc. on a SSD within that system, that still would be ZFS...


    (2023-10-06, 03:57 PM)TheDreadPirate Wrote: Having your database on a ZFS file system is possible, it is very much not recommended.  Database READ performance is fine, but when you are writing to a database that is on a ZFS file system there are serious performance penalties.

    And because your database is big, that adds to the performance penalty.

    If possible, move your database to an EXT4 file system.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #12
    2023-10-06, 11:26 PM
    (2023-10-06, 10:50 PM)ZmgwsYzhM2nV Wrote: As I'm thinking of transferring my Jellyfin install to a TrueNAS Scale server (using the built-in TrueCharts app), are you recommending against that? Even if I store config files etc. on a SSD within that system, that still would be ZFS...


    (2023-10-06, 03:57 PM)TheDreadPirate Wrote: Having your database on a ZFS file system is possible, it is very much not recommended.  Database READ performance is fine, but when you are writing to a database that is on a ZFS file system there are serious performance penalties.

    And because your database is big, that adds to the performance penalty.

    If possible, move your database to an EXT4 file system.

    If the ZFS filesystem is a single SSD, and the file system block size is 4KB or 8KB, it would be acceptable.  The problems start to happen when a database is on a multi-disk ZFS array.  The block size is usually something larger like 128KB or more.

    ZFS is a copy-on-write file system.  Meaning that instead of just modifying the block in place, it makes a copy of the entire block being modified.  So no matter how small of a change you are making you are, at minimum, writing a single block.  So if your are making A LOT of write transactions to the jellyfin database, which would happen during a library scan, there is a lot of unnecessary writing happening.  And this seriously reduces database performance.  Probably not noticeable for a small library with the database on a SSD.

    But if the database is on a hard drive based ZFS array with, probably, larger block sizes, combined with a large library and, thus, large database, you are going to run into serious performance issues.  You are going to experience something called "write amplification".  If you want to write 50MB to your database, the file system forces you do write 1GB (numbers pulled out of my butt).

    It sounds like the OP used a symlink to move the jellyfin data directory on their ZFS array storing their library instead of the root file system.  Which is usually EXT4 in Linux.
    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]
    ZmgwsYzhM2nV
    Offline

    Junior Member

    Posts: 15
    Threads: 1
    Joined: 2023 Jun
    Reputation: 0
    #13
    2023-10-07, 12:39 AM
    Right. It's kind of a bummer, because the whole appeal of something like TrueNAS is data integrity and security. Then again, in my case it probably would be OK, because there's only in the hundreds of movies, I maybe add one every other couple of days, I'm the only user etc. Anyway, sorry for derailing the thread a little.
    vincen
    Offline

    Junior Member

    Posts: 14
    Threads: 4
    Joined: 2023 Jun
    Reputation: 0
    #14
    2023-10-07, 09:47 AM (This post was last modified: 2023-10-07, 09:53 AM by vincen. Edited 1 time in total.)
    (2023-10-06, 03:57 PM)TheDreadPirate Wrote: Having your database on a ZFS file system is possible, it is very much not recommended.  Database READ performance is fine, but when you are writing to a database that is on a ZFS file system there are serious performance penalties.
    First time I hear such possible issues with ZFS. Do you have any technical references about it ? I use also Plex on that server that uses also flat files DB and storage of it on a ZFS volume has never been a problem Confused-face
    Unhappy right now I'm not able to move the DB on an ext4 storage all the more with all metadatas directories that go with it Slightly-frowning-face

    (2023-10-06, 11:26 PM)TheDreadPirate Wrote: If the ZFS filesystem is a single SSD, and the file system block size is 4KB or 8KB, it would be acceptable.  The problems start to happen when a database is on a multi-disk ZFS array.  The block size is usually something larger like 128KB or more.
    ZFS is a copy-on-write file system.  Meaning that instead of just modifying the block in place, it makes a copy of the entire block being modified.  So no matter how small of a change you are making you are, at minimum, writing a single block.  So if your are making A LOT of write transactions to the jellyfin database, which would happen during a library scan, there is a lot of unnecessary writing happening.  And this seriously reduces database performance.  Probably not noticeable for a small library with the database on a SSD.
    But if the database is on a hard drive based ZFS array with, probably, larger block sizes, combined with a large library and, thus, large database, you are going to run into serious performance issues.  You are going to experience something called "write amplification".  If you want to write 50MB to your database, the file system forces you do write 1GB (numbers pulled out of my butt).
    Thanks for clarification about "issue" with ZFS but I would have 2 additional questions:
    -> is It still a problem on a ZFS array that have high speed (mine read/writes at around 2.5g/s which should compensate the problem no ?
    -> the issue is only for write operations so nearly only when you scan libraries right ? out of it amount of data written in db is ridiculous no ?
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #15
    2023-10-07, 05:08 PM (This post was last modified: 2023-10-07, 05:09 PM by TheDreadPirate. Edited 1 time in total.)
    (2023-10-07, 09:47 AM)vincen Wrote: Thanks for clarification about "issue" with ZFS but I would have 2 additional questions:
    -> is It still a problem on a ZFS array that have high speed (mine read/writes at around 2.5g/s which should compensate the problem no ?
    -> the issue is only for write operations so nearly only when you scan libraries right ? out of it amount of data written in db is ridiculous no ?

    Throughput isn't the problem.  It is I/O performance.  As you add disks to a ZFS array, or any kind of RAID array, your SEQUENTIAL throughput increases but your random I/O performance does not increase nearly as much.  You are physically limited by how fast the read/write head in the hard drive can move around.  Random I/O performance is very important for database operations.  Read or write.

    In general, we recommend that the jellyfin databases reside on an SSD.  You issues are compounded by having a large database on a hard drive based ZFS array.  And since you have the entire /var/lib/jellyfin directory on the same array, your database is competing for resources with the jellyfin cache and your reading your media to send to users.
    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]
    Kevin Nord
    Offline

    Junior Member

    Posts: 27
    Threads: 7
    Joined: 2023 Jun
    Reputation: 0
    #16
    2023-11-14, 02:08 PM
    (2023-10-06, 03:57 PM)TheDreadPirate Wrote: Having your database on a ZFS file system is possible, it is very much not recommended.  Database READ performance is fine, but when you are writing to a database that is on a ZFS file system there are serious performance penalties.

    And because your database is big, that adds to the performance penalty.

    If possible, move your database to an EXT4 file system.

    Hi, it sounds like you have a fair bit of knowledge on this, and I'm curious. Why does a DB on  ZFS have such a different performance  than on EXT4?
    Additionally, how does BTRFS stack up?

    I've never really thought much about performance on different fs types, thank you for planting that seed in my head Smiling-face
    I don't want to change my sig with every new version. I'm running whatever the currently packaged version for Ubuntu Server 22.04 Smiling-face
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #17
    2023-11-14, 06:08 PM
    ZFS is a CoW (copy on write) file system. Meaning that when a file is modified it makes a copy of the whole file with the new modifications instead of modifying the existing file on the disk. This isn't a big deal for most things. But for a database where you are making a lot of small changes very frequently to the same file this can result in significant write amplification. Meaning that a small number of small write operations results in a large amount of bytes written. This can be problematic both from a performance perspective and from an SSD endurance perspective.

    BTRFS is also a CoW file system.

    Having said all of that. My understanding is that the use of journal files by SQLite, and other modern DBs, mitigates these issues. So having your DB on ZFS or BTRFS isn't as bad as it used to be. As long as it is an SSD. Especially if you intend to use the snapshot capabilities of ZFS and BTRFS.
    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]
    Pages (2): « Previous 1 2

    « Next Oldest | Next Newest »

    Users browsing this thread: 2 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