Go Concurrency Benchmarking on a Raspberry Pi

In hindsight, no one claimed that a Raspberry Pi of any model was a powerhouse machine. However, I had thoughts about how to benchmark computing power after leaving Dreamhost and noticing that even tar and gzipping my WordPress installs performed like an ancient machine despite the processor statistics. That made me think about a raw benchmarking metric that could deployed anywhere. I was also learning Go and trying to understand Go concurrency. I ended up with a "concurrency" of 2 because the lower power systems didn't get any more out of an additional goroutine.

The program requires 13,135,013 sha3 hashes and conversions to base 64 to come up with a string that starts with "TEST".

My work workstation's output:

[Specs: Late 2013 Retina MacBook Pro 15", 2.3 GHz Core i7 - (I7-4850HQ)]

  • Single thread: 16 seconds
  • Concurrency of two: 10 seconds
  • Compared with PassMark:
    • 9066
    • Single thread 1964

A Late 2011 MacBook Pro 13", 2.4 GHz Core i5 (I5-2435M):

  • Single thread: 34 seconds
  • Concurrency of two: 19 seconds
  • Compared with PassMark:
    • 3269
    • Single Thread 1347

A Core i3-5010U 2.10 GHz NUC (Windows 10 Pro)

  • Single thread: 27 seconds
  • Concurrency of two: 17 seconds
  • Compared with PassMark:
    • 3060
    • Single Thread 1171

A Mid 2009 MacBook Pro 13", 2.26 GHz Core 2 Duo (P7550)

  • Single thread: 57 seconds (Originally was 83 on go1.3.3, but better results with 1.8.3)
  • Concurrency of two: 32 seconds (Originally was 80 on go1.3.3)
  • Compared with PassMark:
    • 1521
    • Single Thread 892

A ThinkPad 11e with A4-6210 APU (1.8 GHz - Windows 10 Home)

  • Single thread: 135 seconds
  • Concurrency of two: 65 seconds
  • Compared with PassMark:
    • 2143
    • Single Thread 697

Raspberry Pi 3B

  • Single thread: 1265 seconds
  • Concurrency of two: heat warnings!

For the purposes of this "performance" benchmark, there is definitely a non-linear relationship between a canned benchmark score and the score in a brute force operation that has a heavy calculation component. I'm also isolating only one aspect of system performance. There is a SATA SSD on the newest machine, a SATA HDD on the 2011 and 2009 machines, and an SD card on the Raspberry Pi. The RAM is different in every machine as well. Still, it was a fun experiment that motivated me to spend a little extra time in Go and learning Go Concurrency.

Using an Arduino to keep a Seiki 4K Display On

I love my Seiki 4k Display for writing code on my Mac. The one downside is that it times out and goes to sleep after 2 or 4 hours of inactivity (from the remote, not the screen). I decided to fix this problem in a somewhat complicated way: With an Arduino Uno that I already had, and an IR control kit.

I used the IR receiver to find the Seiki "Volume Up" and "Volume Down" codes, which appear to be structured like NEC codes. Those are hardcoded because I haven't really bothered to refine the setup or code any more. The IRBlaster library uses digital out 3 for the IR sends, and I used digital 8, 9, and 10 for red, yellow, and green indicators to give some indication of where in the refresh cycle things are. The code as-is sends the volume up and volume down signals every hour or so, and the indicators start with a slow blink on red, a slightly faster blink on yellow, and a fast blink before remote send on green.

IR Blaster set up (with IR receiver partially wired in still)
IR Blaster set up (with IR receiver partially wired in still)
#include <IRremote.h>
 
IRsend irsend;
int led = 13;
int red = 8;
int yellow = 9;
int green = 10;
 
void setup()
{
  Serial.begin(9600);
  pinMode(led, OUTPUT);
  pinMode(red, OUTPUT);
  pinMode(yellow, OUTPUT);
 
  pinMode(green, OUTPUT);
}
 
 
int choice(int i) {
  if(i > 1300) {
    return red;
  } else if (i > 900) {
    return yellow;
  }
  return green;
}
 
void ledOn(int i) {
  digitalWrite(choice(i), HIGH);
}
void ledOff(int i) {
  digitalWrite(choice(i), LOW);
}
 
void loop() {
  while(true) {
    irsend.sendNEC(1086232679, 32); // seiki volume up
    delay(40);
    irsend.sendNEC(1086206159, 32); // seiki volume down
    for(int i=1800; i >=0; i--) {
      ledOn(i);
      delay(i);
      ledOff(i);
      delay(i);
    }
  }
}

What should I do with this existing desktop?

I have a mostly custom built desktop, and want to replace it with adequately current hardware, but no real plans for gaming.

  • The IDE Hard Drives are going out.
  • On the existing desktop:
    • Windows 2000 is installed, but I rarely boot to it.
    • Ubuntu 9.04 is installed.
  • I have a SATA 250 GB drive that works perfectly fine, but which I have from another system which I upgraded to 2 x 500 GB.
  • The Antec case is a fairly nice, but dated, mid-tower ATX case.
  • I think the power supply handles SATA power.
  • The existing motherboard only supports IDE, up to a 3.06 Northwood core processor.
  • I currently do not have *any* Windows 7 installs.

I also have a Dell Desktop which is our main desktop in the home:

  • Windows XP
  • 3 GB of RAM
  • 2 x 500 GB SATA hard drives
  • 2.16 GHz [E6400?] Core 2 Duo processor
  • iTunes, media, and photos are on this box.

Some interests:

  • Windows 7 64-bit would be nice to play around with.
  • Would still like to end up with a Ubuntu install somewhere.

Some options that I’ve thought of:

  1. Upgrade the custom build (that’s a mobo/processor and ram minimally, even if integrated video)
  2. Get a recent refurb desktop, replace the Dell with it, and replace the custom build with a Dell
  3. Buy a Mac desktop, move the Dell downstairs.

More issues with my Lenovo T61

Here's a nice shot of the nVidia driver context menu wackiness in windows XP. The longer a window is open, the more of these that appear. (Considering the window in question is Safari, that time span is probably 2-3 hours.)

Meanwhile, I spent 10-15 minutes trying to get the laptop to recognize that my external monitor was plugged in, and then trying to close windows for a graceful shutdown.

Laptop Replacements

Netbooks For Road Warriors On A Budget -- netbooks -- InformationWeek.  In the headline, the phrase "laptop replacment" is used.  The work laptop that I use on a daily basis is a "desktop replacement," but I don't want to have to pay for my own--yet I don't want to be tied to my desktop's location either.

If I could just get a laptop that was dirt cheap, yet had decent horsepower and disk space...

From the review, it looks like Asus is the primary option for my interests still.  As for the suggetions on gear, I don't think I'm going for a rubberized roll-up keyboard.

Kryder's law and hard drive pricing.

Hard Disk Historical Pricing (found from Kryder's Law - A rule of thumb for hard drive growth).

It's amazing that in March of 1986, $48/MB was the sweet spot for a hard drive.

By other milestones in my life:

By the time I started college in 1994, the cost was under $1 per MB.

By the time I started my first full time job in late 1999, the price for hard drives was $20 per GB!   (The cost of "high grade" flash memory now).

When my first daughter was born in August 2004, the price per GB was near $1.

When my son was born in August 2008, I remember seeing drives for 5 GB per $1.

Now, you can get about 10 GB per $1.  Even the large solid state hard drives are only $2 per GB, but yet I've been in conversations about how we could not imagine paying "that much" for them.

Other fun variants of Moore's Law are linked from the Wikipedia article.

Solid State Disk Hype?

I opened up InformationWeeek today and saw this article:  Solid State Disks, Demystified.  So, the current benefits of SSD technology may be exaggerated.

  • Faster boots:  Read time bias and slimmed-down OS have helped exaggerate these results.
  • Battery life:  Other devices are still consuming the same amount of power, which is not insignificant in the power usage.  My counterpoints:
    • Max battery life power management settings would actually make for a usable computer without the need to stop the hard drive as a primary power saver.
    • Optical drives are not an option on many notebooks with SSDs (MacBook Air, sub-notebooks), so the example of watching a movie on DVD draining battery would not be a possibility on those notebooks.

I see some misses on this article:

  • What about heat generation/dissipation?  Would SSDs make less of a contribution to system heating, allowing for less fan usage or no fan at all?  (Thus saving power)
  • What abou mean time between failure (MTBF)...  A commenter on the article remarked on this.  The experimental MTBF indicates significantly longer lifetimes, but may have been in a read-heavy environment.  Indeed, write endurance may be a concern, but at 100k-300k write cycles that would still mean 20+ years before failure.  Of course, then there was this SSD failure debacle.  I've had a compact flash card in a camera fail on me within a month, and there isn't a chance for recovery before failure.
  • Shock resistance 1500G/0.5 ms vs 300G/2.0 ms and 160G/1.0 ms.
  • Much wider operating temperature range (-25'C to 85'C).

What is your backup strategy?

I'm looking for input on what your home and/or small business backup strategy is.

What? You don't have one? Well, mine has been spotty at best.

I originally bought my Dell XPS desktop as a "Scratch & Dent" machine.  It has a RAID controller, but only came with a 250 GB hard drive, and the RAID software reported back that the RAID volume was degraded (because it was missing the second drive of the volume).  I eventually replaced the hard drive with two 500 GB hard drives, and opted not to enable RAID 0 or 1 for those two.  Unfortunately, I didn't enable mirroring RAID, but fortunately, I didn't enable RAID 0, or 1 TB of data would be lost now.

My boot drive (which of course, houses all of the pictures, iTunes "imported" music, etc. in the My Documents folder) died this morning.  This was not the classic slow death that I'm used on older drives with slower spindle speeds.  This drive now sounds like a chainsaw.

I originally created the boot drive by using Symantec Ghost to resize the original 250 GB drive to a 500 GB drive, so I have that old backup still available.  In addition, I just refreshed the backup of my pictures to the 2nd drive, otherwise, those would be about a year out of date.

My prior backup experiences:

  • Backup pictures to DVD+/-RW using Nero, copying directory structures to backup so that the DVDs would be usable as standalone discs.
  • Backup pictures to DVD+/-RW using Nero or other backup software, using disc spanning and propriety backup formats.
  • Backup pictures to USB 2.5" HD
  • Backup music and pictures to the shared drive of a wirelessly networked PC that is used for little else.
  • Symantec Ghost backups for dying drive recovery and backup.

I now own a 1 TB USB drive for backup purposes, but I'm torn between Ghost managed backups, Ghost images, or some non-proprietary format for my backup solution.

Any thoughts?

The future of storage?

The SD Card Association has unveiled a 2 Terabyte capacity microSD  card spec (SDXC) [InformationWeek article]. The specification uses the exFAT file system (FAT64).  Recently, SanDisk trumpeted drastic improvement in flash write speed.  Granted, the drastic speed boost will come to market long before the SDXC spec is maxed out.

Imagine the applications for carrying 500GB-2TB of data in a form smaller than your little finger’s fingernail. To me, up until now, desktop-scale SSD storage has meant 2.5” hard drive form factor magnitude.

Imagine the implications to:

  • The netbook/sub-notebook evolution - the MacBook Air suddenly looks like a luggable?
  • The evolution of smartphones - Savvy users may be able to have them as desktop replacements.
  • Optical media - Why would you ever wait 30 minutes to burn a DVD-DL again?
  • The entertainment industry
    • 200-1000 exact copies of DVDs could be stored on a single disc. Good luck detecting a microSD in Customs.
    • High Quality HD Video Cameras could be the size of a small point-and-shoot camera. YouTube becomes small potatoes compared to the amateur filmmakers whose hobbyist movies start competing with professionally produced movies.
  • The software industry
  • Information security
    • How much damage could a virtually undetectable 500GB drive connected to the network do?
    • How much damage could a misplaced 500GB drive the size of a fingernail do?
  • Green computing
    • The power consumption of such small drives could make current SSDs look like power hogs.
  • The potential death of the desktop PC? (Again...  didn't we have this prediction in 1998?)

On a personal level, I'm just as intrigued at the possibility of exFAT/FAT64 being introduced as the file system for removable storage.  FAT32 does not make for good removable storage once you get to the 2-4 GB range.  If you have several small files, they quickly eat up space on disk, despite not taking up even a 1/4th of the actual space.   I'm also hopeful that exFAT will have better support outside of Windows than NTFS.