Often you need quite a lot of power (more than 100 watts) to run an x86-64 server with decent performance. However, it is possible, with the right hardware and configuration, to run an x86-64 server, including the mains adaptor, on as little as six watts. That’s just 25 milliamps on standard UK 240V mains.
This is also possible to do without some of the drawbacks that you get with smaller devices like the Raspberry Pi, such as being restricted to programs that have been compiled to ARM. This means a highly versatile device can be left on, all the time, with minimal expense.
Power Draw
Here is a picture of the normal power draw:
x86-64 Server Idle Power Draw
The ‘server’ attached to this power monitor is an HP T510 — a highly efficient and very specific Thin Client model, repurposed as an always-on server, with extra configuration to save even more power. It doesn’t use an AMD or Intel chipset; it contains a dual-core VIA x86-64 CPU, with completely compatible instructions, and therefore is capable of running the same software.
Thin Clients are often more powerful, faster, and much more flexible than expected. They can also be obtained second-hand from businesses, for as little as £15 delivered. They have your usual input and output ports, and behave just like a PC, because they are simply lightweight PCs in a smaller box.
Uses of Linux on Thin Clients
By reusing an old Thin Client, and repurposing it with a custom build of Tiny Core Linux (with a slight modification so it doesn’t write to the disk), it is quite possible to run your favourite server software, like:
- A Samba (Windows file share) server
- An HTTP/HTTPS server
- An FTP/SFTP server
- A VPN server
- An SSH server
- An email server
- A very power-efficient Remote Desktop terminal
Alternatively, you might want to use it at home as:
- A retro gaming console (emulation or native)
- A streaming TV box (with sufficient power or hardware-accelerated video decoding)
- …and lots more.
With care, and the right device, you can do all this at very little cost. If Tiny Core Linux doesn’t offer the package you need, it’s quite easy to build the functionality on a Virtual Machine, put it in a package, and then install it on the real system.
Preventing Wear And Tear
Thin Clients usually have no moving parts, not even a fan, so there is almost nothing to wear out. The exception is the flash storage module (called a DOM — Disk-On-Module) which are nearly always small printed circuit boards plugged directly into the SATA/IDE interface. These do have a very limited lifespan, and are not meant to handle the number of writes regular flash storage can. This means steps have to be taken to protect them, and that is why these devices usually come with ‘Disk Write Filter’ utilities.
Some high-end Thin Clients contain a cooling fan. I do not recommend these as they use extra power, have a proprietary part that can wear out, and will require occasional cleaning.
Saving More Power
Usually the T510 Thin Client will run at 8 watts idle (i.e. 0% CPU usage), assuming the keyboard and mouse isn’t connected. We can get this down to 6 watts by turning off parts of the chipset and running the device ‘headless’. We can:
- Force the 1Gbe Ethernet speed down to 100Mbps or possibly 10Mbps.
- Disable display output using a ‘DPMS Off’ command, and instead log in via SSH. This also turns off parts of the video chipset.
- Ensure the boot sequence is minimised and only required applications are loaded.
- Ensure prolonged background CPU time is 0%, or as close as you can get.
- Ensure buggy applications don’t cause overall memory usage to creep up, as that empties the block cache and exhausts resources for other applications. If an application or service does misbehave in this way, restart it periodically using cron.
Now we will save those extra 2 watts!
Disabling the Display
If you’ve set up SSH to log in, you might want to turn the display off to save power. To do this, install vbetool
:
tce-load -wi vbetool
To turn the screen off and disable display output, you can run this command. Note that you should not include sudo if you are placing it as part of your boot sequence:
sudo vbetool dpms off
Reducing Network Chipset Power
This is much the same as disabling the display. Firstly, install ethtool
:
tce-load -wi ethtool
To force auto negotiation off, and switch to 100Mbit mode, run:
sudo ethtool -s eth0 speed 100 duplex full autoneg off
Implementing these improvements enables the device to reach the aforementioned 6-watt power consumption.
The Device
Here is a picture of the attached device:
x86-64 Server in a Thin Client