https://devblogs.microsoft.com/oldnewthing/20210629-00/?p=105378 Skip to main content [RE1Mu3b] Microsoft The Old New Thing The Old New Thing The Old New Thing * Home * DevBlogs * Developer + Visual Studio + Visual Studio Code + Visual Studio for Mac + DevOps + Developer support + CSE Developer + Azure SDK + IoT + Command Line + Perf and Diagnostics + Dr. International + Notification Hubs + Math in Office * Technology + DirectX + PIX + SurfaceDuo + Startups + Sustainable Engineering + Windows AI Platform * Languages + C++ + Java + Java Blog in Chinese + JavaScript + PowerShell Community + PowerShell Team + Python + Q# + TypeScript + Visual Basic + Visual C# + Visual F# * .NET + .NET + ASP.NET + NuGet + Xamarin * Platform Development + #ifdef Windows + Apps for Windows + Azure Depth Platform + Azure Government + Bing Dev Center + Microsoft Edge Dev + Microsoft Azure + Office 365 Development + Old New Thing + Windows MIDI and Music dev + Windows Search Platform * Data Development + Azure Cosmos DB + Azure Data Studio + Azure SQL + OData + Revolutions R + SQL Server Data Tools * More [ ] Search Search Cancel What should the CPU usage be of a fully-loaded CPU that has been throttled? Raymond Chen Raymond June 29th, 2021 For simplicity, let's say you have a single-CPU system that supports "dynamic frequency scaling", a feature that allows software to instruct the CPU to run at a lower speed, commonly known as "CPU throttling". Assume for this scenario that the CPU has been throttled to half-speed for whatever reason, could be thermal, could be energy efficiency, could be due to workload. Finally, let's say that there's a program that is CPU-intensive, calculating the Maldebrot set or something. The question is: What percentage CPU usage should performance monitoring tools report? One theory is that this should report 100% CPU usage, because that CPU-intensive program is causing the CPU to consume all of its available cycles. Another theory is that this should report 50% CPU usage, because even though that CPU-intensive program is causing the CPU to consume all of its available cycles, it is not consuming all off the cycles that are potentially available. The argument for the first point of view is that if your system is acting sluggish, or you hear the fan turn on, you want go to a performance monitor tool and see that, "Oh, program X is using 100% CPU, that's the problem." If the system had used the second model, you would see that program X is using 50% CPU, and you would say, "Well, that's not the problem, because there's still 50% CPU left for other stuff," unaware that the other 50% of CPU capacity has been turned off due to throttling. While I sympathize with this point of view, I feel that reporting the CPU usage at 50% is a more accurate representation of the situation. If the CPU were reported as a percentage of current available resources, then performance monitoring tools would not only have to record the history of the process's CPU usage, but they would also have to record the history of the system's throttling behavior, in order to get an accurate assessment of how much CPU the program was using over time. In the above diagram, the blue line represents the maximum CPU currently available due to throttling, and the red line represents CPU usage as an absolute amount. At the start of the trace, the CPU is running at full power, and the program is using around 65% of that. The program's CPU usage slowly drops, and when it gets low enough, the CPU is throttled down to 50% of maximum. The program's CPU usage remains low for the remainder of the scenario, settling at around 35% of maximum CPU, or 70% of relative CPU. What you expect to see in your CPU usage graph when analyzing the performance of the program is that it starts out using a lot of CPU (65%) and gradually drops to around 35%. But suppose CPU usage percentage were relative to current CPU throttling. The graph would start out at around 65% like before, since the CPU is not being throttled. The CPU usage would slowly drop, as before, but when the system throttles the CPU down to 50%, the CPU usage graph would spike up, since its 35% usage of maximum CPU is 70% of available CPU. If you weren't aware of this change in system CPU throttling, it would look like something happened in your program that caused its CPU usage to jump up suddenly, and remain high for the remainder of the scenario, when in fact the program's CPU usage was low for the remainder of the scenario! Here's another way of looking at it: Suppose the program's CPU usage was capped by something other than throttling. For example, maybe it's in a job that is capped to 20% CPU. The program is using all the CPU it can, but the system limits it to 20% of the total. Should this be reported as a program running at 100% CPU? It's using all of the CPU it has available to it, after all. Related reading: Why your CPU usage is hovering at 50%. Raymond Chen Raymond Chen Follow Tagged Other Read next 2021 mid-year link clearance A collection of stuff that has accumulated. Raymond Chen Raymond Chen June 30, 2021 0 comment 17 comments Leave a commentCancel reply Log in to join the discussion. * Page 1of comments * Page 2of comments * Next comment * Avatar Brian Boorman June 29, 2021 8:01 am collapse this comment The only correct answer is to hire Dave Plummer back on a contract assignment to update Task Manager to show "Current CPU Performance" (or some other appropriate name) that displays the current CPU voltage/frequency performance as a percentage of maximum performance. Or add a line to the CPU graph showing current CPU throttling versus load like the first graph in your article. Log in to Reply + Avatar Alex Martin June 29, 2021 8:50 am collapse this comment And while he's working on that he might as well change some window class names... Log in to Reply * Avatar Hong Lou Tou June 29, 2021 9:14 am collapse this comment So a negatively throttled (e. g. overclocked, Turbo Boost(tm)ed) CPU will report 100% utilization and still have unused time slices? Log in to Reply + Avatar Oleg Mikhailov June 30, 2021 7:07 am collapse this comment Good point. There is no strict frequency limit for modern CPUs and this makes second approach simply impossible to implement, so, there is nothing to discuss. Log in to Reply * Valts Sondors Valts Sondors June 29, 2021 9:15 am collapse this comment What about other reasons why a CPU might not be performing optimally? Say, you're running a memory-intensive program which processes a lot of data that is in the RAM. I dunno, video encoding maybe? The point being - the CPU spends a lot of its time stalled, waiting for data to arrive from RAM (or maybe synchronizing between cores). It's not doing useful work, but it's also not available for other tasks. Should this count as 100% busy? Log in to Reply + Raymond Chen Raymond ChenMicrosoft employee June 29, 2021 9:36 am collapse this comment While the CPU is stalled, other hyperthreaded processors on the same core can run, so the CPU capability is still available. If all hyperthreaded processors are stalled, then the CPU cannot do anything, so it is at 100% capacity, even though it also isn't making progress. Log in to Reply o Avatar anonymous June 30, 2021 2:51 pm collapse this comment this comment has been deleted. Log in to Reply * Avatar Piotr Siodmak June 29, 2021 10:59 am collapse this comment Depends on what question is the user asking. Who started using up more CPU about 5 seconds ago when the fan stated going vrooooom? - The per-process CPU usage graph should not change relative to Max CPU. How is the system handling my CPU usage? Did the web browser started being choppy 5 seconds ago because the system started throttling or is it because someone suddenly hogged the whole CPU? - again not relative to Max CPU, with the Max CPU as a separate graph to see if it changed. Those are historical values - you look at a set of data over time. There is also the immediate value. This one should be relative to Max CPU, because it answers the question "Who is using the most of my CPU" and "How much CPU do I have available", or rather "Are things slow, because I ran out of CPU". This one is not graphed. What other questions could a user ask when looking at CPU usage? Log in to Reply * Avatar Letao Wang June 29, 2021 1:46 pm collapse this comment Doesn't this depend on what colored glasses you're wearing? With CPU-colored glasses, you'd want to know things like are there free CPU cycles available to run other threads, who is responsible for using up available CPU cycles, etc. In that context, reporting in terms of currently available cycles gives an intuitive answer. With program-colored glasses, what you said in the article is true, and reporting in terms of maximum potential cycles gives an intuitive answer. Log in to Reply * Aaron Margosis Aaron Margosis June 29, 2021 2:42 pm collapse this comment Task Manager's CPU numbers are all but meaningless https://aaron-margosis.medium.com/ task-managers-cpu-numbers-are-all-but-meaningless-2d165b421e43 Log in to Reply * Avatar Jeff Stokes June 29, 2021 5:15 pm collapse this comment https://illuminati.services/2021/03/17/ windows-10-task-manager-cpu-inaccurate-a-tale-of-two-metrics/ Log in to Reply * IS4 IS4 June 30, 2021 3:09 am collapse this comment I think it depends on what kind of throttling we are talking about. When I decrease the power consumption of the CPU in the Windows settings, it obviously decreases its speed, but the CPU usage of all processes as reported is unaffected, since all processes are equally affected. However, if this did something else, like setting the minimal value for idle time, thus affecting only processes over the limit, you'd probably want all the usages plus idle to sum up to 100 %. Log in to Reply * Avatar Mike Morrison June 30, 2021 8:58 am collapse this comment "If the system had used the second model, you would see that program X is using 50% CPU, and you would say, 'Well, that's not the problem, because there's still 50% CPU left for other stuff,' ". Who looks at task manager, sees a process using 50% CPU, and thinks "nah, that's not the reason for the slow performance"? Sure, the process may be using 50% CPU for a reason, but still, if the system is running slowly, then such a process would be a prime candidate for an investigation. Log in to Reply * Erik Johnson Erik Johnson July 1, 2021 12:48 pm collapse this comment If displaying "usage relative to 100% CPU" is misleading in one way, and displaying "usage relative to current CPU capability" is misleading in a different way, then we obviously are looking at the problem in the wrong way. It's not a data problem, it's a presentation problem. In my NSH opinion, the correct way to reflect this is to keep all usages relative to 100% and to create a pseudo-task in the display that is assigned all CPU resources that have been removed from availability. That would mean that the display in your example would show 50% usage by "Thermal CPU Throttling" and 35% by "Active Task" for a displayed total of 85%, which reflects the reality that only 15% of the CPU is available for use. Shading the "Throttling" pseudo-task differently would make this clearer, but is not required. If one doesn't want to use a pseudo-task, then the current graph in Resource Manager implied a different way. It displays available CPU as a blue line overlaying the graph; if this was filled in above as "unavailable" or "throttled" or whatever, in the same visual style that fills below the green line as the total of active tasks, then the display would be intuitively correct - the non-filled area is available and the filled area is not. Either way, the task usage display can remain a simple reflection of core time allocated, while the user can correctly attribute behavior between user tasks, the thermal support of their system, or other background tasks or system services. Log in to Reply * Page 1of comments * Page 2of comments * Next comment Archive July 2021 June 2021 May 2021 April 2021 March 2021 February 2021 January 2021 December 2020 November 2020 October 2020 September 2020 August 2020 July 2020 June 2020 May 2020 April 2020 March 2020 February 2020 January 2020 December 2019 November 2019 October 2019 September 2019 August 2019 July 2019 June 2019 May 2019 April 2019 March 2019 February 2019 January 2019 December 2018 November 2018 October 2018 September 2018 August 2018 July 2018 June 2018 May 2018 April 2018 March 2018 February 2018 January 2018 December 2017 November 2017 October 2017 September 2017 August 2017 July 2017 June 2017 May 2017 April 2017 March 2017 February 2017 January 2017 December 2016 November 2016 October 2016 September 2016 August 2016 July 2016 June 2016 May 2016 April 2016 March 2016 February 2016 January 2016 December 2015 November 2015 October 2015 September 2015 August 2015 July 2015 June 2015 May 2015 April 2015 March 2015 February 2015 January 2015 December 2014 November 2014 October 2014 September 2014 August 2014 July 2014 June 2014 May 2014 April 2014 March 2014 February 2014 January 2014 December 2013 November 2013 October 2013 September 2013 August 2013 July 2013 June 2013 May 2013 April 2013 March 2013 February 2013 January 2013 December 2012 November 2012 October 2012 September 2012 August 2012 July 2012 June 2012 May 2012 April 2012 March 2012 February 2012 January 2012 December 2011 November 2011 October 2011 September 2011 August 2011 July 2011 June 2011 May 2011 April 2011 March 2011 February 2011 January 2011 December 2010 November 2010 October 2010 September 2010 August 2010 July 2010 June 2010 May 2010 April 2010 March 2010 February 2010 January 2010 December 2009 November 2009 October 2009 September 2009 August 2009 July 2009 June 2009 May 2009 April 2009 March 2009 February 2009 January 2009 December 2008 November 2008 October 2008 September 2008 August 2008 July 2008 June 2008 May 2008 April 2008 March 2008 February 2008 January 2008 December 2007 November 2007 October 2007 September 2007 August 2007 July 2007 June 2007 May 2007 April 2007 March 2007 February 2007 January 2007 December 2006 November 2006 October 2006 September 2006 August 2006 July 2006 June 2006 May 2006 April 2006 March 2006 February 2006 January 2006 December 2005 November 2005 October 2005 September 2005 August 2005 July 2005 June 2005 May 2005 April 2005 March 2005 February 2005 January 2005 December 2004 November 2004 October 2004 September 2004 August 2004 July 2004 June 2004 May 2004 April 2004 March 2004 February 2004 January 2004 December 2003 November 2003 October 2003 September 2003 August 2003 July 2003 Relevant Links I wrote a book Ground rules Disclaimers and such My necktie's Twitter Categories Code History Tips/Support Other Non-Computer Stay informed Login Insert/edit link Close Enter the destination URL URL [ ] Link Text [ ] [ ] Open link in a new tab Or link to existing content Search [ ] No search term specified. Showing recent items. Search or use up and down arrow keys to select an item. Cancel [Add Link] Code Block x Paste your code snippet [ ] Cancel Ok What's new * Surface Laptop 4 * Surface Laptop Go * Surface Go 2 * Surface Pro X * Surface Duo * Microsoft 365 * Windows 10 apps * HoloLens 2 Microsoft Store * Account profile * Download Center * Microsoft Store support * Returns * Order tracking * Virtual workshops and training * Microsoft Store Promise * Financing Education * Microsoft in education * Office for students * Office 365 for schools * Deals for students & parents * Microsoft Azure in education Enterprise * Azure * AppSource * Automotive * Government * Healthcare * Manufacturing * Financial services * Retail Developer * Microsoft Visual Studio * Windows Dev Center * Developer Center * Microsoft developer program * Channel 9 * Microsoft 365 Dev Center * Microsoft 365 Developer Program * Microsoft Garage Company * Careers * About Microsoft * Company news * Privacy at Microsoft * Investors * Diversity and inclusion * Accessibility * Security English (United States) * Sitemap * Contact Microsoft * Privacy * Manage cookies * Terms of use * Trademarks * Safety & eco * About our ads * (c) Microsoft 2021