Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Oct 2010 15:46:13 -0400
From:      Martin Turgeon <freebsd@optiksecurite.com>
To:        freebsd-questions@freebsd.org
Subject:   How is CPU usage calculated?
Message-ID:  <4CB75E05.4070207@optiksecurite.com>

next in thread | raw e-mail | index | archive | help
  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 
hyperthreading?

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

Thanks in advance,

Martin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CB75E05.4070207>