Close

Performance testing with a Model B

A project log for r0ck candy Pirate Radio

r0ck candy is a social, portable pirate radio station stuffed in a candy container

mark gundersonmark gunderson 02/06/2016 at 00:550 Comments

My coworker handles all things telecom at work and had a little drawer full of old 2GB microSD cards. While not big enough for the final version, 2GB is enough for the full software stack plus a couple albums to start with on the RPi Model B. In fact, it's the ideal size for testing since writing and backing up images happens a lot faster.

This is the first time I've worked with my Raspberry Pi B in a while and, oh man, did I forget how long it takes to install things versus the 2. This Model B is an early one, too so I'm working with just 256 MB RAM. The good new is it looks like mpd/icecast2 doesn't peg the CPU as hard as I feared. It shows just ~60% utilization on the Model B vs 40% on the 2. In the shot of top running below, you can see that even when I spam messages, a simple Node chat program barely shows up as a blip.

So that's encouraging. Oh, speaking of Node, make sure you don't try to follow the standard Debian install instructions on Joyent's github. That will work for the Pi 2, I believe, but not the A, B, or Zero, as they use the older processor. The basic steps I took were:

  1. Start with a fresh copy of Raspbian Jessie Lite
  2. apt-get update && apt-get upgrade
  3. apt-get install screen
  4. install and configure mpd and icecast2 per this handy blog post
  5. upload some music using psftp.exe
  6. Follow the steps from this thread on the official RPi forums to install a compatible version of Node
    1. wget http://node-arm.herokuapp.com/node_0.10.36_armhf.deb
    2. sudo dpkg -i node_0.10.36_armhf.deb
    3. sudo apt-get install build-essential python-dev python-rpi.gpio (I skipped this for time and space reasons; I don't believe I'll need b-e)
  7. Then I followed this tutorial to get a simple chat running with socket.io

From what I've seen it's relatively simple to have Node interact with the command line. I'm hoping I can whip up a program that occasionally polls mpc to get the current song and position, then starts a chat vote for the next song, artist, or genre. We'll see.

Discussions