Linux Optimization
Linux Optimization
Section titled “Linux Optimization”Maximize Plex performance on Linux systems.
Hardware Transcoding
Section titled “Hardware Transcoding”Intel Quick Sync
Section titled “Intel Quick Sync”# Install driverssudo apt install intel-media-va-driver vainfo
# Verifyvainfo
# Permissionssudo usermod -aG video plexsudo usermod -aG render plexNVIDIA
Section titled “NVIDIA”# Install driverssudo apt install nvidia-driver-535
# Verifynvidia-smi
# Permissionssudo usermod -aG video plexDatabase Optimization
Section titled “Database Optimization”Move to SSD
Section titled “Move to SSD”# Symlink database to SSDsudo systemctl stop plexmediaserversudo mv /var/lib/plexmediaserver /ssd/plexmediaserversudo ln -s /ssd/plexmediaserver /var/lib/plexmediaserversudo systemctl start plexmediaserverOptimize Database
Section titled “Optimize Database”# Stop Plexsudo systemctl stop plexmediaserver
# Optimizesqlite3 "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db" "VACUUM;"
# Start Plexsudo systemctl start plexmediaserverFile Descriptor Limits
Section titled “File Descriptor Limits”Edit /etc/security/limits.conf:
plex soft nofile 65536plex hard nofile 65536Memory Management
Section titled “Memory Management”Transcoder RAM Disk
Section titled “Transcoder RAM Disk”# Create RAM disksudo mkdir -p /tmp/plex-transcodesudo mount -t tmpfs -o size=4G tmpfs /tmp/plex-transcodesudo chown plex:plex /tmp/plex-transcode
# Set in Plex Settings → TranscoderAdd to fstab
Section titled “Add to fstab”tmpfs /tmp/plex-transcode tmpfs size=4G,mode=0755,uid=plex,gid=plex 0 0Network Tuning
Section titled “Network Tuning”# Increase buffer sizessudo sysctl -w net.core.rmem_max=134217728sudo sysctl -w net.core.wmem_max=134217728Monitoring
Section titled “Monitoring”# Monitor Plexhtop -p $(pgrep -d, "Plex Media Server")
# Disk I/Oiotop -o
# Networkiftop