Using a Raspberry Pi as a Server

I have an old iMac sitting under my desk, and today’s the first day it’s been turned off in ages.  Until today, I was using it as an application server: it was running a MySQL database and a custom Java application that does Twitter data collection.  But this morning, I moved the last of those tasks to a $35 computer, the Raspberry Pi:

Photo courtesy of Daniel Mietchen, Wikimedia Commons

Photo courtesy of Daniel Mietchen, Wikimedia Commons

The old iMac was a G4 processor — the next to the last of the non-Intel CPUs Apple used.  Because of that, it is stuck on older versions of software: OSX 10.5 (Leopard), a MySQL version from years ago, and a somewhat quirky version of Java.  But it did its job well, and just ran without issue.  Uptime said the last time it was rebooted was over 160 days ago (probably as the result of a software upgrade or mid-summer extended power outage).

So moving to a new server was a bit of a risk — don’t fix what’s not broken.  But the advantages of the Pi were enormous:

  • Size: Having an iMac under your desk is a little junky. My wife asked “can’t you just buy another Mac Mini instead?” (And I did consider that).
  • Modern software: Being able to get current versions of an operating system, database, and Java are reassuring.
  • Power consumption: The iMac pulls on the order of 100 watts.  The Pi, with its external hub and disk drive, probably more like 7.  As we head back into Hurricane Season here in Florida, the lower power profile means that the computer can run a lot longer on battery back-up UPS; it’s not uncommon to get power outages of a half hour during bad thunderstorms.
  • Geek Factor: Using an ARM server is dipping my toes into a platform of the future.

There were a few concerns about limitations:

  • The processor in the ARM is clocked slower than the G4 and is probably not as powerful overall.  
  • The Pi has 512mb of memory while the iMac has 1gb.
  • The boot disk drive of the Pi is an SD card (which tops out at 32gb), and since my database is now over 30gb that means I had to attach an external USB drive to the computer.  USB drives are not the fastest.
  • It doesn’t have native WiFi.  Right now it’s running on a cable connection to the router, so it doesn’t have as much freedom to be moved around as the iMac.  But it’s also so small that sticking it near the router isn’t a big deal.

So how’s it doing?

As far as the memory concern, the Pi is only using about half of its memory to support the Java app and the database (until I expand the buffers in the database to sop up the extra memory, of course). Performance is good enough — it keeps up with the Twitter feeds I’m collecting, so there’s no problem there.  It sits idle much of the time, so I know it’s not struggling to keep up.  All in all, it seems like the performance and capabilities are on a par with the “Micro” virtual server that Amazon charges you $17 a month.

What’s the full configuration?

  • A Raspberry Pi+Case, ordered from Sparkfun for $52 with shipping
  • A four port USB 2 hub I had lying around my junk drawer.
  • A 100gb USB backup disk that was also in the junk drawer
  • A USB power supply with the appropriate connector for the Pi … that was in a junk drawer.  I have a lot of electronics junk.
  • An 8gb SD card I stole from a video camera

So probably the full costs of this, if I had to buy all the pieces new, would have been more in the range of $100 — the $35 computer is still a bit of a “stone soup” kind of thing.  But for $100 for a full functional Linux server that would fit into a Kleenex box, I am impressed!

Recommendations?

If you’re looking for an “under the desktop” server, these seem like a great way to go for a lightweight project.  You have to be comfortable with Linux system administration — very comfortable — but if you are (or feel like now’s the time to learn) it’s a good option for at home or skunk works projects.

Harry’s Winston Shaving Set & Blades Review (Harrys.com)

For a two month update, scroll to the end…

I have been a regular Gillette Fusion shaver for quite a while now.  It was really the only manual razor I’ve found that does a great job and has a smooth glide.  But I bristle (pardon the pun) at the cost of the blades.  It seems like I get a week or maybe two out of a blade before it starts catching on hairs and becoming uncomfortable.  Paying around $4 a blade seems like a lot for a product that lasts such a short time (and, yes, I know all the tricks of trying to preserve the blade).  I was pretty much convinced to give a safety razor a try (from 5 blades to 1!), but then something caught my eye…

The Winston Set

The Winston Set

Continue reading

Creating a Sterling Purse Charm, Part 1

As I wrote before, I’m going to experiment with using 3D printing to create fine jewelry. My first try at 3D printing jewelry is a pretty simple design, a sterling silver purse charm for my wife.  If you’re not familiar with bag charms, take a look at this page on Louis Vuitton’s website.  They can be quite expensive and are usually made out of non-precious metals.  So I thought I’d create a custom charm for my wife, have it 3D printed in plastic, and then cast it in silver.  This blog post covers the process up to the first test casting …

Continue reading

T-Mobile can Thrive in the Future with Data. Lots of Data.

When the AT&T + T-Mobile deal fell apart just over a year ago, I wrote that T-Mobile’s best hope was go switch its focus to data.  The carrier hasn’t followed my advice (that’s not a surprise 🙂 ), but is going to take some steps that are helpful in unbundling its plans so if you own your phone outright you can get a lower rate.

But although this is a useful step in its own, I have to doubt whether it’s going to draw in a lot of new people to a network that they may perceive as inferior.  I predict it won’t change the market position of T-Mobile in a meaningful way.

The future for T-Mobile is still data, not voice.  But more importantly, the future is where a single subscriber has lots of devices using data, all sharing a common pool of data access.

Continue reading

Heading off for an adventure in 3d printing fine jewelry

I’ve been wanting to experiment with 3D printing for a long time, and have started in earnest to see what I can do with it (as opposed to, of course, what others more talented can do with it).  I’m not particularly keen on printing chess pieces, or replacement parts for a vacuum cleaner, or a lot of the other kind of mundane purposes I see.  But I am interested in jewelry (and my wife is a gemologist, which is very handy) and I have some skills in the area, and so I thought I’d see what she and I can do in terms of creating, via 3D printing, fine jewelry that can be sold commercially.

3D printing is, in many ways, a sort of renaissance art, requiring skills across a wide variety of areas to go from idea to finished object in your hand, especially if you want that object to be something of value (like jewelry). But because of the limitations of 3D printers, the results tend to be more along the lines of “art jewelry” or “costume jewelry” — jewelry where the raw materials are fairly inexpensive.  

Continue reading