Feeds

How I built a zero energy cost, zero carbon home server

Running an internet biz on sunshine and *nix

  • alert
  • submit to reddit

Remote control for virtualized desktops

Java is not enough: introducing Sheeva

I was filled with the zeal of the reformed, and the circa-30W consumption of the laptop was a target that I thought I should be able to beat easily.

In particular I wanted to be able to run the server off-grid (ie from solar PV panels and battery) all year round. I also wanted to get my system fully solid-state and silent.

I found out about SheevaPlug, an "embedded" System-on-Chip (SoC) Linux box, small enough to plug into a mains power socket at about the size of a chunky power transformer for a games console or similar, though a discussion of the Shark/Zero Java port to the ARM chip inside the SheevaPlug.

A SheevaPlug can consume under 4W if quiet and carefully configured, despite packing 512MB of Flash and 512MB of RAM, SD and USB slots for more memory and other peripherals, and an 100Mbps Ethernet socket.

The step down from the Linux laptop represented about a halving of CPU speed (similar CPU GHz at 1.2GHz for the SheevaPlug ARM, but half the work per Hz) and RAM chopped by 75 per cent, but it looked do-able, and with a many-fold reduction in power. Can you say "challenge"?

To get away from mag disc was going to be tough, and powering such a disc through spin-up would also be tricky, even a "portable" or USB-powered disc, so in the end I settled on the biggest (32GB) SD card that I could plug in to hold the OS and most of the frequently-used data, and a 128GB USB thumb-drive (yes GB, not MB) to hold the "bulk" data that used to be on the laptop's mag disc, with some room to spare.

Both were pretty expensive per GB compared to smaller devices, and the Kingston DataTraveler 200 USB 128GB flash drive (£260) was only just about available when I needed it. I had just under 60GB of bulk data to put on it at that point, growing slowly.

System on a plug: Unboxing the Marvell Sheeva

The community at plugcomputer.org was very helpful with booting a usable system, including a new enough kernel (2.6.31) to contain much of the important energy-saving features such as the "tickless" clock (which wakes up only as necessary, not every millisecond just in case).

One unfortunate detail is that the Sheeva came with Ubuntu 9, and Ubuntu abandoned support for the Sheeva version of ARM (armv5tel) in 10. So any significant upgrade would require a move to another distribution such as Debian (upon which Ubuntu is based). But I haven't felt the need, and many of my mirrors elsewhere in the world run much older Linux releases.

The memory issue was quite pressing, and I had to, for example, limit Apache and sendmail to fewer threads/children than usual, and to run with a smaller stack (much less than the default 8MB), though this only required config and script hacking, no (re)compilation, in part because I am running the system with no swap. Using solid-state media as swap could wear it out in no time at all.

Java (the Tomcat Web server) had to be run with much less heap than ideal (about half of physical memory, ie 256MB, compared to a more usual 1GB), and I had to spend a lot of effort over many months tracking and squashing slow and small-but-deadly memory "leaks" (over-eager cacheing in many cases) in my code. The upside of this work is that on my bigger mirror hosts the code is now super-efficient with its memory. In fact the code adapts at run-time to both the available heap/memory and the number of CPUs, ranging from 1 CPU and 256MB on the SheevaPlug to 24 CPU threads and several GB on a Sun Niagara host, which all adds to the fun (yes, it's what I like doing).

Beginner's guide to SSL certificates

Next page: Embedding the Shark

More from The Register

next story
The cloud that goes puff: Seagate Central home NAS woes
4TB of home storage is great, until you wake up to a dead device
Azure TITSUP caused by INFINITE LOOP
Fat fingered geo-block kept Aussies in the dark
You think the CLOUD's insecure? It's BETTER than UK.GOV's DATA CENTRES
We don't even know where some of them ARE – Maude
Want to STUFF Facebook with blatant ADVERTISING? Fine! But you must PAY
Pony up or push off, Zuck tells social marketeers
Oi, Europe! Tell US feds to GTFO of our servers, say Microsoft and pals
By writing a really angry letter about how it's harming our cloud business, ta
BOFH: WHERE did this 'fax-enabled' printer UPGRADE come from?
Don't worry about that cable, it's part of the config
Intel offers ingenious piece of 10TB 3D NAND chippery
The race for next generation flash capacity now on
prev story

Whitepapers

Why and how to choose the right cloud vendor
The benefits of cloud-based storage in your processes. Eliminate onsite, disk-based backup and archiving in favor of cloud-based data protection.
A strategic approach to identity relationship management
ForgeRock commissioned Forrester to evaluate companies’ IAM practices and requirements when it comes to customer-facing scenarios versus employee-facing ones.
Reg Reader Research: SaaS based Email and Office Productivity Tools
Read this Reg reader report which provides advice and guidance for SMBs towards the use of SaaS based email and Office productivity tools.
Mitigating web security risk with SSL certificates
Web-based systems are essential tools for running business processes and delivering services to customers.
Storage capacity and performance optimization at Mizuno USA
Mizuno USA turn to Tegile storage technology to solve both their SAN and backup issues.