November 13, 20241 yr TLDR: I am looking for help to make my server perform as good as possible in Plex, then my Desktop VM, and lastly in docker or file shares. Any help would be greatly appreciated. I have the following hardware: 2x Xeon E5-2660 10 core hyper threaded CPUs at 2.6Ghz 64 GB of ECC Ram 2 x 4TB drives in the unraid array (Xfs) 2x 1.6TB PCIe NVMe drives as the Cache drive in btrfs pool (Raid 1 equivalent, I think) 8x 4TB ZFS2 Pool for 22.6TB (Main data pool) 2x 256GB SSDs for VM in ZFS1 Pool The issue I am having is two fold. I use apple TVs for my TVs and Plex seems to hang during transcoding using the plex app, but plays fine through infuse. Even when using infuse, sometimes the movies glitch for a second or two. All of my network in my house is hard wired at 1GBps ethernet. Server has 10GB Nics running to a 10GB switch that then serves all other devices. I have pinned 4 CPU and the hyperthread cores to Plex and still seem to have an occasional hang. Should I config Plex to use /mnt/cache/appdata/Plex-Media-Server/Transcode for transcoding. It's currently set for /mnt/user/appdata/Plex-Media-Server. Also, the VM is configured for 6 cores plus the hyperthreaded core, and 16GB of ram. That said, sometimes the VM is pretty sluggish. If anyone has recommendations on ways to improve performance, please let me know.
November 13, 20241 yr Community Expert Solution Review post: To improve your UnRaid server’s performance, especially for Plex, VM operations, and general usage, we can optimize your current configuration based on your hardware setup and some best practices. Here’s a tailored approach for prioritizing Plex, then your desktop VM, and finally Docker/file shares. Step 1: Optimize Plex Performance Since Plex is experiencing occasional glitches during transcoding, it could benefit from some tweaks to its transcode directory and CPU allocation: Transcoding Directory: Setting the Plex transcode directory to your faster cache drive could significantly reduce latency during transcoding. This helps because your PCIe NVMe cache pool will handle Plex’s temporary transcode files faster than your array or ZFS pool. /mnt/cache/appdata/Plex-Media-Server/Transcode CPU Allocation: While pinning 4 physical and 4 hyperthreaded cores to Plex can help, make sure the pinned cores are not overlapping with those assigned to your VM. Also, ensure that the chosen cores aren’t overloaded by other Docker containers. To help prioritize Plex, you might also try enabling CPU isolation for these cores (in Settings > CPU Pinning) so that only Plex can use them without interference from other tasks. Check Plex Settings: In Plex settings, ensure you have "Use hardware acceleration when available" enabled (if you have an integrated GPU or a compatible graphics card). If you’re using ZFS for the Plex media pool, consider its I/O implications. ZFS can be resource-intensive, so ensure that your ZFS pool settings and cache usage are optimized for fast reads. Step 2: Improve Desktop VM Responsiveness Given that your VM is sometimes sluggish, adjustments to CPU pinning, memory allocation, and disk configuration could help: Optimize CPU Pinning and Isolation: Assign 6 physical cores and their hyperthreaded pairs specifically to your VM, ensuring these do not overlap with Plex’s pinned cores. Try isolating these cores (also in Settings > CPU Pinning) so they’re dedicated to the VM, which can improve performance consistency. Optimize Disk Usage for VM: Since your VM is on a dedicated 2x256GB SSD ZFS pool, verify that ZFS settings (like compression or deduplication) are configured for best performance rather than data redundancy or compression. Excessive ZFS processing for a VM disk could affect latency and throughput. If ZFS performance is still an issue, consider moving the VM disk image to your faster NVMe cache pool and see if it improves responsiveness. RAM Allocation: With 64GB of RAM, 16GB should be ample, but check that the VM isn’t using swap or hitting memory limits. Adjust the VM's RAM allocation slightly upward (e.g., 20GB) if you notice memory-related bottlenecks in the UnRaid logs. Step 3: Docker and File Share Optimizations With Plex and the VM prioritized, we can optimize Docker and file shares for overall performance: Docker Containers on Cache: Having Docker containers (especially Plex) on your NVMe cache will improve their response times. Ensure appdata and Docker system share settings are set to “Prefer: Cache” to keep these files on the cache pool for faster access. Tuning ZFS for Data Pool: ZFS can be memory-intensive, so adjust arc_max to limit the ARC (adaptive replacement cache) size and avoid high memory usage. Limiting ZFS cache to around 8-10GB should leave ample memory for other services. File Shares: Since your server is equipped with 10GbE, ensure you’re using SMB tuning settings that optimize throughput. In the Settings > SMB section, set: smb edits: min protocol = SMB2 aio read size = 4096 aio write size = 4096 Step 4: Network Check Given you’re on a 1Gbps LAN but the server is using 10GbE, check that the network path isn’t introducing latency: Check MTU Settings: Ensure both your 10GbE NIC and your switch are set to the same MTU size, ideally 1500 (or up to 9000 if your network supports jumbo frames). Mismatched MTUs could cause packet loss or latency, affecting streaming and general access. Step 5: Monitor Performance After applying these optimizations: Use UnRaid’s Dashboard: Check CPU and memory usage on the dashboard while streaming or running the VM to ensure resource allocation is balanced. Review Logs: Periodically review UnRaid and Docker logs for error messages or throttling notices. This can provide insights if further adjustments are needed.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.