Raspberry Pi 3 + Raspbian + NFS + Plex

I have been trying to push my Raspberry Pi setup as far as I can take it. Each day I am looking for new things to try and new functional servers to create. I just recently found that you can run a plex server on the raspberry pi. I would have to say that I am very impressed as to how functional it really is.

The parts of my setup that I used.

Pi 3 NFS server -

Standard Raspberry Pi 3 booting from SD Card.
4 128gig SamDisk Flash drives.
Flash drives mounted in raid 5 array (384 GB usable space)
NFS kernel installed
DNSMasq running tftp server for boot files
Webmin to quickly set up NFS exports

Pi 3 Plex Server -

Modded firmware to support NFS boot
DHCP reservation handled by DDWRT router running DNSMasq to pass tftp boot options
Rasbian lite booted from NFS share
Tweaked cmdline.txt file to increase throughput and force NFS to run version 3 with 32k pages for improved throughput.
Tweak config.txt to show to set the activity light to trigger on CPU usage instead of SD Card.
cpufreq utils installed to control CPU from throttling via rc.local script (Pi runs at 1.2 GHZ constantly no throttling)
/tmp mounted to tmpfs in ram
Plex installed

I am very surprised how well this setup runs. Movies play extremely well. I am very impressed by the speed.
Transcodes are decent. I am guessing since the pi has a hardware h.264 decoder that it is being accessed for the decode then CPU to encode. Not real sure. That is above my pay grade.

I would be interested if anyone has any ideas about what I could do to push this setup a little further.
Thanks to the plex team for making this availabe and writing a pretty rock solid app. I want the DVR on the pi!
I think it would be absolutely worth it to pay the 3 dollars or whatever it is to raspberry pi store to buy the mpeg 2 license so that the hardware decoder could be used to capture from the hdhomerun.

Just wanted to share my experience or if anyone needs any help making a similar setup please let me know.

Thanks!

NFS Server is on top

Plex is the second from the bottom on the right stack

3 videos streaming and this is the storage throughput on the raid 5 array.

This is the CPU during a transcode

  • You have 40MB/s getting written to the raid? Maybe that’s KB 14+10+12+1…
    Isn’t data funneled through the USB controller? 480Mb/s
    being the max?

If you ran a ‘dd if=/dev/zero of=~/dummy bs=1m conv=sync’

what type of throughput is there on the PMS rpis versus the NFS server?
I would think putting 128GB USB locally would be slightly faster since there is the NFS overhead and the Ethernet is throttled. But it’s absolutely cool if you don’t want to spend your time upgrading all 13 PMS servers.

Do you have a list of the additional packages you added? I see htop, dev2day plex source?

  • Do you use the dev2day source for pms or does plex build one for rpi3?

  • A front end server might be nice. If you have 13 rpi3 running pms switching to an unused one would be very nice.

  • Sharing a single database might be cool.

  • TFTP boot server might be just showing off a little too much. But essentially they are all running the exact same setup (I guess).

  • I found this on how to get slightly better performance (and probably the opportunity to buy more pi as they burn slowly.)

at https://github.com/aikoncwd/rpi-benchmark

I want better results, can I overclock my RPi?
Yes, overclocking your RPi will give you more power for your CPU calculations, more speed while read/write into your memory ram and better speeds while read/write into your microSD card.
If you use your RPi as a MediaCenter with Kodi or to play games with RetroPie, you will find a nice perfomance boost.
I strongly recommend to use some cooling on your RPi to avoid CPU throttling (at 85ºC)

Raspberry Pi 3: Overclock settings
Edit your /boot/config.txt file and paste the following code, you can adjust values to get more or less overclock:
force_turbo=0 #Enable cpu-overclock over 1300MHz (default 0)
avoid_pwm_pll=1 #Enable no-relative freq between cpu and gpu cores (default 0)

arm_freq=1300 #Frequency of ARM processor core in MHz (default 1200)
core_freq=550 #Frequency of GPU processor core in MHz (default 400)
over_voltage=6 #ARM/GPU voltage adjust, values over 6 voids warranty (default 0)

sdram_freq=575 #Frequency of SDRAM in MHz (default 450)
sdram_schmoo=0x02000020 #Set SDRAM schmoo to get more than 500MHz freq (default unset)
over_voltage_sdram_p=6 #SDRAM phy voltage adjust (default 0)
over_voltage_sdram_i=4 #SDRAM I/O voltage adjust (default 0)
over_voltage_sdram_c=4 #SDRAM controller voltage adjust (default 0)

gpu_mem=256 #GPU memory in MB. Memory split between ARM and GPU (default 64?)
gpu_freq=550 #Sets core_freq h264_freq isp_freq v3d_freq together (default 300)
v3d_freq=500 #Frequency of 3D block in MHz (default ?)
h264_freq=350 #Frequency of hardware video block in MHz (default ?)

dtparam=sd_overclock=90 #Clock in MHz to use for MMC micrSD (default 50)
dtparam=audio=on #Enables the onboard ALSA audio (always use this ON)
dtparam=spi=on #Enables the SPI interfaces (default OFF)

temp_limit=80 #Overheat protection. Disable overclock if SoC reaches this temp
initial_turbo=60 #Enables turbo mode from boot for the given value in seconds

start_x=1 #Enable software decoding (MPEG-2, VC-1, VP6, VP8, Theora, etc)
overscan_scale=1 #Respect the overscan settings with the use of an LCD display

  • Keep the Details coming! Is your DDWRT on a pi?