This is a living document of how to test the different parts of the equation

Testing Network Throughput

(aka network speed, aka one of the possible culprits of video that doesn’t play properly)

Most of the time, we would use iperf for this to measure from the server to the RasPi with something like this:

server = 192.168.0.100
RasPi = 192.168.0.101
user@server# iperf -s
root@raspi# iperf -c 192.168.0.100 -d

However, OpenELEC on the RasPi has no easy way (that I could find) of installing iperf, so when obstacles get in our way, we use them to learn.
Step 1: Get the iperf arm binary: grab the .deb file for the arm version of iperf from http://packages.debian.org/sid/armel/iperf/download (mine was iperf_2.0.5-3_armel.deb )
Extract the deb, and grab the ‘iperf’ binary from usr > bin
Step 2: Copy it over to the RasPi: I chose to put it in the Userdata SMB folder because I know that I’ll have it later even if I update OpenELEC.

Step 3: Test the connection: ssh in to the Raspberry, and:

~/.xbmc/userdata/iperf -c 192.168.0.100 -d

Currently, this gives me:

[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.0 sec 49.0 MBytes 40.9 Mbits/sec
[ 5] 0.0-10.1 sec 33.8 MBytes 28.1 Mbits/sec

Our good friend Big Buck Bunny weighs in at 12Mbits/s. Some other test videos go right up to the threshold at 39.1Mbit/s, which shows that things get a little squeaky for really big 1080p files.

Testing XBMC

Testing MySQL Connections

This section came about after I thought to myself “I wonder if I could offload all this CPU-Intensive scanning on to another computer in the house”, and then thought “I wonder if having the database in MySQL will make the Raspberry more responsive, quicker, or more snappy” (I don’t know which word I’ll use to find this later).
One method to test to make sure that OpenELEC is connecting is to wipe /Userdata/Databases/My*.db and reboot: If it shows movies and shows when it powers up again, you’re running off the database.

Two things to be aware of at this point:

  • When running off the database, only metadata is shared, not thumbs (this is a good thing since OpenELEC on the RasPi likes tiny thumbnails to save on memory)
  • When rescanning media, it is normal for it to take some time: you should notice each episode. If it goes very fast and does not show updated thumbnails, search for and delete the “tvshow.nfo” files that are in the series folders; this will let XBMC know that it has to start from scratch

Shutting Down XBMC in Order to Test The System

To tell OpenELEC not to autostart XBMC, use

touch /var/lock/xbmc.disabled
killall -9 xbmc.bin

Then, when you run

rm /var/lock/xbmc.disabled

XBMC will automatically start up (no reboot required)

 

Testing SD Cards

  1. SSH in to the Raspberry
  2. Use $top to make sure that no scraping is being done
  3. use the command as follows
    hdparm -tT /dev/mmcblk0
Advertisements