• 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 Off Topic General Discussion Best practices for ram disks

     
    • 0 Vote(s) - 0 Average

    Best practices for ram disks

    /dev/shm or manual tmpfs?
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #1
    2023-06-26, 10:08 PM
    What is everyone's opinion for ram disk best practices?  This can be specific to Jellyfin or in general.

    I saw in gaming09's signature that he used a ram disk for transcoding files.  I decided to do that as well for performance reasons and to reduce the amount of writes to my SSD.  Even though my aging Intel x25-M G2 still has 97% of its write endurance left.

    Is there any reason to use /dev/shm over setting up a tmpfs in an arbitrary directory?  I opted for the latter.
    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]
    TheTrueLinuxDev
    Offline

    Junior Member

    Posts: 2
    Threads: 0
    Joined: 2023 Jun
    Reputation: 0
    Country:United States
    #2
    2023-06-27, 08:10 PM (This post was last modified: 2023-06-27, 08:13 PM by TheTrueLinuxDev. Edited 2 times in total.)
    Well if you run the following command: df /dev/shm
    you may receive an output as thus:


    Filesystem    1K-blocks  Used Available Use% Mounted on
    tmpfs          65882212 78864  65803348  1% /dev/shm


    /dev/shm is always configured to be tmpfs whereas /tmp varies on different linux distro and /var/tmp should not be tmpfs since the temporary files in /var/tmp should persist between reboots.
    iconoclasthero
    Offline

    Junior Member

    Posts: 2
    Threads: 0
    Joined: 2023 Dec
    Reputation: 0
    #3
    2023-12-03, 05:10 PM (This post was last modified: 2023-12-03, 05:12 PM by iconoclasthero. Edited 2 times in total.)
    So I just started using Jellyfin (and I haven't gotten transcoding to work yet), but I was looking back into the OP's question and found it via a google search for ca. "best practices for ramdisk ubuntu."  I've been using /dev/shm/cache for quite a number of years now with no problem.  What I don't know is if there are any drawbacks to using that and if it is really using ram or if tmpfs is also putting stuff on disk.  I have ca. 24 GB ram and am always using /dev/shm/cache for all kinds of file manipulation/work so that I don't write stuff to media until I'm done...or if I just want to put stuff in a volitile space that won't be there when I reboot.

    Are there any known disadvantages to using /dev/shm/ for ram drive I should know about?


    Code:
    $ pwd; df .
    /dev/shm/cache
    Filesystem      Size  Used Avail Use% Mounted on
    tmpfs            12G  3.6G  8.3G  30% /dev/shm
    iconoclasthero
    Offline

    Junior Member

    Posts: 2
    Threads: 0
    Joined: 2023 Dec
    Reputation: 0
    #4
    2023-12-03, 05:15 PM
    ramfs vs. tmpfs: https://unix.stackexchange.com/questions...k-on-linux
    « 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