Raspberry Pi, Raspbmc, NFS, MySQL

26/03/2013 – 23:05

Recently I acquired a Rasperry Pi device, mainly because I was never really satisfied with the implementations I had used before (24p stutter, problems with energy saving mode etc..). Some weeks ago a friend of mine had purchased an android-based USB stick with HDMI output, which he tried to use as media player, and that had me rethinking. Afer some research I ended up with the Pi, mainly because I learned from my friend’s android stick: it’s not the hardware that counts, its whether the software is optimized for the hardware and how seemless the user experience gets.

Using XBMC for years now I decided to give RASPBMC a try, a distribution specifically developed for the Pi, running XBMC only. I found it to run astoundishingly fluid, the only grief I had was that (because I exclusivly use 720p and 1080p files) the buffering when starting a video or jumping inside the video took quite some time (5 seconds)
All is not lost though. With a history as overclocker (soldered my first Athlon Slot A from 500MHz to 850MHz) I naturally looked for the headroom on the Pi. People reported 900-1000MHz instead of the standard 700MHz. I gave 880MHz a try, that was fine for a day, then the other day while watching a bluray file it got stuck, after reboot I had filesystem corruption on the SD card. >Reinstall
I found out that overclocking a setup with a SD card installation was prone to corruption on hard overclocks. Well, didn’t get that earlier. Installation to USB was the way to go people said, I tried that using a USB 3.0 8GB stick (60MB/s read, 25MB/s write), the system was much quicker booting and especially inside raspbmc fluidness increased.
880MHz was also just fine now!
For some time I sticked to “file mode”, navigating to directories with video files. Then i activated library mode – uuh, aah, that is slow. Thumbnail generation and sql load brought the Pi to its knees.

From earlier Windows/XBMC times I knew the DB part can be outssourced to a mysql server. Well, I already had one running (VM on HyperV host), so I added a advancedsettings.xml to the Pi, voila.
Library mode was now nearly as quick as file mode.

Still: RASPBMC added a option to install to NFS shares, and users reported that installation method to be even more responsive (and overclockable). I gave Services for UNIX under Windows server a try, it installed just fine, but I didn’t manage to boot it from the share (block init failed etc, VSync issues…). I then setup a FreeNAS VM on my HyperV host, added a 8GB VHD file (SSD based) to the machine, created a ZFS share and NFS export on it. Raspbmc installed and ran without problems on first try. I instantly took a ZFS snapshot of the state, and set daily ZFS snapshots to be done inside FreeNAS. Inside FreeNAs i can now add additional shares for further Pis, and have them root files all in one place while no more requiring a big or fast SD card or USB stick to run a Pi.


  1. 4 Responses to “Raspberry Pi, Raspbmc, NFS, MySQL”

  2. Hello,

    I just got a Pi and ran the whole raspbmc intall on a fast SD card. Playing the movies was not that big of an issue, but navigating the library was painfully slow. I tried to run it over NFS last night, but it seems the update server (raspbmc.com) is down and it just doesn’t install. Before it is up, it would be a big help to me if you could answer a couple of questions from your experience.

    1. You’ve already said that navigation is significantly better. How about the scanning? It was really slow on the SD card install. Just curious if the SD was the bottleneck there or if the CPU on Pi doesn’t have enough juice.

    2. What about seeking on a video file? Is it faster too on the NFS install?


    By Rockgod on May 7, 2013

  3. 1) sdcard is the slowest option, usb 3.0 and nfs as installation targets are quite equal. usb and nfs are file system corruption resistant, if you plan on overclocking. For simplicity’s sake I would go for a small boot sd card and a USB 3.0 installation, nfs only if you are technically savvy.
    2) That only depends on the type of xbmc source you add. For me FTP is a tad faster than nfs, ftp and nfs are a good bit faster than SMB/CIFS sources.

    By marconachtrab on May 7, 2013

  4. @marconachtrab Thanks for your response. I’ve been using XBMC for more than a year and I did not know that we can add an FTP share as a source. I should try that.

    I have a Synology NAS and I’ve exported different NFS shares (movies, TV, music etc). Is FTP significantly faster than NFS? If so, I’ll just make all my sources in XBMC to point to FTP.

    By Rockgod on May 7, 2013

  5. FTP strongly improved the buffering issues I had with SMB shares:

    By marconachtrab on May 7, 2013

Post a Comment