9 ms·
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 out
by magila 5y ago
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 workload, temperature, silicon quality, phase of moon, etc.
- awesomeusername 5y agoThe 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.
- wtallis 5y agoThat strategy guarantees that a process that runs for multiple minutes while consuming all available CPU cycles will be reported as using 100% CPU at most during the first few seconds, after which it will usually be reported as using somewhere less than 90%, and realistically could be reported as low as 65%. How is this helpful?
- jeffbee 5y agoEstimating x86 core frequency is a lot trickier than you've implied.
- toast0 5y agoOh, but it gets more fun. The same operation can take more clocks for various reasons... If I really undervolt my Zen 2 apu, power usage and benchmarks go way down, but clock frequency stays high; the CPU is clock stretching and it gets a lot less work done. 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.
- mhh__ 5y agoAbsolutely, if this really matters to you I think the only solution is to characterise the CPU over an afternoon or two and build a model based on the data rather than what the Manufacturer told you.
- foobar33333 5y agoCPU usage is an incredibly complex metric that doesn't really explain what is actually going on. I noticed while running a benchmark I can get my CPU to 50c and 100% usage and it stays steady like that. But then I tried prime95 and my cpu very quickly hit 99c also at 100%. Likely the different benchmarks were both running as fast as they can but the prime95 one ran on a faster part of the cpu which could generate more heat and does not get stuck waiting on memory or other slow ops.
- tayo42 5y agoi think you could prove that on linux by getting the number of instructions run. I think perf has a way of getting that info for you. not sure if windows has something simmilar
- waterhouse 5y agoHmm, different workloads will have different mixes of instructions, which will take very different amounts of time per instruction (e.g. a chain of uncached memory lookups vs a tight loop of register-register arithmetic). If you had two instances of the same workload, and one was throttled, then yes, you could compare instructions per unit time. But comparing prime95 vs the other benchmark is likely misleading.
- tayo42 5y agoYeah that would be the thing to prove that prime95 is going through more instructions so the cpu runs hotter
- waterhouse 5y agoI see. But I expect that some instructions cost more (i.e. generate more heat) than others. Someone mentions AVX instructions, for example; presumably 1 million AVX-512 fused-multiply-add instructions cost a lot more than 1 million loads (we can probably arrange for the right proportion of loads to hit a CPU cache vs. go to main memory, so that they end up taking the same time). Even without AVX, I imagine things like 64-bit integer divisions or CRC32 instructions cost more than loads or stores, though I don't know by how much.
- naikrovek 5y agonot only that, but modern CPUs aren't even deterministic in how they run an instruction. the result of any particular instruction is deterministic, but the location of the silicon and the amount of silicon used to complete the instruction is not deterministic anymore. CPU Usage measured in percentage doesn't make sense on any CPU with modern performance features like speculative execution and branch prediction.
- phire 5y agoBy this proposal's logic, it would make total sense for processes on a boosting CPU core to report more than 100% cpu usage.
- freeone3000 5y agoThis used to be the case -- XP era had it report as a percentage of the target frequency, so an Athlon XP would usually run at 110%. This is confusing to people who believe 100% is the maximum.
- ithkuil 5y ago"these go to eleven!" https://youtu.be/hW008FcKr3Q https://youtu.be/hW008FcKr3Q
- bigiain 5y ago“Military power “ seems to fit perfectly… > The etiology of military power is from War Emergency Power (WEP) which in the WWII era was a higher than normal rating power (i.e. >100% rated power) setting on an aircraft engine. Such power settings were approved for short durations (typically 5 minutes or less) such as takeoff and battle maneuvers. > The term was quickly shortened to military power.
- Godel_unicode 5y agoPlease let's not add yet more military fetishizing to IT. "Military power" should refer to things like military engines, not totally unrelated electronic performance boost modes.
- deviledeggs 5y agoIT overlap is mostly because computers and the internet are military technology. Mainframes, IC's and the transistor itself were bankrolled by US military money. The internet and GPS, the core technologies of our time, are both direct descendants of the US military. You may not like it, but the entire IT and tech field are built on US military tech
- hedora 5y agoIdeally, in the article’s example, the program generating heat and causing the throttle would have the throttled time counted against it (as a separate metric). That’s hard to do without hardware support, but I wonder how hard it would be to get a decent metric with currently available performance counters.