{"id":186,"date":"2025-02-16T12:10:32","date_gmt":"2025-02-16T12:10:32","guid":{"rendered":"https:\/\/thevadasan.com\/?p=186"},"modified":"2025-02-16T12:33:22","modified_gmt":"2025-02-16T12:33:22","slug":"optimizing-power-consumption-on-my-home-server-part-1-exploring-powertop","status":"publish","type":"post","link":"https:\/\/thevadasan.com\/?p=186","title":{"rendered":"Optimizing Power Consumption on My Home Server: Part 1 &#8211; Exploring PowerTOP"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Why I Started Investigating My Home Server\u2019s Power Usage<\/h2>\n\n\n\n<p>Running a home server is a great way to self-host services, store data, and experiment with different technologies. However, after monitoring my power consumption, I noticed my server was drawing more power than I expected. To dig deeper, I turned to <strong>PowerTOP<\/strong>, a powerful tool for analyzing power usage on Linux systems. This blog post is the first of a two-part series where I explore how PowerTOP works and how you can use it to optimize power consumption.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is PowerTOP?<\/h2>\n\n\n\n<p><strong>PowerTOP<\/strong> is an open-source Linux tool developed by Intel to analyze and optimize power consumption. It helps identify power-hungry processes, inefficient hardware settings, and offers suggestions to improve battery life (on laptops) or reduce energy usage (on servers and desktops).<\/p>\n\n\n\n<p>PowerTOP provides a real-time view of how power is being used by different components, including the CPU, PCI devices, SATA interfaces, USB devices, and more. It also provides <strong>tuning recommendations<\/strong> that can be applied manually or automatically.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing PowerTOP<\/h2>\n\n\n\n<p>PowerTOP is available in most Linux distributions. To install it, use the package manager for your distribution:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Ubuntu \/ Debian<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">sudo apt update\nsudo apt install powertop<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Fedora<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">sudo dnf install powertop<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Arch Linux<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">sudo pacman -S powertop<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>CentOS \/ RHEL<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">sudo yum install powertop<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Running PowerTOP<\/h2>\n\n\n\n<p>Once installed, you can start PowerTOP with the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">sudo powertop<\/code><\/pre>\n\n\n\n<p>Since PowerTOP needs root privileges to access hardware metrics, running it with <code>sudo<\/code> is necessary.<\/p>\n\n\n\n<p>For better accuracy, you can allow PowerTOP to collect calibration data:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">sudo powertop --calibrate<\/code><\/pre>\n\n\n\n<p><strong>Note:<\/strong> Calibration can take a few minutes, during which your system may experience temporary performance drops as PowerTOP tests different power states.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Navigating PowerTOP<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"739\" src=\"https:\/\/thevadasan.com\/wp-content\/uploads\/2025\/02\/Screenshot-2025-02-16-230918-1024x739.png\" alt=\"\" class=\"wp-image-187\" srcset=\"https:\/\/thevadasan.com\/wp-content\/uploads\/2025\/02\/Screenshot-2025-02-16-230918-1024x739.png 1024w, https:\/\/thevadasan.com\/wp-content\/uploads\/2025\/02\/Screenshot-2025-02-16-230918-300x216.png 300w, https:\/\/thevadasan.com\/wp-content\/uploads\/2025\/02\/Screenshot-2025-02-16-230918-768x554.png 768w, https:\/\/thevadasan.com\/wp-content\/uploads\/2025\/02\/Screenshot-2025-02-16-230918-600x433.png 600w, https:\/\/thevadasan.com\/wp-content\/uploads\/2025\/02\/Screenshot-2025-02-16-230918.png 1141w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>PowerTOP is a terminal-based tool with a <strong>text-based UI<\/strong>. Once launched, you can navigate using the arrow keys or <code>TAB<\/code> key. The tool consists of several tabs:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. Overview Tab<\/strong><\/h3>\n\n\n\n<p>This is the default view when you start PowerTOP. It shows:<\/p>\n\n\n\n<ul>\n<li><strong>CPU usage<\/strong> (how much time the CPU spends in different power states)<\/li>\n\n\n\n<li><strong>Power estimates<\/strong> for various processes<\/li>\n\n\n\n<li><strong>Wakeups per second<\/strong> (indicating what\u2019s keeping your CPU busy)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. Idle Stats Tab<\/strong><\/h3>\n\n\n\n<p>This tab provides information on CPU idle states (<code>C-states<\/code>). Lower power states (C3, C6, C7) save more energy but may introduce latency when waking up. If your CPU isn\u2019t entering deep sleep states, it could indicate a power inefficiency.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. Frequency Stats Tab<\/strong><\/h3>\n\n\n\n<p>Shows how much time the CPU spends at different clock frequencies. If the CPU is frequently running at a high frequency even when idle, it may be consuming unnecessary power.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4. Device Stats Tab<\/strong><\/h3>\n\n\n\n<p>Lists hardware devices (USB, PCI, SATA, network adapters) and their power consumption. This is useful for identifying which hardware components are not power-efficient.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5. Tunables Tab<\/strong><\/h3>\n\n\n\n<p>This is the most important section for power optimization. It provides <strong>recommendations<\/strong> on settings that can reduce power consumption, marked as <code>Good<\/code> (optimized) or <code>Bad<\/code> (needs improvement). Some tunables require manual adjustments, while others can be applied instantly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Next Steps: Applying Power-Saving Settings Permanently<\/h2>\n\n\n\n<p>Now that we understand how PowerTOP works, the next step is to apply its recommendations <strong>permanently<\/strong>. In Part 2 of this series, I\u2019ll walk through configuring power-saving settings to persist across reboots, setting up systemd services, and fine-tuning options for maximum efficiency.<\/p>\n\n\n\n<p>Stay tuned!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Why I Started Investigating My Home Server\u2019s Power Usage Running a home server is a great way to self-host services, store data, and experiment with different technologies. However, after monitoring my power consumption, I noticed my server was drawing more power than I expected. To dig deeper, I turned to PowerTOP, a powerful tool for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":197,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[17,18,34],"tags":[],"_links":{"self":[{"href":"https:\/\/thevadasan.com\/index.php?rest_route=\/wp\/v2\/posts\/186"}],"collection":[{"href":"https:\/\/thevadasan.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thevadasan.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thevadasan.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thevadasan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=186"}],"version-history":[{"count":1,"href":"https:\/\/thevadasan.com\/index.php?rest_route=\/wp\/v2\/posts\/186\/revisions"}],"predecessor-version":[{"id":188,"href":"https:\/\/thevadasan.com\/index.php?rest_route=\/wp\/v2\/posts\/186\/revisions\/188"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thevadasan.com\/index.php?rest_route=\/wp\/v2\/media\/197"}],"wp:attachment":[{"href":"https:\/\/thevadasan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thevadasan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thevadasan.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}