Chapter 6: Energy Efficiency – Designing Green Software
Loading audio…
ⓘ This audio and summary are simplified educational interpretations and are not a substitute for the original text.
Energy efficiency is a critical quality attribute that software architects can no longer overlook, driven by the constraints of mobile and Internet of Things (IoT) devices, where power is severely limited, and the extensive energy consumption of global cloud data centers, which may account for as much as 10 percent of worldwide energy use. Historically, architects rarely focused on software energy consumption, but today, energy is neither free nor unlimited, necessitating an architectural approach to manage this quality attribute. Without system-wide management techniques, developers rely on ad hoc methods, failing to achieve predictable efficiency goals, exacerbated by the fact that many developers and architects are unaware of energy efficiency as a core concern and lack suitable design concepts like models, patterns, or tactics. Addressing energy efficiency involves complex tradeoffs against other qualities such as performance, availability, modifiability, and time to market. The framework for addressing this quality attribute starts with the Energy Efficiency General Scenario, which defines the Source (like an end user or automated agent), the Stimulus (a request to conserve energy), the Artifacts (specific devices or clusters), the Environment (such as runtime or low-battery mode), the Response (actions like disabling services or changing allocation), and the measurable Response Measure (such as total kilowatt hours used). Architectural management relies on a set of tactics grouped into three main categories focused on resource utilization: Monitor Resources includes Metering (collecting real-time energy data via sensors), Static classification (estimating consumption using known characteristics when real-time measurement is infeasible), and Dynamic classification (estimating usage based on transient factors like workload or prior execution data). Allocate Resources tactics ensure mindful assignment of work, featuring Reduce usage (scaling down resources, consolidating Virtual Machines (VMs), or offloading computation from mobile devices to the cloud), Discovery (annotating service requests with energy data to select the most efficient service provider), and Schedule resources (allocating tasks based on energy efficiency, respecting priorities and utilizing monitoring data). A third category, Reduce Resource Demand, complements these by performing less computational work, directly increasing energy efficiency. Furthermore, specific architectural patterns aid implementation, such as Sensor Fusion (intelligently using low-power sensors to determine when to activate higher-power sensors), Kill Abnormal Tasks (monitoring and interrupting excessively power-hungry operations), and Power Monitor (automatically disabling system devices or interfaces that are not actively in use). These concepts underpin a Tactics-Based Questionnaire designed to assess an architecture’s current level of energy efficiency support.