Feeds

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

Running an internet biz on sunshine and *nix

  • alert
  • submit to reddit

Internet Security Threat Report 2014

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
NSA SOURCE CODE LEAK: Information slurp tools to appear online
Now you can run your own intelligence agency
Azure TITSUP caused by INFINITE LOOP
Fat fingered geo-block kept Aussies in the dark
NASA launches new climate model at SC14
75 days of supercomputing later ...
Yahoo! blames! MONSTER! email! OUTAGE! on! CUT! CABLE! bungle!
Weekend woe for BT as telco struggles to restore service
Cloud unicorns are extinct so DiData cloud mess was YOUR fault
Applications need to be built to handle TITSUP incidents
BOFH: WHERE did this 'fax-enabled' printer UPGRADE come from?
Don't worry about that cable, it's part of the config
Stop the IoT revolution! We need to figure out packet sizes first
Researchers test 802.15.4 and find we know nuh-think! about large scale sensor network ops
SanDisk vows: We'll have a 16TB SSD WHOPPER by 2016
Flash WORM has a serious use for archived photos and videos
Astro-boffins start opening universe simulation data
Got a supercomputer? Want to simulate a universe? Here you go
prev story

Whitepapers

Go beyond APM with real-time IT operations analytics
How IT operations teams can harness the wealth of wire data already flowing through their environment for real-time operational intelligence.
The total economic impact of Druva inSync
Examining the ROI enterprises may realize by implementing inSync, as they look to improve backup and recovery of endpoint data in a cost-effective manner.
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?
Mitigating web security risk with SSL certificates
Web-based systems are essential tools for running business processes and delivering services to customers.