Transcoder Default Throttle Buffer + Transcoder Temporary Directory - questions

Hey there,

I’m tweaking some of my server settings right now, and I have a couple questions…

System: I’m running Plex on a Proxmox LXC w/ a Ryzen 9 5900 (software transcoding), 128GB of RAM, etc. I have all the cores available to Plex.

Transcoder Temporary directory: I currently have 18GB of RAM allocated to the Plex container, and I’m using /tmp as my transcoder directory, which is a RAMdisk, as I understand it. I can see my RAM usage go up when transcoding, so I THINK I’ve set this up right. The Plex transcoding support page says that this folder should have storage space “roughly equal to the size of the source file of the transcode plus 100MB.” It’s working just fine for me with 18GB of RAM, but I do have plenty of 4K rips that are 40GB+ in size. Wouldn’t the transcode directory size be more related to how much buffering is done, rather than the source material size? I’d love some clarity here.

Transcoder default throttle buffer: So as I understand this, the only downside here is that it will create more / larger files when transcoding, in order to create buffer. If this is correct, then how come if I do a large buffer, like 20 minutes, and I skip ahead a few minutes in a transcoded video, it still takes a few moments to buffer. Isn’t the whole point of having a higher value here that it wouldn’t need to do so? If skipping ahead will cause it to re-buffer, then why not just set this to a very small value?

Very possible / likely that I have many concepts incorrect here… so… I appreciate the knowledge in advance. Thanks!

Best advice –

  • Don’t overthink this and use the defaults.
  • You have software transcoding. There WILL BE some latency. (a few seconds)

Default throttle buffer == How far ahead of the playback to transcode before pausing.

  • Playback starts – It will continue to transcode until reaching the time index
    ( You use 20 minutes as the example )

  • It will sit idle until you play through that buffer (20 minutes) --OR-- seek outside that 20 minute initial block. When this happens, it’ll transcode again until it’s 20 minutes ahead. This is going to make it “klunky / surge” in CPU usage which isn’t the best

If disk space is permitting, it will keep all the previously transcoded blocks until playback is complete. This allows you seek within the entire range from beginning to the furthest time index in the movie/show. If it runs out of disk space, it will prune blocks starting with time-index = 0

If / when you seek to a point outside that’s already been transcoded, it will pause playback and transcode at least enough to fill the player’s immediate buffers (usually about 60 seconds worth for 1080p / 20 seconds worth for good 4K) but understand each player is different so this number is not universal.

I find:

  1. Use the default buffer length
  2. It will sleep / go active frequently.
  3. Steady-stream playback will be seamless
  4. Jumping backward to an earlier point only delays as much as needed to fill the player’s local display buffer (gotta remember this when seeking)
  5. Seeking forward ‘past the end’ is a momentary pause while it jumps ahead
    and then backfills what you need then fill the player’s buffer again.

My use case:

  • I have BluRay rips which are 75 GB and 100 Mbps.
  • I use the defaults for everything.
  • I don’t use a Ramdisk or SSD for transcoding. HDD is more than fast enough
    (200 MB/sec == 1600 Mbps of video

Best Advice ?

  • Invest in a discrete GPU
    ( I have a Nvidia P2200 and an aging Xeon – More than enough performance for me )
    ( Seeking 30 minutes ahead in a 100 Mbps video takes ~2 seconds )

THANK YOU for the response! Some responses…

  • My server / NAS is full SSD so I don’t want the transcoding wear / tear on the SSD, which is why I moved to RAMdisk. I think Plex should update the documentation about how much available space should be in the transcoding directory, as that one piece doesn’t seem to line up with usage and what I’m seeing.

  • I get how the throttle buffer works now… That makes sense. If it’s 20 minutes, the CPU is going to work its butt off until there’s 20 minutes of transcoded video, and once there is, it’ll relax. Once you get through the buffer or skip, it’ll do it again.

  • You mention keeping the defaults, but assuming I have the space in RAM, why wouldn’t I just set the buffer to something like three hours? Wouldn’t that mean the CPU would work really hard for the shortest total duration of time, and then relax once the entire movie was transcoded? And if the full video got transcoded, seeking should in theory be instant, right?

  • GPU - I only watch a video with transcoding once or twice a week. The idle power consumption at steady state by my GPU would not be worth it right now to have better transcoding performance, since my CPU is already powerful enough to transcode 4K videos. I’m just a home user - I don’t have 100s of users, just basically me and a couple family members.

I have a 256 GB machine.
Because of other things I do, I declared a 192 MB ramdisk in /etc/fstab.

If you want to use the space and don’t mind the cpu spinning, go for it.

Do remember, Number_of_Playbacks * 20 minutes = SomeAmountOfRAM.

Watch you don’t overload it.

That’s the only monitoring/tuning you’ll need to do.

Don’t forget that even “Direct Stream” playbacks will use the transcoder temp folder. Now imagine 20 minutes of 4K HDR with Dolby Atmos in true HD going in there…
Chances are that your RAM will be stuffed way before the 20 minutes are reached. Particularly if you have more than one playback going on at the same time.
And if the transcoder temp folder is running out of free storage, it will be purged way ahead of what you’ll expect.

1 Like

For what it’s worth I’ve been using the same Samsung EVO 950 Pro for a little over 7 years, just for Transcoding without issue. Granted it is the only thing it does.

So… Here’s another piece of follow-up. Just to play with things for a day, I set the transcoder throttle buffer to 7200 seconds (2 hours). I went to play (via transcode) a 4K movie today, and it gave me the attached error, Not enough disk space to convert this item. How does it determine this? I went to go check my RAM usage, and it shows 219MB of 22G used. I’m using /tmp as the directory for transcoding, which I understood to be a RAM disk. Thoughts?

Don’t get me wrong… I totally get that 7200 seconds is not a good value to have for the buffer. I’m just playing with things to try and understand them better.


By default, /tmp is a ramdisk (tmpfs filesystem).
It is allocated a maximum of 1/2 of RAM.

What you show tells me – 23000 MB of RAM (did you allocate 24GB?)
With 24GB of RAM, default max allocation for /tmp will be 1/2 of this == 12GB

How big is that 4K movie? Is it more than 12GB file size?
(PMS does overallocate slightly. I think it’s 1.5x or possibly 2x the original file size when budgeting if there’s enough disk space.

Here’s how my ramdisk is defined on Ubuntu Server

# ramdisk
tmpfs /ramdisk tmpfs defaults,size=192G 0 0

I use /ramdisk on the host and in my containers as I need to as well as can use for PMS. I can tell PMS to use /ramdisk as the transcoder temp and not worry.

Another way, within the VM itself, is to:

  1. Give the VM a physical max desired memory
  2. Adjust tmpfs in /etc/fstab if needed
# 8GB new size shown as example
tmpfs /dev/shm tmpfs defaults,size=8G 0 0
  1. Remount it to ensure it works as expected
mount -o remount /dev/shm

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.