Computing stuff tied to the physical world

Low-end Linux

In Hardware, Software on Sep 8, 2011 at 00:01

It’d be neat to use a very low-end embedded Linux system for running (part of) my home monitoring and automation system.

I’ve mentioned the BifferBoard before, twice in fact. With a BogoMips rating of 56, it’s as low end as it gets.

Unlike most low-end boards, which are ARM-based, the BifferBoard runs on a “S3282/CodeTek” which is 486SX-compatible, so many 32-bit Linux binaries will work as is. I’m running a fairly standard Debian Lenny on mine, very convenient. It needs 650 Mb, including a full gcc build chain.

IMO, there’s great value in such a low-power system. For one, with just 30 MB RAM and no swap support on the standard setup, you’re really forced to look at memory consumption. Running out of memory will cause a program to be terminated (it can easily be restarted with a watchdog shell script).

The other feature this board does not have is hardware floating point. It’s all emulated. Here’s what that means:

  $ ssh biffie jeemon tcl 'time {/ 1 2} 1000'
  36.735 microseconds per iteration
  $ ssh biffie jeemon tcl 'time {/ 1.0 2.0} 1000'
  336.717 microseconds per iteration
  $

Versus my lowly 1.4 GHz laptop:

  $ jeemon tcl 'time {/ 1 2} 1000'
  0.569055 microseconds per iteration
  $ jeemon tcl 'time {/ 1.0 2.0} 1000'
  0.546295 microseconds per iteration
  $

As you can see, it’s a whole different ballgame :)

Anyway, let’s try and get a bit more substantial code running on this setup. I’ll use JeeMon, since I’ve recently been doing some work to combine round-robin data storage with graphing in the browser:

Screen Shot 2011 09 07 at 17 10 29

The graphs on the right are 1-day / 1-week / and 2-month previews, but let’s ignore the actual graphs since there is not enough test data for them to be meaningful.

What I wanted to see, is whether this would run on a BifferBoard. Here’s my first attempt:

Screen Shot 2011 09 07 at 17 03 14

Whoops… out of memory. Not only that, it’s taking ages to generate the JSON data for each Ajax request coming from the browser. Here’s my laptop for comparison:

Screen Shot 2011 09 07 at 16 59 31

The laptop is generating data for 5 graphs (one is off-screen) in a fraction of a second, while the BifferBoard needs several minutes (before running out of memory).

Good. Because with such a slow process, it’s much easier to find the bottlenecks. It turned out to be in the round-robin storage module I recently coded (using a USB stick as mass storage device doesn’t help either). Two hours later, things started working a lot better:

Screen Shot 2011 09 07 at 19 02 40

Progress! Still too slow for practical use… at least it’s no longer running out of memory. But although the BifferBoard is no longer maxed out, it is struggling – here’s a “vmstat 3” display, with one line per 3s:

Screen Shot 2011 09 07 at 20 13 16

I now realize that with my current settings, all data streams are aggregated to a larger “bucket” every 5 minutes. This probably explains these periods of 100% CPU activity.

Memory use is reasonable (with all interactive SSH shells logged out):

  $ ssh biffie free
               total       used       free     shared    buffers     cached
  Mem:         30000      28248       1752          0        444       8040
  -/+ buffers/cache:      19764      10236
  Swap:            0          0          0
  $

There’s still a lot of floating point activity going on, because I store all data points as 64-bit doubles. This needs to be improved at some point. My hunch is that it will take care of the performance problem. But it’s nice to see that JeeMon can cope (sort of), even in such a very limited environment. A BifferBoard with JeeMon will definitely be sufficient as “slave” controller in a larger configuration.

Power consumption is pretty neat: 2.85 W under full load and 2.20 W when idle. Measured at the AC outlet, i.e. including 5V power supply losses.

There are numerous low-end Linux systems out there. If the above can be made to work reasonably well, then it should work with most of them… ARM- / PPC- / x86-based, whatever.

For now, that BifferBoard is a good way to keep me honest, and on edge :)

  1. My current “plaything” of choice is the Ebox 3350.

    PMX-1000/Vortex86MX processor at 1Ghz
    (6 stage pipeline, x86 instruction set equivalent to a 486DX - aka built in FPU)
    512Mb memory :-p
    SD, SDHC support
    3x USB 2.0 ports
    10/100 Mbps LAN
    VGA port!
    Very tough metal case 10cm x 10cm x 2cm.
    It's even got audio if you want it!
    

    I can’t give exact figures on the power consumption as I don’t have a spare cable to chop apart right now, but it’ll run a full Ubuntu desktop up when powered purely by a 5v USB port on my laptop, so 500mA tops. So 2.5watts.

    Unfortunately it does also raise the price a bit too, but it’s still well under £100 UK. I did stumble upon a Dutch supplier’s site the other day, but of course now I want it, I can’t throw the right random words into Google to find it.

    • Nice! Although I suspect it’s closer to 10W than 2W – see this page. Or maybe that’s just to power USB devices attached to it?

      Hm, would be a good idea to splice a USB cable for power consumption checks of USB-powered stuff like this.

    • Here’s another interesting low-end one with WiFi.

  2. Was wondering why github isn’t responding, then I realised the typo. You’re linking to “githib.com”

  3. Do you have something against ARM, in particular, or non-x86 in general? There are lots of little Linux-capable non-x86 systems about, especially ones with ARM-based CPUs. They’ll give you lots more speed and more memory than these silly x86-compatible systems, and for the same or lower power consumption. What’s not to like about that?

    • Not at all. I’m using ARM, FreeScale, VIA, and x86 all over the place. Main reason for this experiment is to also have a rock-bottom-low-end setup.

      Wouldn’t mind finding a 1W system – the MMnet1001 was one I fiddled with in the past (I think it needed 300..400 mA @ 3.3V).

    • Ian Tester: Turn the question around, do you have something against x86? Can you come up with some links? The requirements are: – ARM CPU – costing no more than £30 ea. in quantities of 10 – USB 2.0 high speed (yes, there are plenty of arm chips with built-in full speed USB, it has to be high speed). – 10/100 ethernet with connector – Form factor as Bifferboard – Power requirements as Bifferboard

      Don’t come up with a bunch of commercial devices which, if hacked will do what you want with the caveat that you invalidate your warranty.

      Don’t come up with vapour-ware that might be available in a year or so. Assume the buyer wants it now.

      Don’t come up with loss-leaders (I’m thinking Seagate Dockstar) that won’t be about in 6 months time so there’s no point in basing a design on them.

      Don’t assume any knowledge of electronics, the user shouldn’t need to get out a soldering iron just to use the thing.

      Don’t come up with links to sites which won’t advertise their prices but have some kind of enquire button, there should be a ‘buy’ button.

      Don’t come up with links to sites which won’t dispatch an individual board to anywhere in the world.

      Preferably don’t come up with any product that doesn’t have a source repository, so you can just download the sources and build the firmware without needing a PHD to figure it all out.

      I’m perfectly happy to stop selling the Bifferboards when it becomes apparent that they’re no longer relevant, if their existence in the world is oh-so-offensive to people that just don’t get why you’d want one, but unsubstantiated posts like this are getting annoying, and I’ve seen quite a few of them!

  4. @JCW… Yup, the Ebox 3350 comes with a 2Amp supply, but that’s just so it can feed 500mA to any devices on the 3 USB ports it has. Honestly, I’m running it on the power from my laptop’s USB port.

    I will have a dig and see if I have an old PC USB backplane I can sacrifice to the great god of experimentation and got some real figures for you.

  5. My (current) personal favorite is the Sheevaplug, running Debian.

  6. Already mentioned the Alix board in a forum thread: http://forum.jeelabs.net/comment/2810#comment-2810

    I just stumbled upon the Raspberry Pi demo: http://www.raspberrypi.org/?p=152

    ARM based, HDMI out, 1080pi video capable, 1W when playing video according to the vendor, Linux. And the best part is price: they are planning to sell for $25 to $35, sometime in November.

    Could this puppy be the perfect match for your scavenged laptop LCD ?

Comments are closed.