2024-06-11, 07:04 PM
(This post was last modified: 2024-06-11, 07:23 PM by pcm. Edited 6 times in total.)
(2023-10-17, 10:59 AM)ballen Wrote: Good morning guys,
I've seen mention (in various forum posts) of adding a RAM disk for transcoding to RAM but haven't been able to find a way to set this up?
I'm currently running Jellyfin in a Debian 12 virtual machine (on TrueNAS Scale) - Just my preferred way to run it on TrueNAS to avoid any potential upgrade issues with the TrueNAS Scale Apps in future (I experienced this in the past). I am using an NVidia Quadro P1000 (as I use an AMD CPU) which is passed through into the VM and working as expected.
So my question is: Does anyone know how I can setup a "RAM disk" (maybe link to a document explaining it?) or is it simply changing the Transcode path to /tmp or /dev/shm?
My server has a ton of RAM and so that shouldn't be an issue!
Thanks in advance!
I have 128 GB RAM on my ubuntu workstation so I set this up as it was a no brainer thing to do... (Not just for jellyfin but for other stuff)..
On ubuntu it's pre-baked and it enabling
tmp.mount
service turns mounts /tmp
as tmpfs
. I also updated my tmp.mount
script to create the necessary subdirectories when the service starts on boot. I am not entirely sure about debian. I don't think they have tmp.mount service. But, setting up RAMdisk and enabling it to auto-mount on boot is very straightforward. Just follow the steps here-
https://www.linuxbabe.com/command-line/c...disk-linux
Once you create your ramdisk, you just need to update your jellyfin config in your dashboard to point to the RAMdisk mount point.
In my case, I have my cache and transcode paths on my RAMdisk as separate directories.
/tmp/jellycode - for my transcodes
/tmp/jellycache - for my cache
You set your transcode path in "dashboard"->"playback"->"transcode path"
You set your cache path in "dashboard" -> "general" -> "cache path"
I guess one caveat worth mentioning is that
tmpfs
is not technically a pure ramdisk
or ramfs
... If the linux kernel senses too much memory pressure, then it will swap-out the contents inside tmpfs
onto disk. So, you gotta ensure you're not running any other memory-hog applications on the same machine hosting jellyfin.