tags:

views:

900

answers:

5

What does it exactly mean to have a 350% cpu usage (by a process) on a 4-CPU box? The process is a 'mysqld' which is currently being 'bombarded' by a simulated OLTP scenario.

Any pointers appreciated.

+9  A: 

In *NIX land, 100% cpu usage is 100% of a SINGLE cpu.

This applies to multi-core processors the same way as true multi-processor computers.

So, you are using 7/8th of your total CPU cycles on mysql.

Matthew Scharley
+3  A: 

There are 4 x 100%, so "top" shows a total of 400% on a 4 CPU box.

Jeremy Smyth
+2  A: 

Each cpu process is consider as 100% . So totatlly it 400% of 4 cpu.

joe
+5  A: 

While running top, press "1". This will toggle the view so that you can see the load per individual core/cpu.

rascher
+2  A: 

I've just read an interesting article on this very subject yesterday : Unix load average. It will explain all you need to know and more.

Extract :

The load average is the sum of the run queue length and the number of jobs currently running on the CPUs. In Solaris 2.0 and 2.2 the load average did not include the running jobs but this bug was fixed in Solaris 2.3.

Consider that there are two basic modes to display load : "IRIX mode" and "Solaris mode". In IRIX mode (Linux default), a load average of 1 means that one CPU is fully loaded ( or 25% of each CPU on a 4 CPU system, etc). In Solaris mode, a load average of 1 means that all CPUs are fully loaded (so it's actually equivalent to "IRIX mode" load divided by CPU count ).

wazoox
That was a very cool and informative link! Thank you!
Amit