Speed up Plex Transcoding on Raspberry

Guides and tutorials for various stuff. Posted by DietPi users.
KamikazeePL
Posts: 22
Joined: Sat Nov 21, 2020 5:57 pm

Re: Speed up Plex Transcoding on Raspberry

Post by KamikazeePL »

Will this work with Jellyfin?
User avatar
MichaIng
Site Admin
Posts: 3214
Joined: Sat Nov 18, 2017 6:21 pm

Re: Speed up Plex Transcoding on Raspberry

Post by MichaIng »

Yes, it should work the same way, as long as you have sufficient physical RAM to hold all transcoding data. As fast as it swaps, the benefit is lost ;).

Not sure if the cache directory /mnt/dietpi_userdata/jellyfin/cache is used for transcoding as well? If so, that one can be set quite easily via /etc/default/jellyfin.
User avatar
WarHawk
Posts: 773
Joined: Thu Jul 20, 2017 8:55 am

Re: Speed up Plex Transcoding on Raspberry

Post by WarHawk »

I also believe setting transcode directory to /dev/dri points the transcode directory to a temp directory in RAM

I also recommend using ZRAM to help compress if/when needed

Cool that it does help...if you don't have alot of RAM it definitely bogs things down
User avatar
MichaIng
Site Admin
Posts: 3214
Joined: Sat Nov 18, 2017 6:21 pm

Re: Speed up Plex Transcoding on Raspberry

Post by MichaIng »

No, /dev/dri contains the DRM interfaces, and is not a place for volatile files. Either something below /tmp or /run or a dedicated tmpfs should be used. In case of /run, the size needs to be increased as it is only 512 MiB.

Indeed a zram swap space can help if it prevents the need to use a swap file. But it slows down RAM usage as well when used. So as long as the physical memory is sufficient, I'd skip zram. If it's getting close, I can show how to switch to a zram swap space with our tools.
KamikazeePL
Posts: 22
Joined: Sat Nov 21, 2020 5:57 pm

Re: Speed up Plex Transcoding on Raspberry

Post by KamikazeePL »

MichaIng wrote: Tue Aug 31, 2021 12:21 am Indeed a zram swap space can help if it prevents the need to use a swap file. But it slows down RAM usage as well when used. So as long as the physical memory is sufficient, I'd skip zram. If it's getting close, I can show how to switch to a zram swap space with our tools.
Show how to use zram.
User avatar
Joulinar
Posts: 5617
Joined: Sat Nov 16, 2019 12:49 am

Re: Speed up Plex Transcoding on Raspberry

Post by Joulinar »

to get it activated, you could run following

Code: Select all

/boot/dietpi/func/dietpi-set_swapfile 1 zram
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3214
Joined: Sat Nov 18, 2017 6:21 pm

Re: Speed up Plex Transcoding on Raspberry

Post by MichaIng »

The 1 btw means auto-sized here, in which case the zram space will be 50% of the physical memory in size. This means max 50% of the physical memory can be consumed for the swap space. Due to compression, practically it will only consume ~25% of the physical RAM (highly depending on the type of the swapped data), increasing your overall available memory space (compared to no swap space) to around 1.25x.
Post Reply