[H-GEN] Hyperthreading and CPU utilisation
Michael Anthon
michael at anthon.net
Mon Aug 25 00:07:05 EDT 2003
[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]
I am in the process of setting up a new machine. It is a dual 2.8G Xeon
and I'm a bit confused about some aspects of HT. The bit that is
confusing me the most is the reporting of CPU utilisation. For example,
if there is only one active process on the system that is able to
actully use 100% of one processor then top reports this processes
utilisation as 100% and reports the overall utilisation as 25%. I kinda
understand this but I'm a bit uncertain if this is reporting the true
state of things. Here is a trivial example obtained by running 'cat
/dev/zero > /dev/null'
top - 13:41:42 up 6 days, 3:29, 6 users, load average: 0.45, 0.18,
0.40
Tasks: 246 total, 2 running, 244 sleeping, 0 stopped, 0 zombie
Cpu0 : 0.3% user, 0.0% system, 0.0% nice, 99.7% idle
Cpu1 : 0.3% user, 3.6% system, 0.0% nice, 96.1% idle
Cpu2 : 0.7% user, 0.0% system, 0.0% nice, 99.3% idle
Cpu3 : 23.9% user, 76.1% system, 0.0% nice, 0.0% idle
Mem: 2587980k total, 2436836k used, 151144k free, 80660k buffers
Swap: 999592k total, 133676k used, 865916k free, 2148236k cached
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
25074 root 14 0 1092 1092 780 R 2.0 0.0 0:00.94 top
Now, perhaps I am totally misunderstanding HT but is this truly going to
utilise only 50% of the CPU's capacity when only running a single active
process? I guess what I am trying to understand is if this is giving me
a true understanding of system preformance or is it making some
assumptions about the usage measurement due to thinking it has 4
processors when it really only has 2?
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