Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How does cpu speed stepping effect the cpu usage percentages reported in (for example) htop? How about the normal top?

So, if my cpu is stepped down to 800mhz with a full speed of 2ghz, does 5% used mean that the cpu ran for 0.05 * 800 = 40 million cycles used , or 0.05 * 2000 = 100 million cycles used?

share|improve this question
add comment

1 Answer

The stepping is irrelevant. 5% means the CPU cores were doing useful work 5% of the time.

Don't multiply speeds by fractions that way. The numbers you get by doing that are basically meaningless. The "40Mhz" you get is a meaningless number -- nothing happened at 40MHz.

share|improve this answer
    
I never said anything happened at 40Mhz. The cpu usage is measuring how many of the clock cycles were used this period yes? So I'm asking, if top reports 5%, does that mean that the cpu was doing work for 40 million cycles this second, or 100 million cycles. Approximate numbers of course, superscalar pipelined processors etc make it far less simple than that. –  Jords May 31 '12 at 3:44
    
You are right in that I should get my units right and not refer to an amount of cycles as Hertz. –  Jords May 31 '12 at 3:46
    
I don't think what you're doing is meaningful. What information does the 5% not give you that you need? –  David Schwartz May 31 '12 at 3:49
    
Well, it's interesting for trying to get a good idea of what my background load is. For example, if spotify (linux) is using 10% of one core to play music and I can see that the core is at 800mhz - does that mean that spotify is horribly inefficient,or slightly inefficient? - I just did a test with changing my cpu governor to performance and the percentage usage numbers dropped right down, so I guess I have answered my question –  Jords May 31 '12 at 4:02
    
I'm not sure how you could determine usefully if spotify is "efficient" based on that information. –  David Schwartz May 31 '12 at 4:05
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.