How is CPU usage calculated?

Martin Turgeon freebsd at
Thu Oct 14 20:46:11 UTC 2010

  Hi list!

I did a strange observation yesterday night. The CPU usage reported by 
top doesn't match what is indicated under it. I was seeing around 80-90% 
user, 5% system, 1% interrupt and 10% idle. But the process details 
under it doesn't match. mysqld was taking around 250% (WCPU) with a few 
httpd processes at 1-2%. The system is running GENERIC 8.0-REL on a Xeon 
E5630 (quad core with hyperthreading so 8 CPUs). MySQL and Apache each 
have their own jail (I don't think it will matter but just in case)

I understand why the mysqld process take more than 100% but how can I 
know what's taking the rest? Why doesn't the total user CPU usage match 
the total of the CPU usage of each process? Is there a link with 

There sure is a logical answer and I would really like to know it :)

Thanks in advance,


More information about the freebsd-questions mailing list