Plex Server Build Guide – Windows


Skill Level: Advanced

This is a guide to building a dedicated Plex server running on Windows, this is not a definitive guide. Rather a guide of recommendations that I have found useful.

Server Recommendations

Operating System: Windows Server 2016 supporting Hyper-V

CPU: Minimum 16 cores. You are going to want to find the right balance here between speed/cores/wattage, at a minimum, I would recommend no less than 16 cores.

Memory: 64GB (the more the better)

Network: Two network interfaces (1 VM, 1 Host), plus any additional interfaces needed for NAS connectivity if needed.

Storage:

  • OS: 120GB (Local RAID disk, hardware not software)
  • Plex Data: 256GB SSD (Local RAID disk, hardware not software)
  • VM Disk: 512GB (NAS redundant disk or Local RAID disk, hardware not software)
  • Media Disk: as much as you can afford (Local or NAS) with the room or a plan to grow. I tier personally tier my data so that the more recent media is on a fast disk, common media is on normal disk and old uncommon media is on the slow disk.

 

Network Recommendations

If you plan on sharing your plex media server with your friends you are going to want a very fast internet connection with priority on the upload speed, so if your ISP has an option to obtain a faster upload you will want to look at that.

The Router

In my experience, the router your ISP will provide you will be junk. Get a router that will handle the workload (bandwidth) you want to throw at it. I recommend the Linksys WRT1900AC wireless router with DD-WRT firmware loaded on it, you may consider applying QOS rules on such a router as it makes sense.

The build

Start by setting up your Plex host on the OS disk then set up two virtual switches one external and the other internal.

At this point you have a server, network and storage, the next step is to set up some base VMs.

  • APP001 (4 core, 8GB RAM, 120GB Dynamic OS Disk, Network on both vSwitch)
    Role: This will run applications at are beneficial to the Plex media server, I recommend Radarr, Sonarr, Ombi, Tautulli and Cardigann

    https://radarr.video/
    https://sonarr.tv/
    https://ombi.io/
    http://tautulli.com/
    https://github.com/cardigann/cardigann

  • PLEX001 (16 core, 32GB RAM, 120GB Dynamic OS Disk, 200GB Plex Data Disk, Network on both vSwitch)
    Role: This will run just the Plex Media Server application
  • TOR001 (2 core, 8GB RAM, 120GB Dynamic OS Disk, Network on both vSwitch)
    Role: This will run uTorrent.

For each VM assign a LAN IP to the interface on the external virtual switch
For each VM assign a Private IP to the interface on the internal virtual switch
Configure the host file on each VM so that they communicate with each other over the internal virtual switch.

Installing Plex Media Server

  • If you don’t already have one purchase a Plex subscription
  • Download Plex Media Server, https://www.plex.tv/downloads/
    Note: I always recommend installing the latest version of Plex Media Server, unless the at version is like x.x.0.x
  • Install the Plex Media Server with an installation path that points to your Plex Data Disk.
  • Purchase, download and install SoftPerfect RAM Disk, https://www.softperfect.com/products/ramdisk/
    We are going to use a RAM disk for the transcoder temporary directory so that we don’t destroy the SSD’s with writes.
  • Allocate a 20GB RAM disk with no hard drive emulation and do not save contents to an image.

Configuring Plex Media Server

Here I will provide guidance no how to configure the server behaviour, not how to organize content etc..

  • Create the following Powershell script and schedule it to run every 5 minutes

    $affinity = [int]65520
    $PlexTranscoderProcesses = Get-Process -Name PlexTranscoder
    foreach($PlexTranscoder in $PlexTranscoderProcesses){
         ($PlexTranscoder).ProcessorAffinity = $affinity
    }

    Details: in the example script provided above on a 16 core system will limit transcoder sessions to CPU cores 5-16, thus leaving cores 1-4 always available for the Plex Media Server process itself.

    Reference: https://msdn.microsoft.com/en-us/library/system.diagnostics.process.processoraffinity(v=vs.110).aspx

  • Set BackgroundTranscodeLowPriority to 1
    Reference: https://support.plex.tv/articles/201105343-advanced-hidden-server-settings/
  • Plex Server / General
    • The path where local application data is stored = {This should be pointing to the Plex Data Disk}
  • Plex Server / Library
    • Run scanner tasks at a lower priority
  • Plex Server / Network
    • Secure connections = Required
    • Remote streams allowed per user = 2
  • Plex Server / Transcoder
    • Transcoder quality = Prefer higher speed encoding
    • Transcoder temporary directory = {RAM Disk}:\Sessions
    • Transcoder default throttle buffer = 60
    • Background transcoding x264 preset = Ultra fast
    • Maximum simultaneous video transcode = 12 (recommended for 16 core system)
  • Plex Server / DLNA
    • Enable the DLNA server (unchecked)
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s