[H-GEN] Hyperthreading and CPU utilisation

Michael Anthon michael at anthon.net
Mon Aug 25 03:20:19 EDT 2003


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

> 23.9 + 76.1 adds up to 100 in my book.
> 
> >   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> > 25073 root      18   0   328  328  272 R 99.9  0.0   0:33.50 cat
> 
> And that's reasonable if you're using cat to generate load, which is
> limited by its read() and write() calls.
> 
Yeah, I understood this and wasn't really questioning it.

I guess the problem I'm trying to get my head around is that from my
(admittedly limited) understanding of HT, 2 processes running on the one
HT CPU will not run as fast as 2 processes running on 2 separate CPUs
(assuming that the process, or to phrase it another way, if a single
process running on an HT processor can utilise more then 50% of the
available processing time of the execution engine then running a second
similar process on the same CPU will obviously not double the
performance since it will have to throttle back the processing of the
first thread.

I am using cacti to monitor CPU usage on my servers, using snmp to read
the jiffy counters from /proc/stat.  My first surprise was that on this
system these counters return 4 times the expected values although with
hind sight it makes more sense.  The most confusing thing though is that
a single process running flat out as with the cat mentioned earlier then
it ends up being by both the jiffy counter and top method (since both
derive from the /proc/stat values) running at 25% of full load.  I just
get the feeling that it's not really 25%, probably really closer to 50%.
This is the issue I can't reconcile since there doesn't seem to be a way
to measure it.

Cheers
Michael

--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list