Using Laptops as Blackout-Proof Servers

I live in the country, and the power goes out from time to time, so I like having an extended-run UPS. For my work to continue without interruption, I need to power my DSL link, my server, and the system at my desk. The less power these consume, the longer I can keep working, using only the power provided by my UPS system.  My target is four hours, which would get me past most power outages without having to lift a finger. Beyond that, we’d be firing up the generator for other reasons anyway.

I’ve been using a laptop as my “desktop” computer for some time. I still use my two big external monitors, external keyboard, and external mouse, but they’re plugged into a laptop computer. All the stuff at my desk adds up to about 50 watts.

It occurred to me that I could use another laptop as my fileserver, retiring the tower-case server I was using before, I could cut the power required by this and my DSL modem to about another 50 watts.

Basic Blackout-Proof Server Concepts

  • The laptop’s battery is not a major consideration. Yes, a laptop is a pretty self-contained entity, and can power anything you plug into its expansion slots and most of the things plugged into its USB ports. But until I can find a VDSL modem that can power itself from a laptop’s USB port, I’m off the air if my only power source is the laptop’s battery. So while I’m keeping an eye out for such a device, right now I’m designing around the UPS’s battery power, not the laptop’s.
  • The whole chain from the VDSL modem to my desktop has to stay up. This includes my server and a couple of Ethernet switches.
  • WiFi also has to stay up, to make my phone happy and keep the rest of the family from coming after me with a meat cleaver.
  • The setup has to be generator-friendly, for extended blackouts.
  • Inexpensive. While one can always justify spending money with a productivity argument, I still don’t want to spend much.

Setting up the UPS System

I’ve gone through a lot of UPS systems, so I can offer some guidelines:

Avoid Consumer-Grade UPS Systems

I have two APC Smart-UPS systems from 1994: more than twenty years old! My newest UPS is an APC Smart-UPS system from 2004: more than ten years old. The commercial-grade UPS systems last forever. (None of them are on their original batteries, of course.)

But I’ve also had a number of Belkin, APC Back-UPS, and APC Back-UPS Pro systems, and they’re all long gone. So buy Smart-UPS systems, or the equally robust offerings from APC’s competitors. (I’m told Eaton makes some good products.)

Run Time = Battery Weight / Power Consumption

The things that will determine how long your UPS can keep things going are how many pounds of batteries it has and how low your power consumption is. Teeny-tiny batteries won’t cut it. Also, lead-acid batteries in true sine-wave UPS systems are monstrously heavy, in terms of pounds per hour of run time, compared to your laptop’s batteries. Fact of life.

For example, let’s take the APC Smart-UPS 700XL/750XL and 1000XL, which use the same batteries and have the same runtime at low load. At 50 watts (my target load) and new-ish batteries, their runtime is 250 minutes, which is ten minutes longer than my target of four hours.

And what does such a UPS weigh? Over 60 pounds!

According to an old APC run-time chart, here’s what you can expect at 50 watts from different Smart-UPS models:

Smart-UPS Model Run Time at 50 VA (minutes)
 700XL, 750XL, 1000XL  250
 2200  366
 1400 251
 1000  150
 700  140
 450  100

Not surprisingly, extra-long-duration models, the XL series are the models of choice. To get similar run times in non-XL models, you need something designed more to power enormous loads than to last a long time.

In addition, the XL models support external battery packs. A single battery pack more than triples the run time, to 14.5 hours at 50 watts! And you can string up to ten battery packs if your wallet can stand it, for more than four days of run time.

Buy a Used UPS and Aftermarket Batteries

  • Many people are eager to discard an entire UPS when the batteries fail, so used UPS systems are inexpensive.
  • Also, most UPS failures are really battery failures, but often they seem like something else. Never toss out a UPS until you’ve tested it with known-good batteries, but be aware that other people toss out UPS systems all the time. You can often get them for free!
  • The idea that “I can get a new UPS for only a little more than a new set of batteries” is an artifact of grotesquely overpriced batteries by manufacturers like APC, and has little to do with reality.
  • In short: never buy a new UPS. Never buy replacement batteries from APC.
  • UPS batteries tend to fail after 2-5 years. Some batteries are better than others, but I’m looking at my collection of dead batteries, and I don’t see a lot of evidence for preferring one brand to another, except that the APC batteries of twenty years ago seem a lot better than their current ones.
  • Batteries often swell as they fail, making them stick inside the UPS. I use WD-40 to help get them unstuck. Sometimes I have to partly disassemble the UPS case.
  • Swollen batteries often crack as well. Fortunately, these aren’t flooded-cell batteries, so they don’t leak much. Still, use precautions as if they were car batteries: wear eye protection at least.
  • Some replacement batteries come with any necessary connectors and usually cost a little more. Some expect you to reuse your old ones. Pick your poison.
  • Some people online make a big deal about UPS battery safety, as if they’d never handled a car battery. If you know how to handle a car battery, do that. Otherwise, find out. You need to know these things.
  • I’ve used all of the following combinations: buying a UPS new (locally and by mail-order), buying a refurbished UPS that shipped with new batteries, buying a used UPS by mail-order without batteries (don’t pay someone to ship you dead batteries!), buying a used UPS with dead batteries locally, buying batteries by mail-order, buying batteries locally. For me, it comes down to total price. Availability isn’t an issue, since these units and batteries are easy to find.

Setting up a Laptop as a Server

Here are my considerations in setting up a laptop server:

  • Reasonable speed. Frankly, I’m not putting serious demands on my fileserver, and almost any laptop will do. I chose a Lenovo Thinkpad T400 because I had a couple lying around. These dual-core, 8 GB RAM systems have more than enough horsepower for my purposes.
  • Reliability. I have 100% hardware redundancy (though the second system is not actually set up in a high-availability configuration). I also used mirrored drives, mounting the second one in the DVD bay. That gives as much speed and reliability as the system is capable of delivering.
  • Dual Ethernet ports. Personally, I like having the nasty, scary Internet and my local LAN on entirely separate networks. I use CardBus Ethernet cards for the second port, though a USB-based port is also an option. Using the laptop to separate my LAN from the Internet is one reason why my server needs to stay up during power outages: if it goes down, there’s no connectivity. That’s a tradeoff I chose to make.
  • BIOS auto-boot support. My T400 laptops don’t support rebooting when power returns, so once they run out of juice, they’ll stay off. This feature was added to the Thinkpad T series with the T420. I plan to deal with the issue by using the wake-on-LAN feature in my WiFi access point. When the access point boots, it should then boot the laptop through WOL. Haven’t tried it yet, though.
  • CentOS Linux with OpenVZ. Pick your poison. Most of my Linux experience is with servers and network appliances, which tends to mean CentOS, and I like the OpenVZ virtualization environment because it’s fast and suits my purposes.
  • UPS monitoring software. I use APC Smart-UPS boxes, so I use the free apcupsd package to monitor them. Not that, for this use case, monitoring is all that necessary. Set the laptop to shut itself down when its own internal battery runs low, and you don’t really need to monitor the UPS at all.

Dealing with Power-Hungry Equipment

That’s fine for my DSL modem and server laptop, but what about my other computers? I put these on a different UPS. For these computers, using a UPS monitoring program is a good idea, so they’ll shut down automatically when the UPS starts running out of steam. The free PowerChute and apcupsd programs let you do this.

Generators and UPS Systems

I find that the SmartUPS systems shine when used with a generator. Ordinary UPS systems switch over to battery whenever the generator voltage is too high or too low. I’ve seen them spend so much time on battery that they can’t charge off the generator. The SmartUPS systems automatically adjust to high and low voltage with their SmartBoost and SmartTrim features, making them trouble-free even on a blinky, maxed-out generator.

I had to stop using a couple of UPS systems that I was otherwise happy with, just because they didn’t play nice with my generator.

Using Conventional (Flooded-Cell) Batteries

UPS batteries are no-maintenance, spill-proof batteries, and these are 5-10 times as expensive as flooded-cell RV batteries. (RV batteries are the same technology as car batteries, but handle deep discharge better.) Many people, including me, have used such batteries with their UPS systems. I wrote about this back in 2008 in a blog post called The Extended-Run UPS Trick.

Using RV batteries worked just fine, actually, with the following caveats:

  • UPS batteries need to be charged to a higher voltage than RV batteries, and the excess voltage causes evaporation from the RV batteries. I had to add something like half a gallon of distilled water per battery a couple of times per year. I often forgot to do this.
  • This outgassing takes a bit of acid with it. My batteries were under a metal desk, and the underside of the desk had rusting and peeled paint in the areas closest to the batteries. (No fair! I paid ten bucks for that desk!)
  • The usual safety precautions for deep-cycle batteries need to be observed. Sites that talk about solar collectors will have lots of information about this.
  • I only tried this on commercial-quality UPS systems like the Smart-UPS. Unlike el cheapo systems that expect to run only a few minutes as your PC shuts down, these have fans that can keep the UPS cool indefinitely.

Actually, I’m not sure any of those batteries have gone bad, even after all these years. I just got tired of (not) topping them off with distilled water and chose to cut down my power consumption instead.

Some people have played around with hardware modifications to their UPS systems to lower their charging voltage. This would reduce outgassing and increase battery life.

DC Alternatives

Since it’s easy to find car chargers for laptops and other low-power devices, you can also get rid of the UPS altogether, and just use a battery and a battery charger. The battery charger will need to produce more output than you need for your electronics, or it won’t be able to charge your battery.

For very little money you can get 12V laptop adapters and power adapters for all your devices. If you have some 5V devices, you can even run them off USB ports! See some ideas below. (Keep in mind that I haven’t tried this.)

Leave a Reply

Your email address will not be published. Required fields are marked *