2

I would like to know why I have a process being able to report a usage line like:

PID   COMMAND  %CPU
248   Xcode    983.5

… in top on a quad core CPU?

I understand it's wrong, but how come? I'm not interested by Xcode going this high, but why top reports so high usage?

On OS X 10.7 with a Intel i7 quad core.

bwDraco
  • 45,747
  • 43
  • 165
  • 205
jibay
  • 23
  • 2
  • possible duplicate of [Why is the CPU usage reported by top in Linux over 100%?](http://superuser.com/questions/174660/why-is-the-cpu-usage-reported-by-top-in-linux-over-100) – slhck Nov 02 '11 at 22:28
  • 1
    @slhck: I do not think that it is a duplicate. It is a different OS and the accepted answer of the other question does not answer this one. – Dennis Nov 02 '11 at 22:33
  • 1
    @Dennis On a second thought, you could be right. At least the accepted one. What do you think of the second one? – slhck Nov 02 '11 at 22:43
  • 2
    @Dennis top is standard Unix utility and since MacOS is Unix form version 10 and up, it's reasonable to expect standard behavior for top. – AndrejaKo Nov 02 '11 at 22:54
  • I don't think that's a duplicate either. The hyper threaded 4-core cpu should not be able to receive more than 800% usage. :-/ I'm still left with 183.5% that's from nowhere… – jibay Nov 02 '11 at 23:00
  • @slhck: I guess the second answer could explain this. Still, `983.5%` seems awfully high. – Dennis Nov 02 '11 at 23:12

1 Answers1

1

It's just an extreme case of sampling error. Say your factory can generate one widget per hour and outputs them precisely on the hour. If someone were trying to measure your factory's output, they might sample from, say 8:50 to 10:10, and find that you output two widgets in 80 minutes. Converting to widgets per hour, they'd get 1.5, or 150% of capacity.

It could also be caused by turbo boost, thermal throttling, or power saving. But given the fact that your system was under near maximum load, I doubt it.

David Schwartz
  • 61,528
  • 7
  • 100
  • 149