Quote:
Originally Posted by dba_not_adm9
Does Linux by default allocate CPU per process ? So of 16 CPU only 1 is at 100% ?
|
A single process can, by definition, only occupy a single CPU (core/physical thread/whatever) at any instant in time. It doesn't always have to be the same CPU although for performance reasons (cache, TLB flushing) it often is. This applies to every operating system ever invented.
Quote:
... but want to understand why top & sar show different values.
|
Because you're comparing apples to oranges.
In top the values for individual processes are un-normalised - simply the total CPU usage for the latest time period. For a non-threaded process this will never exceed 100% except for rounding errors. For a (busy) multi-threaded task, it may exceed 200 or 300%.
Depending on the options passed to sar you are likely looking at the total CPU usage for the entire system - and as mentioned your busy task may not reside on one CPU exclusively. You can also see the individual CPU usage in the summary data of top.