Feeds

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

Running an internet biz on sunshine and *nix

  • alert
  • submit to reddit

Beginner's guide to SSL certificates

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).

Top 5 reasons to deploy VMware with Tegile

Next page: Embedding the Shark

More from The Register

next story
Just don't blame Bono! Apple iTunes music sales PLUMMET
Cupertino revenue hit by cheapo downloads, says report
The DRUGSTORES DON'T WORK, CVS makes IT WORSE ... for Apple Pay
Goog Wallet apparently also spurned in NFC lockdown
Cray-cray Met Office spaffs £97m on VERY AVERAGE HPC box
Only 250th most powerful in the world? Bring back Michael Fish
Microsoft brings the CLOUD that GOES ON FOREVER
Sky's the limit with unrestricted space in the cloud
'ANYTHING BUT STABLE' Netflix suffers BIG Europe-wide outage
Friday night LIVE? Nope. The only thing streaming are tears down my face
IBM, backing away from hardware? NEVER!
Don't be so sure, so-surers
Google roolz! Nest buys Revolv, KILLS new sales of home hub
Take my temperature, I'm feeling a little bit dizzy
prev story

Whitepapers

Cloud and hybrid-cloud data protection for VMware
Learn how quick and easy it is to configure backups and perform restores for VMware environments.
Forging a new future with identity relationship management
Learn about ForgeRock's next generation IRM platform and how it is designed to empower CEOS's and enterprises to engage with consumers.
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?
New hybrid storage solutions
Tackling data challenges through emerging hybrid storage solutions that enable optimum database performance whilst managing costs and increasingly large data stores.
Security and trust: The backbone of doing business over the internet
Explores the current state of website security and the contributions Symantec is making to help organizations protect critical data and build trust with customers.