Operating System - Linux
1753439 Members
4781 Online
108794 Solutions
New Discussion юеВ

Re: CPU usage on hyperthreaded Xeon processors

 
SOLVED
Go to solution
John Poff
Honored Contributor

CPU usage on hyperthreaded Xeon processors

Hi,

I'm having a discussion with a mainframe guy who is doing some testing on one of my Linux boxes. I have a box with two Xeon 2.8 Ghz CPUs in it, with hyperthreading turned on, and I'm running RedHat Advanced Server 2.1. The box shows four CPUs in all the usual utilities [sar, top, etc.] as a result of the hyperthreading.

My mainframe friend is running a test script that reads a large file. He notes that his script consumes over 99% of one CPU, while the other three show no usage. His contention is that since he is getting half of one physical 2.8 Ghz CPU, his script is running on a virtual 1.4 Ghz CPU. I argue back with him that if nothing else is running on the second virtual CPU, he is getting all of the physical CPU. I'm not a wizard on hyperthreading, but it seems that his CPU usage would always be at 2.4 Ghz. I understand what he is trying to say about getting half the physical CPU, but I don't think that saying he has a 1.4 Ghz CPU is a fair statement. I think he gets a 2.8 Ghz CPU for half as much time.

Opinions? Comments?

JP
6 REPLIES 6
Vitaly Karasik_1
Honored Contributor

Re: CPU usage on hyperthreaded Xeon processors

Umapathy S
Honored Contributor

Re: CPU usage on hyperthreaded Xeon processors

JP,

I think the way OS behaves for hypethreading is still limited. The advantage is more felt only when many application run simultaneously.

More here
http://www.2cpu.com/Hardware/ht_analysis/

Some statistics here
http://www.pcworld.com/news/article/0,aid,107492,00.asp

cheers
Umapathy

Arise Awake and Stop NOT till the goal is Reached!
Steven E. Protter
Exalted Contributor

Re: CPU usage on hyperthreaded Xeon processors

I would think the results would be different if the box was booted off one of the SMP kernels.

For what its worth I think you're instincts are right. I love those boxes you are running, fast and furious.

I'm running the old web hosting business of Red Hat 7.3's stock smp kernel even though I have but one CPU right now, that is the way I'd run things in a multi-cpu environment.

What is your Linux Distribution?

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
John Poff
Honored Contributor

Re: CPU usage on hyperthreaded Xeon processors

Vitaly and Umapathy,

Thanks for the links. That is some good info.

Steven,

I'm running Advanced Server 2.1, using the e25 enterprise kernel,
since I have two CPUs and 8 Gb of RAM. I just built another one
this week, same configuration, except that the CPUs are 3.066 Ghz.
Those are some *FAST* boxes, and I'm having a blast working with them.


My point with my mainframe guy was that if he is running something
on one CPU at 99%, and the other CPUs are idle, then he must be getting
pretty much all of a 2.8 Ghz CPU, and not a 1.4 Ghz virtual CPU. Those
mainframers are used to dividing up CPUs on their system, and maybe it
works that way on their end, but I'm debating the point with this guy and
I just wanted some feedback to see if I was understanding the hyperthreading
correctly.

JP
Stuart Browne
Honored Contributor
Solution

Re: CPU usage on hyperthreaded Xeon processors

No, Hyperthreading is not like mainframe dividing up clock cycles.

It literally is multiple-executes-per-cycle.

Using one single threaded application won't show one whit of performance boost. Use 10 of them at a time, and you might see some improovement. Using a well written multi-threaded application, you'd see a reasonable amount of improovement.

You might find this useful:

http://www-106.ibm.com/developerworks/linux/library/l-htl/

One long-haired git at your service...
Khalid A. Al-Tayaran
Valued Contributor

Re: CPU usage on hyperthreaded Xeon processors


Hi,


I don't think that his statement is right. You are getting 2.8GHz not 1.4GHz. But it depends on the script and the OS....

More info on CPUs here:
http://www.geek.com/procspec/procspec.htm