How do you correctly read CPU usage of a process on a multi-core machine?
BeginnerProductionPerformance & the USE Method
Answer
top and ps show per-process %CPU relative to one core by default, so a process using four cores fully shows 400%. Press I in top to toggle Irix mode off, which divides by the number of CPUs. ps %cpu is averaged over the whole process lifetime, not the current rate; use pidstat 1 or top for current usage.
More on Performance & the USE Method
What is the USE method?BeginnerMap the USE method to concrete Linux commands.IntermediateWhat is your "first 60 seconds" checklist on a slow server?IntermediateHow do you read vmstat output?IntermediateHow do you read `iostat -xz 1`?IntermediateWhat is sar and why install sysstat on every server?Beginner