cpu PC tools

Open-source tool designed to throttle PC and server performance based on electricity pricing — will automatically limit clocks during peak hours

eSIM Studios
Wednesday, April 02, 2025
0 Comments
Home
cpu
PC
tools
Open-source tool designed to throttle PC and server performance based on electricity pricing — will automatically limit clocks during peak hours

A robotics and machine learning engineer has developed a command-line interface tool for monitoring smart plug power usage and dynamically adjusting system performance based on electricity pricing. This program, WattWise, originated from the engineer's need to manage the power consumption of a high-performance computing workstation equipped with a dual-socket EPYC processor and four GPUs. The initial release includes the power monitoring component, with the performance management features planned for future release.

The inadequacy of existing solutions, such as the Kasa Smart app and Home Assistant dashboard, prompted the development of this terminal-based utility. Leveraging the existing terminal monitoring tools (htop, nvtop, and nload), the engineer created a system that integrates with Home Assistant and TP-Link to display real-time power usage (wattage and current) and historical consumption charts. A key feature is the automated throttling of CPU and GPU performance.

The system is designed to mitigate the impact of Time-of-Use (ToU) electricity pricing. By reducing the CPU frequency from 3.7 GHz to 1.5 GHz, the engineer achieved a power reduction of approximately 225 watts from a maximum load of 1400 watts. Further power savings are anticipated through GPU throttling, although specifics are not yet available.

Performance results are hardware-dependent; servers, for example, typically consume significantly more power than even high-end gaming desktops.

Power Optimizer control flow

(Image credit: Naveen Kulandaivelu)

WattWise dynamically adjusts system clock speed based on real-time system load, smart plug-reported power consumption, and time-of-use pricing. A Proportional-Integral (PI) controller manages power consumption, adapting system parameters according to these three variables.

Currently, the application supports a single Kasa-brand smart plug. Future development includes multi-plug support, expanded smart plug brand compatibility, integration with other power management solutions, and additional features. While presently a streamlined tool, its simplicity effectively addresses the core functionality.

WattWise is open-source (MIT License) and available on GitHub. Community feedback, contributions, and forking for adaptation to other systems are encouraged. Please note that the current release comprises only the dashboard; the power optimization component remains under development.

Blog authors

No comments