in reply to Re: Threads Mac Os x
in thread Threads Mac Os x

I see CPU usage around 100% only. If all the CPUs were being used then I would've seen something like 700% or or higher. When I "top" I see the following: PID COMMAND %CPU TIME #TH 7867 perl5.10.0 96.6 26:15:19 8/6 (where #TH: total number of threas/number of running threads)

Replies are listed 'Best First'.
Re^3: Threads Mac Os x
by BrowserUk (Patriarch) on Feb 27, 2011 at 08:26 UTC
    When I "top" I see the following:
    PID COMMAND %CPU TIME #TH 7867 perl5.10.0 96.6 26:15:19 8/6
    (where #TH: total number of threas/number of running threads)

    I would interpret that to mean that at the moment in time when you ran the command, 6 of your 8 threads were running concurrently, and between them they were using 96% of your total cpu capacity.

    In other words, if you have a single threaded process running flat out on a single core, I would expect the highest %cpu value shown to be 100/8 = 12.5%.

    The fact that at the instance that the command ran, only 6 of 8 threads was actually using a core, just means that in that brief instance, some other higher priority processes--like your display driver, or your network driver, or your disk driver--needed to do something.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      I guess that makes sense. I really appreciate your help guys. Thanks.