The energy crisis requires a comprehensive analysis of electricity consumption in search of potential savings in university facilities.
The several dozen desktop PCs at the chair, which are used daily by both students and scientific staff, came into focus. Since remote access (e.g. via SSH) has become a central requirement, not only due to the pandemic, these systems have been operated permanently for continuous availability. Many of the peripherals used already have energy-saving technologies that are supported by the operating systems as standard, thus making a significant contribution to reducing energy consumption (around 100W savings for a 27-inch monitor in standby mode). However, in order to be able to access remote computers via the network at any time, the standby function of the PC was previously disabled, resulting in consumption of between 30W and 100W per system, depending on the model.
The chair has therefore introduced measures that can remedy this shortcoming with negligible effort on the part of the users.
In the mid-90s, the Wake-On-LAN standard was introduced for network cards, with which a computer can be started (or woken up from a sleep state) via a special magic packet. This standard has become widely established, the option usually only has to be activated in the BIOS/UEFI as well as the network adapter.
Afterwards, the network adapter waits for the 102-byte magic packet, a datagram which must contain the own hardware address (MAC). Since the MAC for a hostname is usually not known on the user side, and this packet can also only be sent within a network (and not just over the internet), we have implemented a service that handles these two steps: The service receives the hostname, uses the configuration data of the DHCP server to determine the target hardware address and sends the magic packet into the target network – thus this has very low-maintenance effort and no data duplication is required.
For the user, the command line client wake is available, which transmits the hostname passed as a parameter to the server and thus wakes it up from sleep mode – if the computer is already in operation, the call has no effect. A detailed usage is described on the lab page.
In order to put a computer into sleep mode when it is not being used, the autosuspend service runs on each computer, which checks for active sessions. In addition, sleep mode can be actively inhibited for longer tasks (such as when doing evaluation) using systemd-inhibit. In addition, the computer is regularly woken up for updates, and interruptions are also prevented when the updates are installed.
After internal investigations, we have chosen the suspend-to-RAM sleep mode (S3), in which the working memory is still supplied with power and thus does not lose the data. This results in relatively short wake-up latencies in the range of a few (<5) seconds. The suspend-to-disk sleep mode (S4), on the other hand, takes a significantly longer time to wake up (> 30 seconds) and is more error-prone. The differences in power consumption in both modes are in the milliwatt range and negligible. Overall, the power consumption in sleep mode is less than one watt, which is about one hundredth of the previous power consumption.
The scripts and configuration files used for this are freely available via github.com/i4/wake-on-lan.
As a further step, we have also integrated servers used for research that are not permanently needed into the system. For example, the computers responsible for continuous integration (CI) are put into sleep mode when there are no tasks – and automatically woken up again when needed.