Skip to content

Raspberry Pi 3 Cluster Testing #56

@zachbunyard

Description

@zachbunyard

My goal has been to create a Plex server using 4 Raspberry Pi 3's and a Raspberry Pi 2. Some interest has been expressed in the setup I'm attempting so this issue will hopefully answer any questions and clearly show any shortcomings caused by using the Pis

My setup is as follows:

  • Pi 2 -> NFS Server serving up media on USB External HDD (NTFS) with dedicated power supply
  • Pi 3 -> Plex Media Server instance, and transcode directory on USB flash drive (ext4)
  • Pi 3 -> PRT Slave writing to transcode directory via NFS
  • Pi 3 -> PRT Slave writing to transcode directory via NFS
  • Pi 3 -> PRT Slave writing to transcode directory via NFS

Details:

  • Each Pi is connected to a 10/100 ethernet switch
  • Each Pi is running Raspbian Jessie Lite
  • Plex Media Server is version 1.4.4.3495 installed from here
  • Transcoder settings: Prefer maximum speed transcoding and transcoder default throttle buffer = 360
  • Testing Player: Plex Web Interface
  • PRT versions tested 0.4.2 and 0.4.3
  • The media HDD is NTFS formatted to due to my need to access content easily via Windows. Samba showed too much idle CPU overhead and not enough speed to justify it. I compromised and use NFS to connect the HDD to PMS and simply disconnect the HDD and attach to my windows PC when needed.

Testing Samples:

  • 15.26GB MKV - total bitrate: 16988kpbs - H264 15452kbps - DCA 1536kbps
  • 286.61MB MKV - total bitrate: 1856kbps - H264 1472kbps - AC3 384kbps

To setup PRT, I followed Debian 8.x Install Instructions

Findings:

Though the PRT configuration appears to be sound and working as expected, the Pi's don't appear to have the necessary IO capabilities for smooth streaming. The media samples used were Direct Streaming, only transcoding the audio. The Pi can NOT transcode HD video smoothly. At this piont, I've just accepted this fact.

I attempted to install PRT again using the modified prt.py created in this PR. This modification was intended to allow a single transcode job to be distributed among numerous PRT slaves. Unfortunately, I was unable to get it working.

Conclusion:

At this point, PRT does not appear to be a viable option for a clustered Pi setup. Not because of PRT itself, but because of the limitations the Pi presents in terms of IO (USB 2.0 and 10/100 Etherneton shared bus). I've seen some reports that a gigabit USB ethernet adapter can improve ethernet throughput to ~150-200Mbps. This maybe the bandwitch increase necessary to run PRT reliably. Additionally, a Pi alternative with gigabit ethernet may yield better results with PRT. I have not tested either and at this point, do not know if I intend to.

Next Steps:

I've decided to pursue the following setup:

  • Pi 2 -> NFS Server serving up media on USB External HDD with dedicated power supply
  • Pi 3 -> Plex Media Server instance, and transcode directory on USB flash drive
  • Pi 3 -> Plex Media Server instance, and transcode directory on USB flash drive
  • Pi 3 -> Plex Media Server instance, and transcode directory on USB flash drive
  • Pi 3 -> Nginx configured to load balance transcode jobs among all 3 PMS instances

I will be investigating the Trakt plugin to preserve watch status, play times, etc among all 3 instances.

At this point it is incomplete. I have not had the tie to reconfiure it and setup anything other than the NFS Server and the first PMS instance.

Note: With more than one PMS instance serving up media, the Pi serving up media becomes an obvious bottleneck. The Pi as a NFS Server is really only appropriate for a single NFS client. And at that point one may argue one should remove the NFS server entirely and directly attach the media to the Pi with PMS installed. I agree, but I elected to go with the configuration above as a proof of concept with the intention of replacing the Pi2 with a NAS that I will be buying/building.

If anyone has any suggestions as to other possible ways to get PRT to work, I'm willing to give it a shot

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions