Transcoding is an important function within Plex and it is one that requires some TLC. Installing Plex Server is as easy it can be and so anyone can do it. However, like most things tech, a reliable Plex server is a server that is configured right. In this article, we will focus on Transcoder Temporary Directory, this is the location that Plex uses when transcoding media files as they are being watched by users. This process generates a lot of I/O and can quickly wear down a physical HDD or SSD. If we used RAM Disk for this specific purpose, we can extend the lifespan of physical drives and make use of the benefits that RAM has to offer.
Random Access Memory
RAM (Random Access Memory) as you know is a volatile memory. This means that the data stored within RAM exists as long as the system is powered on. A physical storage drive like an SSD on the other hand is known as non-volatile memory and it can retain data even after the system is powered down. Even though SSDs are faster than HDDs, they are slower compared to what RAM can do. Drives can potentially fail after 3-5 years of regular use, RAM manufacturers typically state that RAM modules will last the lifetime of a system.
What is a RAM Disk?
RAM disk is a drive that is made to appear like a physical drive within the Operating System by reserving a portion of RAM to store data. The rules of RAM still apply here, this memory will wiped clean when the system shuts down or restarts. It is not ideal for storing data in the long term but it is incredibly fast and so can come in handy for applications that require that capability.
How does this help Plex?
In the case of Plex, the transcoder temporary directory gets slammed with temp files during media playback and they are automatically purged when not in use. Since we know RAM is incredibly fast, this can help with improving Plex performance. A word of caution, Plex relies heavily on CPU and GPU (if you have it configured) for Transcoding, this will only help with the read/write of temp files as media is played. The overall goal of this setup is to save the life of an SSD/HDD.
Introducing SoftPerfect RAM Disk
This article is catered towards Plex server running on Windows (server or workstation), we will implement a simple set-and-forget solution using SoftPerfect RAM Disk version 3.4.8. There are other alternatives but the app has served me well for several years. The only thing you need to be able to spare is the amount of RAM you have. Plex on its own is not very RAM intensive so you can assign some of the unused RAM for transcoding. If for instance you are running Plex on a dedicated machine with 16GB of RAM or more, you can spare about 8GB of RAM for this setup.
On their website, Plex states that the Transcoder temporary directory should be roughly the size of the source file plus 100MB. You can determine the amount for your setup based on your estimated usage. For the purposes of this article we will assume a use case where Plex environment will have at most 3-4 streams at a time. An H.265 1080p media file with 2 to 3 hours of content will be about 1.5-2GB on disk, so based on that estimate, we can oversize and allocate 8GB to the RAM Disk. You can adjust accordingly, if your server is expected to have higher usage. Remember to leave at least 6GB of RAM for Windows and Plex.
Installing SoftPerfect RAM Disk
Step 1: Download SoftPerfect RAM Disk version 3.4.8 (newer versions are no longer free for use). Here’s the link to Major Geeks for this specific version.
Step 2: Download the app from Major Geeks.
Step 3: Install the application on the server that runs Plex. The install is pretty straight forward.
Step 4: At the end of the install, a prompt to install a driver called KEG Storage Controllers. Click on Install
Step 5: Once installed, open the SoftPerfect RAM Disk app
Step 6: Click on the + button from the menu bar
Step 7: Within the Add/Edit Disk window, enter the following information
Size (MB) –-> 8192 (if you have 8GB of RAM available to spare or an amount that you can spare from RAM)
Mount Options –> Driver Letter –> Set a drive letter. In this example, I have set it as P for Plex. You may choose a drive letter you. Note this down for later.
File System –> NTFS. Set the File System to NTFS.
Step 8: Click OK and the process should complete
Step 9: Within the application, navigate through Tools –> Settings
Step 10: Ensure that all the options are selected
Step 11: Login to Plex as the administrator, navigate through Server Name –> Setting –> Transcoder
Step 12: Set the Transcoder Temporary directory to the drive letter that you created as per Step 7.
Step 13: Click Save Changes at the bottom of the page
That’s it, now you are using RAM Disk for your Plex Transcoder Temp Directory.