A key problem with this proposal is that modern CPUs do not have a single definitive maximum frequency. You have the base frequency which is rarely relevant outside of synthetic workloads then you have a variety of turbo frequencies which interact in complex ways. AMD's latest CPUs don't even have clear upper bounds on their frequency scaling logic. It's a big black box and the results can vary depending on the workl…
The OS can keep a record over time of the maximum frequency each CPU core has ever hit. This will take into account machine to machine variance, and even environmental factors effecting maximum speed.
What should the CPU usage be of a fully-loaded CPU that has been throttled?
21–30 of 181 posts
Re: What should the CPU usage be of a fully-loaded CPU that has been throttled?
#22So anyway, it is complicated.
Re: What should the CPU usage be of a fully-loaded CPU that has been throttled?
#23Related, 50% CPU usage on a hyper-threaded CPU isn't 50%. It is usually closer to 80-90% depending on the workload. Something to watch out for when monitoring.
Interesting. Does this mean that if you are not going to use all HT threads it's better to turn off HT?
Re: What should the CPU usage be of a fully-loaded CPU that has been throttled?
#24A key problem with this proposal is that modern CPUs do not have a single definitive maximum frequency. You have the base frequency which is rarely relevant outside of synthetic workloads then you have a variety of turbo frequencies which interact in complex ways. AMD's latest CPUs don't even have clear upper bounds on their frequency scaling logic. It's a big black box and the results can vary depending on the workl…
The OS can keep a record over time of the maximum frequency each CPU core has ever hit. This will take into account machine to machine variance, and even environmental factors effecting maximum speed.
Re: What should the CPU usage be of a fully-loaded CPU that has been throttled?
#25Maldebrot set? Just look the word up my dude.
Re: What should the CPU usage be of a fully-loaded CPU that has been throttled?
#26Early throttles were 50% duty cycles, then L1 bubble injections, then V/F frequency scaling. The author only addresses the early mechanisms, but it gets even more complex with the PCUs in the later Xeons.
It is not an easy question to answer, but I think the question can be modified. A single number doesn't solve the problem, you need to know utilization in the context of throttling (and magnitude). Then decide what you are trying to solve: scheduling or app-level throttling? Personally, the Hz denominator should change if it used in utilization , since that covers the majority of cases. Any other case should read both metrics.
EDIT: Removed generalization and worded as anecdote.
Re: What should the CPU usage be of a fully-loaded CPU that has been throttled?
#27I think we can have more nuance than a choice of 50% or 100%. I fall in the 'Show 100%' camp for sure, showing 50% but not indicating why isn't particularly helpful without knowing the background here. I think a separate indicator for an overall throttling condition would be helpful. Show a 100% usage and a throttle indicator together.
Re: What should the CPU usage be of a fully-loaded CPU that has been throttled?
#28I think we can have more nuance than a choice of 50% or 100%. I fall in the 'Show 100%' camp for sure, showing 50% but not indicating why isn't particularly helpful without knowing the background here. I think a separate indicator for an overall throttling condition would be helpful. Show a 100% usage and a throttle indicator together.
Determining how much is in use out of what is practically available is relatively easy. But determining what is 100% is still difficult to decide on, CPUs have too many frequency options to decide what the "real" 100% point is. Even picking the base frequency as the reference would be a pain to properly monitor and predict, and to take decisions based on that.
Re: What should the CPU usage be of a fully-loaded CPU that has been throttled?
#29A key problem with this proposal is that modern CPUs do not have a single definitive maximum frequency. You have the base frequency which is rarely relevant outside of synthetic workloads then you have a variety of turbo frequencies which interact in complex ways. AMD's latest CPUs don't even have clear upper bounds on their frequency scaling logic. It's a big black box and the results can vary depending on the workl…
The OS can keep a record over time of the maximum frequency each CPU core has ever hit. This will take into account machine to machine variance, and even environmental factors effecting maximum speed.
Anyway, current processors run a separate clock per core, and maximum clocks are only available when a small number of cores are active; if all cores are busy, that should really be 100%, even if each core is only doing 80% of max for a single core.
Mostly, I want to see % of time cpu is busy, and separately, stats on how throttled the cpu is, because it's hard to combine both into a coherent number. Maybe also some idea of how much of the core is being exercised, if it can be easily measured... I'd love to know when a program is keeping the cpu busy, but not making good use of it.
Re: What should the CPU usage be of a fully-loaded CPU that has been throttled?
#30That's what we do for other things that have no fixed upper bound, e.g. disk/network i/o. We even do this for memory now given dynamic virtual memory, etc.