Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package power value calculation #50

Open
nsklaus opened this issue Jan 28, 2023 · 3 comments
Open

package power value calculation #50

nsklaus opened this issue Jan 28, 2023 · 3 comments

Comments

@nsklaus
Copy link

nsklaus commented Jan 28, 2023

i'm testing various monitoring apps and i've seen that values for package power in asitop widely differs from stats.
in asitop i have this:
CPU+GPU+ANE Power: 0.10W (avg: 0.11W peak: 0.22W)
in stats i see this (as shown on the screenshot below):
battery: 0.74w DC in: 6.98w system total: 7.8w

asitop seems to indicate a very small general consumption, typically less than 1w, while stats shows around 5-8w on average. why the numbers do vary that much between the two apps ? which one would be closer to reality ?

Screenshot

@dehydratedpotato
Copy link

@nsklaus The reason the values differ is due to their different metric sources:

  • Asitop uses powermetrics which gets its values from the IOReport.
  • Stats, last I checked, accesses keys from the SMC.

It is a large difference in power, though! Even considering the efficiency of Apple Silicon, a <1 watt value is a little low for the entire package, especially when at those specific usages... So I would say, in this case, Stats may be the more accurate one. Though, the difference could be from lack of synchronization between the two app's metric sampling times.

@nsklaus
Copy link
Author

nsklaus commented Jan 28, 2023

@BitesPotatoBacks, thanks for telling. i thought too that <1w numbers were a little too good to be true.
then there may be an error in how asitop calculate the package power value ?
if asitop just grabs value given to it by powermetrics, then powermetrics is wrong?
somewhere something went bad.
my goal is trying to assess how much heat is produced and how much power does this laptop consume.

@dehydratedpotato
Copy link

@nsklaus The values powermtrics pulls are actually counters; they are retrieved between two samples and then calculated. It is definitely possible that these counters are less reliable than the SMC (or completely incorrect in some cases), which makes sense, as the SMC gives raw values from the sensors. So yeah, definitely a issue on powermetric's part...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants