tlkh / asitop

Perf monitoring CLI tool for Apple Silicon
https://tlkh.github.io/asitop/
MIT License
3.51k stars 152 forks source link

CPU load reflects only one core #7

Open N3xusPr1me opened 3 years ago

N3xusPr1me commented 3 years ago

Hello, first of all thanks for this awesome utility.

I noticed something weird when running grep : it said my P-CPU usage was 100% whereas grep was only loading a single P-core (I confirmed this with Activity Monitor.app). it seems like the P-CPU usage only reflects a single core.

I am not sure if it is meant to be that way, but imo the better information would be total P-CPU usage, not single core usage.

Could you please check this ? (It may also apply to E-CPU usage, didn't try)

Thanks for your help keep it up :)

tlkh commented 3 years ago

This is due to the reporting in powermetrics, it sometimes (for some reason) reports the residency in the entire P0 or P1 CPU cluster to be 100% although only 1 core is loaded.

I am planning to manually computing the actual usage from the individual residency values of each individual core, but I havent got around to doing that yet.

fengzee commented 2 years ago

This is due to the reporting in powermetrics, it sometimes (for some reason) reports the residency in the entire P0 or P1 CPU cluster to be 100% although only 1 core is loaded.

I am planning to manually computing the actual usage from the individual residency values of each individual core, but I havent got around to doing that yet.

Consider using psutil.cpu_times() for this metric?

valeriylo commented 1 year ago

Still an issue for me. E-CPU and P-CPU usages are 100% all the time. GPU and ANE are fine.

image
dbacks2196 commented 9 months ago

Same here