{"id":6894,"date":"2025-05-12T16:27:29","date_gmt":"2025-05-12T23:27:29","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/pix\/?p=6894"},"modified":"2025-05-12T16:48:27","modified_gmt":"2025-05-12T23:48:27","slug":"power-status-cpu-frequency-and-cpu-c-state-counters","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/pix\/power-status-cpu-frequency-and-cpu-c-state-counters\/","title":{"rendered":"Power status, CPU frequency and CPU C-State counters"},"content":{"rendered":"<p>Starting with the <a href=\"https:\/\/devblogs.microsoft.com\/pix\/pix-2505-09\/\">2505.09 release<\/a> of PIX on Windows, new metrics have been added to help you optimize your title on battery powered devices such as tablets and Windows handheld gaming devices.\u00a0 With these counters, you can see whether performance issues in your game can be correlated with power-related events, such as a change in CPU C-state, or a device going into power saving mode, for example.<\/p>\n<p>These metrics are available in System Monitor, and in the Metrics, Comparison, and Budgets layouts in Timing Captures.\u00a0 The following metrics are provided:<\/p>\n<p><strong>System Power Status Metrics<\/strong><\/p>\n<ul>\n<li><strong>AC Power Status<\/strong>. Indicates whether AC power is plugged in. A value of 1 indicates power is plugged in. A value of 0 indicates power is not plugged in.<\/li>\n<li><strong>Battery Life Percentage<\/strong>. A value of 0-100 indicating the current percentage of batter life remaining.<\/li>\n<li><strong>Battery Saver Status<\/strong>. Indicates whether the device is in battery saving mode. Game performance will be impacted when a device is in this mode, as the system will limit the availability of resources to conserve power. A value of 1 indicates battery saver is on. A value of 0 indicates battery saver is not on.<\/li>\n<\/ul>\n<p><strong>Per-Processor Metrics<\/strong><\/p>\n<ul>\n<li><strong>CPU C-State<\/strong>. The current C-State, or Idle State, of the processor. There will be one of these metrics for each processor on the device. The C-State metric indicates states when the CPU has reduced or turned off selected functions to conserve power. Game performance can be impacted by these C-States because i<!--StartFragment --><span class=\"cf0\">t takes longer for the processor to switch to C0 which is the only c-state where code is executing.<\/span><!--EndFragment --><\/li>\n<li><strong>CPU Max C-State<\/strong>. The maximum value for C-State. There will be one of these metrics per processor on the device. The CPU Max C-State provides context when looking at the current C-State.<\/li>\n<li><strong>CPU Frequency<\/strong>. The current frequency in Mhz of the processor. There will be one of these metrics per processor on the device. Higher frequency means more power consumption and faster performance.<\/li>\n<li><strong>CPU Max Frequency<\/strong>. The maximum frequency value to serve as a comparison when looking at the current frequency. There will be one of these metrics per processor on the device.<\/li>\n<\/ul>\n<p>More information about C-States can be found at <a href=\"https:\/\/learn.microsoft.com\/en-us\/previous-versions\/windows\/desktop\/xperf\/p-states-and-c-states\">P-states and C-states<\/a>.<\/p>\n<h3>Timing Captures<\/h3>\n<p>The <strong>System Power Status<\/strong> and <strong>Per-Processor<\/strong> metrics appear in Timing Captures in the Metrics selector panels in the Metrics, Budget and Comparison layouts.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_selector_panel.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-6895\" src=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_selector_panel.jpg\" alt=\"winpix power counters selector panel image\" width=\"274\" height=\"677\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_selector_panel.jpg 274w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_selector_panel-121x300.jpg 121w\" sizes=\"(max-width: 274px) 100vw, 274px\" \/><\/a><\/p>\n<p>As a simple example of these metrics, the following Metrics view graph shows how CPU frequency (represented by the green line) can vary based on whether the device is plugged into AC power or not (represented by the red line).<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_metrics_view.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-6897\" src=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_metrics_view.jpg\" alt=\"winpix power counters metrics view image\" width=\"633\" height=\"353\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_metrics_view.jpg 633w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_metrics_view-300x167.jpg 300w\" sizes=\"(max-width: 633px) 100vw, 633px\" \/><\/a><\/p>\n<p>Graphing the PIX CPU event that represents a frame in my game (represented by the blue line) over these power counters shows some interesting correlations.\u00a0 First, there are significant spikes in frame time both when the power is unplugged and then plugged in again.\u00a0 Second, the average frame time appears lower when running on battery power than when running on AC power.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_frame_time.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-6899\" src=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_frame_time.jpg\" alt=\"winpix power counters frame time image\" width=\"621\" height=\"384\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_frame_time.jpg 621w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_frame_time-300x186.jpg 300w\" sizes=\"(max-width: 621px) 100vw, 621px\" \/><\/a><\/p>\n<p>Selecting a time range when the power is unplugged shows an average frame time of ~47ms.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_frame_time_on_battery.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-6901\" src=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_frame_time_on_battery.jpg\" alt=\"winpix power counters frame time on battery image\" width=\"627\" height=\"469\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_frame_time_on_battery.jpg 627w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_frame_time_on_battery-300x224.jpg 300w\" sizes=\"(max-width: 627px) 100vw, 627px\" \/><\/a><\/p>\n<p>Selecting a range of time when AC power is plugged in shows a faster average frame time of ~29ms.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_frame_time_ac.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-6904\" src=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_frame_time_ac.jpg\" alt=\"winpix power counters frame time ac image\" width=\"626\" height=\"415\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_frame_time_ac.jpg 626w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_frame_time_ac-300x199.jpg 300w\" sizes=\"(max-width: 626px) 100vw, 626px\" \/><\/a><\/p>\n<p>The Comparison layout can be used to get more detail about the differences.\u00a0 The following shows a statistical analysis of the difference in frame times for the AC and the battery cases.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_comparison.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-6903\" src=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_comparison.jpg\" alt=\"winpix power counters comparison image\" width=\"629\" height=\"419\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_comparison.jpg 629w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_comparison-300x200.jpg 300w\" sizes=\"(max-width: 629px) 100vw, 629px\" \/><\/a><\/p>\n<h3>System Monitor<\/h3>\n<p>The system power status and per-processor metrics are available in System Monitor, but they aren\u2019t graphed by default.\u00a0 Use the Modify Graphs button to add a new graph with these metrics or to add them to an existing graph.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_sysmon.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-6906\" src=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_sysmon.jpg\" alt=\"winpix power counters sysmon image\" width=\"627\" height=\"556\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_sysmon.jpg 627w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2025\/05\/winpix_power_counters_sysmon-300x266.jpg 300w\" sizes=\"(max-width: 627px) 100vw, 627px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Starting with the 2505.09 release of PIX on Windows, new metrics have been added to help you optimize your title on battery powered devices such as tablets and Windows handheld gaming devices.\u00a0 With these counters, you can see whether performance issues in your game can be correlated with power-related events, such as a change in [&hellip;]<\/p>\n","protected":false},"author":1915,"featured_media":6897,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6894","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pix"],"acf":[],"blog_post_summary":"<p>Starting with the 2505.09 release of PIX on Windows, new metrics have been added to help you optimize your title on battery powered devices such as tablets and Windows handheld gaming devices.\u00a0 With these counters, you can see whether performance issues in your game can be correlated with power-related events, such as a change in [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/posts\/6894","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/users\/1915"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/comments?post=6894"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/posts\/6894\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/media\/6897"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/media?parent=6894"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/categories?post=6894"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/tags?post=6894"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}