investigated this myself littlebit:

Indeed the top only knows about currently configured cpu
frequency so if power management has set it to 245Mhz on nexusone
then com.android.wallpaper app can easily show 20..30% cpu
usage but at 499mhz the cpu usage is ~12%...

Found a nice solution to this: to get cpu usage % that is not affected
by power management decisions one can install setCPU app
(http://forum.xda-developers.com/showthread.php?t=505419)
This allows you to modify min & max possible cpu frequency.
When setting min freq == max freq I can compare cpu
usage % between different experiments without having to worry
about what frequency power management decides to use during
experiment.

Br,
Lauri

On Apr 1, 4:54 pm, Lauri Ehrenpreis <[email protected]> wrote:
> Hi!
>
> The easiest way to get some idea about cpu usage on android seems to
> be the top utility (adb shell top)
> However it seems to me that due to power management the cpu frequency
> is changing all the time (i can see this when doing cat /proc/cpuinfo
> - the BogoMIPS value is changing drastically). So the question is that
> how does top calculate the cpu usage percent? Is it aware of max
> possible cpu frequency and calculates based on that or it calculates
> based on current cpu frequency?
>
> Consider these 2 cases:
> 1) BogoMIPS shows 100 while top says my process takes 50% of the cpu
> 2) BocoMIPS shows 600 while top says my process takes 50% of the cpu
> Does this mean that in first case my process was eating 50 BogoMIPS
> and in second case 300 (top is not aware of max possible cpu freq)? or
> in both cases my process took same amount of cpu (top is aware of max
> freq)?
>
> Br,
> Lauri

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to