Subject: RE: CPU usage

From: "Mark Mackey" <m.mackey :a: cresset-bmd.com>
Date: Tue, 8 Feb 2005 18:07:46 -0000

I think there's some confusion here as to the effect of hyperthreading. When
hyperthreading is enabled, the CPU appears to the operating system as though
it was two CPUs, and some clever on-chip trickery allows one of these
'virtual cpus' to keep processing when the other one stalls (due to eg a
memory cache miss). If you have only one process running, it runs in one of
the 'virtual CPUs' at exactly the same speed that it would run if HT was
turned off.

The benefit of HT is that if there is more than one process running, you get
slightly faster throughput than if HT was not enabled. Note that this
benefit is generally only slight (5-10% max). Effectively, all that HT gives
you is the ability of the CPU to 'context switch' to a second task very
quickly if the current task stalls: there is no real extra CPU power made
available by HT for a single execution stream. One thing to remember is that
although the OS thinks there are two CPUs there, there is really only one.
The 'CPU utilisation' monitors in windows (and 'top' in Linux etc) get a
little confused by this.

In the original poster's case, you have a Windows machine running Gaussian
at ~100% CPU utilisation, and assorted Windows background processes also
running using a few cycles here and there. With HT turned off, the machine
thinks it has only one processor, that processor is doing stuff all of the
time, and so it reports 100% CPU utilisation. With HT turned on, Gaussian
runs at 100% of one 'virtual CPU', the Windows background processors all run
on the other, and Windows thinks that there are two CPUs, one fully loaded,
the other not doing much, so reports 55% CPU utilisation. In both cases
Gaussian is running as fast as it can and will finish the same jobs in
more-or-less the same time: my guess is that the 'HT on' case will go 1%
faster or so (as Gaussian is competing less with the Windows background
stuff). The symptoms of "Why is it only using 60% of my processing power"
are purely due to the Windows tools not fully understanding the underlying
hardware: they do NOT indicate that the CPU is in reality being
under-utilised. It's a bug/misunderstanding in the CPU monitor tool, not a
problem with the calculation or the system as a whole. The only way to get
100% displayed CPU utilisation is to run two Gaussians simultaneously, in
which case both will take very slightly under twice as long to finish[1] but
the CPU monitor will be happy that 'both' CPUs are being used fully.

[1] Well, probably more than twice as long in the real world because of
contention for memory and disk resources and so on.

-- 
Mark Mackey
Cresset Biomolecular Discovery

-----Original Message-----
From: Computational Chemistry List [mailto:chemistry-request :a: ccl.net] On
Behalf Of Victor Manuel Rosas-Garcia
Sent: 08 February 2005 14:11
To: chemistry :a: ccl.net
Cc: Steve Bowlus
Subject: CCL:CPU usage

I had a similar problem when running GAMESS under Fedora Core 2.  Then I
disabled hyperthreading, from the setup menu upon starting the machine, and
cpu
usage went up to 100%.

When I installed the OS, the Fedora Core 2 installer setup two kernels, one
for
1 CPU and the SMP variety.  After disabling hyperthreading I had to  make
sure
the machine always runs the kernel for 1 CPU so that I get 100% CPU usage.

--- Steve Bowlus <chezbowlus :a: goldrush.com> wrote:

> I have observed the same behavior with another quantum code on a machine
> with the same CPU/OS combination.  There was an earlier post to this list
> asking about what seemed to be a similar problem with the Xeon HT.
> 
> I tentatively interpret the behavior that the job is given 100% of one of
> the HT execution streams, while the other stream is largely kept idle.  I
> have not found a way to tune this behavior.  If you look at ControlPanels
> >AdministrativeTools >ComputerManagement >Processors, you will see there
are
> two CPUs shown.  These can be uninstalled, but I haven't tried
uninstalling
> one.  Presumably, all CPU resources would be concentrated in a single
> execution stream, but I haven't found any documentation on this point.  I
> also haven't found anything to suggest the second "CPU" can be
> _re_installed.
> 
> I haven't talked to Intel or HP (who built my machine), either of whom
could
> shed light on all these issues.  Seems a pity that information on such a
> feature (or limitation) of HT technology would not be made readily
> available.
> 
> sb
> 
> 
> 
>  -----Original Message-----
> From: Computational Chemistry List [mailto:chemistry-request :a: ccl.net]On
> Behalf Of Rodrigo Pontes
> Sent: Monday, February 07, 2005 9:29 AM
> To: chemistry :a: ccl.net
> Subject: CCL:CPU usage
> 
> 
>   Dear Colleagues,
> 
>   We are running Gaussian on a Windows XP/Pentiun-IV HT 3.2GHz machine. We
> observed (in the Task manager / performance) that the CPU usage is only
> around 60%. Have someone noticed the same problem? How could us set the
> configuration to a 100% CPU usage?
> 
>   Thanks in advance,
> 
>   Rodrigo M. Pontes
>   Departemanto de Quimica
>   Universidade Estadual de Maringa
>   Brazil

=====
Victor M. Rosas Garcma
Theoretical Chemistry Apprentice

e-mail: quimico69 :a: yahoo.com

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-= This is automatically added to each message by the mailing script =-
To send e-mail to subscribers of CCL put the string CCL: on your Subject:
line
and send your message to:  CHEMISTRY :a: ccl.net

Send your subscription/unsubscription requests to: CHEMISTRY-REQUEST :a: ccl.net

HOME Page: http://www.ccl.net   | Jobs Page: http://www.ccl.net/jobs 

If your mail is bouncing from CCL.NET domain send it to the maintainer:
Jan Labanowski,  jlabanow :a: nd.edu (read about it on CCL Home Page)
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+