Power you can trust

The Energy Saver pane configured for quick shutdown in the event of mains power outage.

Sudden interruption to a Mac’s power supply can lose data, corrupt hard disks and – preceded by a surge – can even damage hardware. Uninterruptible Power Supplies are inexpensive protection.

A little way down the street there are roadworks. Although in your offices the sound of drills is muffled, it only adds to the pressures of the day. Just as you are about to finish your work, with a couple of hours to spare before the deadline, the workman’s drill cuts into a high-voltage electric cable, and your Mac stops dead in its tracks. Several hours later, when power is finally restored, your Mac is clearly sick, and all trace of the last day’s work has gone.

In the split second before the mains was lost, there was a spike that overwhelmed your computer’s limited protection built into its power supply unit, sending damagingly high voltage into its most sensitive circuits. Your Mac now needs a new motherboard, the hard disk is corrupt, and the project hopelessly overdue – all of which could have been prevented had it enjoyed the protection of an Uninterruptible Power Supply (UPS).

What happens?

Power interruptions are seldom planned, but occur when a sub-station suffers a failure, the proverbial workman cuts through a cable, thunderstorms trip circuit breakers, and for many other reasons. They usually involve voltage spikes that can damage all equipment that is not protected by a good surge filter, reductions in voltage such as noticeable brown-outs, and total loss of supply lasting seconds or hours.

The most vulnerable parts of a computer are its power supply, being the electronics that face mains input directly, complex and expensive circuit boards such as the motherboard or logic board, and hard disks, which are often caught out whilst trying to write vital files. Sod’s (or Murphy’s) law dictates that damage always seems to be worst case.

How to protect

All electronic equipment, other than the cheapest and least important, should therefore be fed through a good filter system to eliminate spikes and surges. If you can afford to lose the equipment completely when the mains supply fails, it does not need a UPS, but can be connected to the filter-only output of a UPS.

Any equipment that must be shut down gracefully, such as computers and networked hard disks (including Time Capsule) need to be fed from the battery-backed output of a UPS, with a control system that shuts the device down when mains power is lost. If you have any servers or other devices that must remain running at all times, then you may also need a standby generator: it is worth noting that UPS that could be fed from such an emergency supply need to be compatible with it.

Planning

The best way to work out what needs to be protected is to walk around and mentally (not physically!) pull the plug on everything electronic: it should not be hard to work out the appropriate level from the worst-case consequences. While you may decide, as many do, that computers operating from networked drives do not need their own UPS, this could incur significant cost if work is not saved regularly over the network to a protected server.

On the other hand laptops that are being used with reasonably full batteries should only need surge protection, as they effectively incorporate their own UPS – a good reason for preferring laptops when working in locations where the mains supply is unreliable.

Which UPS?

When you have identified the need for a single UPS, the next step is to work out the best solution. Some older, cheaper designs of UPS still offer only offline or standby protection, in which they switch from the failed mains to battery source within about 4 milliseconds. However in practice this can prove optimistic, and even with the generally better power supplies fitted in Macs may be insufficient to allow uninterrupted function.

Line-interactive UPS are generally better, and can cope with prolonged brown-outs that can be common in some parts of the world. However most of the best UPS are now full online systems, in which their batteries are charged continuously by the mains supply, and those batteries in turn provide backed-up output power. Disadvantages of online UPS systems are that they generate significant amounts of heat, and they have limited battery lives, typically of a few years.

Capacity

Calculating the capacity required of the UPS is fundamentally simple, but has some catches for the unwary.

Battery capacities are normally stated as VA (Volts times Amps), although sometimes they are given in W (Watts); to convert from VA to W, multiply by 0.67. Look up the current draw in Amps and multiply by mains voltage (230 V in Europe) to determine the VA requirement of each item to be fully protected by the UPS; sometimes manufacturers provide VA or W requirements, or both.

Apple normally quotes these in its specifications, but be cautious with desktop systems such as old Mac Pro models, which could contain additional hard disks, graphics and other expansion cards that will push its needs up significantly. If you are unsure, measure steady-state consumption using a power meter, available from good electrical test equipment suppliers.

Watch that you do not use maximum current draw values, which usually apply when a computer is being started up, but typical in-use figures. Total up the VA or W requirements and match them against the performance offered by potential UPS models.

Be careful not to get confused: manufacturers may offer a 550 VA model in name that actually delivers 700 VA or 330 W – hence the importance of working in one or the other unit but not mixing them. Subjected to a full 330 W load, this UPS might be good for just over 3 minutes before its battery will be exhausted, or 14 minutes at a half load of 165 W. This illustrates the value of underloading each UPS if possible.

Deployment

UPS are best supplying single computers, as their support software can then shut the one computer system down when an outage has lasted long enough to drain the battery. Although some systems could be configured to supply more than one computer, doing so normally requires a much more expensive networked UPS of the type designed for server racks, and you cannot use the controls provided in the regular Energy Saver pane.

Testing and maintenance

When you think that your systems are adequately protected, you next need to carry out the ultimate test and see whether they do withstand complete power failure. An untested UPS cannot be relied on to keep your work safe. Some upgrades to OS X have caused UPS control to become unreliable, or to fail altogether, so it is worth repeating this test after each major update to your Mac and its operating system. You must also keep a record of your power calculations and battery capacities for each Mac, so that when you swap a small display for a large Cinema or Thunderbolt model, you can update them and decide whether that necessitates a larger UPS.

UPS batteries do gradually degrade and eventually need to be replaced; although manufacturers often promise savings through battery swap schemes, these can be surprisingly hard to use. Old batteries normally contain lead and must be disposed for special recycling, in accordance with European legislation.

Properly protected, you need never fear the consequences of a workman’s stray drill.

Solution: The single Mac

There is a wide range of different, and quite modestly priced, UPS models aimed at smaller client computer systems. The requirement is also quite straightforward: smaller iMacs draw up to 300 W maximum, large-screen iMacs up to 400 W, new Mac Pros up to 600 W, and high-end old Mac Pros fully stocked up top out towards 950 W. To those you must add any external monitors, external drives, routers, and other essential peripherals.

Your UPS needs accessible sockets – some have standard 3-pin mains-style sockets that save you from having to invest in all new power cables – with sufficient battery-backed outputs and a few with surge protection alone. Most importantly, the UPS must have a USB port with support for your Mac to monitor the power supply and react in the event of mains outage. In most cases, this will be performed through the Energy Saver pane in System Preferences, but you should be healthily sceptical as to whether this will actually work.

The Energy Saver pane configured for quick shutdown in the event of mains power outage.
The Energy Saver pane configured for quick shutdown in the event of mains power outage.

As with all backup and emergency systems, you must try it out to verify that the pane is more than a pretty interface. Set the UPS sliders so that your Mac should shut down after being on UPS power for just a minute or two, quit all open applications, ensure that Time Machine is not running or due to kick in, then turn off the mains switch for the UPS supply, leaving your Mac and peripherals running from the UPS battery.

Keep an eye on your watch, and see whether the battery level starts to drop as it should, and that shutdown occurs. Depending on the model of UPS and the version of OS X that you are running, you may find a different setting more successful, but there is little point in relying on a UPS that cannot shut your Mac down when the mains supply is lost.

Solution: The server

When you are fitting out a room to contain racked servers, power supply will be a major design consideration that should be trusted to experienced engineers. The biggest problems occur when you start off small, with a single server, and grow gradually to a fully populated rack or two. The chances are your UPS cover will be a complex patchwork, and when tested you may discover servers that do not shut down at all because they are not monitoring their UPS.

There is nothing to stop you from protecting a few servers with suitably capacious and reliable USB-based UPS systems. Xserves and similar rack-mouted systems typically run at 250 to 500 W peak consumption, and are relatively easily covered. But when you start adding in network storage, enterprise-standard switches, and the other paraphernalia of larger networks, the power required rises considerably, and the complexity of monitoring and control becomes excessive.

Larger server suites and networks therefore generally prefer heavyweight UPS systems that have network interfaces. Monitoring and response to mains outage is then incorporated into the overall network monitoring service, perhaps implemented in Nagios or an SNMP-based tool.

IP failover was a key feature in OS X Server on Xserve hosts, where you could harness two servers in tandem so that if the master fails, its secondary system will take over the job. Setting up a pair of servers to ensure this works properly can be fiddly, but also needs to be reflected in the provision of backup power. There would be little point in supplying both servers from the same UPS, and if possible they should be on separate mains circuits altogether.

Unless your premises have lots of space, your servers are likely to be packed into the smallest and least well-conditioned cubbyhole that is grudgingly given up. Ensure that it has at least a low-level cold air inlet, and a high-level warm outlet, well separated. Monitor air temperatures carefully within the suite, as well as internal temperatures using an appropriate app.

Updated from the original, which was first published in MacUser volume 26 issue 10, 2010.