Getting Enough Sleep

June 17, 2010

Back in the early days of PCs, when MS-DOS more or less ran the world, reducing computers’ energy consumption was fairly simple: like incandescent lamps, you turned PCs off when they were not being used.  (I remember the educational effort we had to put forth, when we first introduced networked UNIX workstations, to teach users not to just switch them off.)    Today, most people leave their machines on almost all the time, especially if the are networked; in enterprise networks, this is often required to allow applications for backups, network management, malware scanning, and the like to run.  Modern hardware generally has the ability to go into “sleep mode”, which substantially reduces energy consumption, but this is hard to monitor or manage if done on a machine-by-machine basis.

A new report from Microsoft Research discusses an interesting approach to managing sleep.  Instead of relying on individual sleep settings on each machine, they set out to design a sleep management system that will work across a network segment.  The research is described in a paper to be presented at the annual USENIX technical conference in a few days; you can download the paper here [PDF].   The system that the team developed and deployed has two main components:

  • A sleep notifier process that runs on each of the clients whose slumber is to be managed.  When the client is about to go to sleep, it notifies the other component,
  • A sleep proxy application, which runs on a dedicated machine on the same network segment as the clients.  This machine monitors network traffic on behalf of the sleeping clients, and wakes them when something requires their attention.

In essence, when the client is about to go to sleep, usually because a stated time interval has elapsed with no activity, the following occurs:

  1. The sleep notifier on the client tells the sleep proxy that the client is going to sleep.  The notification also specifies which TCP ports the clients is listening on.
  2. The sleep proxy uses ARP probes to assume the sleeping clients IP address.
  3. The sleep proxy monitors network traffic directed to the client; if it sees traffic that the client needs to handle (e.g.,  a TCP SYN request on an active port), it sends the client a “wake on LAN” packet.  The original requestor will re-send the request when the original times out, and the client will then respond as usual.

The idea is a clever one.  Some current network cards have a limited ability to filter traffic intended for a sleeping machine, and “awaken” it only for certain types of packets.  In this case, since the sleep proxy is running on a general-purpose computer, it can accommodate fairly complex rules (which might, for example, be time-of-day dependent); it also, of course, allows for monitoring of how much sleep is actually achieved, and what events may cause some machines to suffer from “insomnia”.  (The team found that, on their network, IT’s network applications, like malware scanning, accounted for most of the “wakefulness” observed.)

The specific implementation tested does have some areas for improvement.  It produces a noticeable delay when a client machine first wakes from sleep, although most of this is due to the time the client itself takes to wake up.  It also, currently, only handles TCP traffic; some modifications would be necessary to handle UDP-based applications.

Still, this is interesting work.  Managing energy consumption is a relative newcomer to the list of IT management concerns.  Tools that help us understand how to do this job better are potentially quite valuable.


Follow

Get every new post delivered to your Inbox.

Join 30 other followers

%d bloggers like this: