Hyper-Threading slows down single threaded apps?

shurcooL

[H]ard|Gawd
Joined
Oct 12, 2007
Messages
1,125
Hi,

I recently got an Atom N270 (1.6 GHz) based netbook running Windows XP Home SP3, and cpu-z shows it as having 1 core and 2 threads. Obviously this is due to Hyper-Threading.

My question is... I've noticed when running single threaded apps like Super Pi Mod (and others) that try to max out CPU usage, Task Manager only shows just over 50% usage.

This means the Hyper-Threading effectively divides one CPU core into two halves, and doesn't allow a single thread to use more than 50% of potential speed.

This is easily proved by the fact that one instance of Super Pi Mod took about 150 seconds, whereas two instances running at the same time took about 170 seconds each.

Is this normal? I thought Hyper-Threading was supposed to present one physical core as two virtual ones, but still let one thread make full use of the core, instead of hard-limiting it at 50%.

Is there any way to disable HT other than from Bios? Because there is no such option in the netbook's Bios (it's very simplistic). It's an Acer Aspire One A110 (AOA110-1995) btw.

Thanks.
 
Last edited:
Same netbook here and I never really thought about that. In for some insight.
 
For pure single threaded apps, HT will slow down things a little due to the overhead of keeping track of things. In theory, you shouldn't be slowing down to 50% of the actual performance. Last I remember, it should be about a ~20% gain in HT's overall work compared to just a single core for the same time interval. I don't have an Acer netbook so I can't tell you how to disable it.
 
I remember reading somewhere that HT needs to be enabled because of the way the Atom is designed. Something about "in-order" processing and using HT to do something faster... If you disabled HT, it might be even slower than before. I also have a netbook but haven't thought about it since I don't really understand how exactly the Atom works.
 
I just checked it again, and super_pi_mod.exe does have exactly 50% cpu usage. I've tried setting the cpu affinity to just core 0, core 1, and both, but it still stayed at 50% in all cases.
 
When a CPU with HT is loaded on only one core, all of the CPU's resources will be allocated to that core and you'll get the CPU's full speed. It will only show as 50% in Task Manager because it's only using one logical core, but that logical core will be running just as fast as if you disabled HT and were running on the entire CPU.

Also, Super Pi will only use up to 50% CPU power no matter what, since it's a single-threaded application and you have two threads. So it doesn't matter how you set the affinity.
 
It will only show as 50% in Task Manager because it's only using one logical core, but that logical core will be running just as fast as if you disabled HT and were running on the entire CPU.
Good point. I really don't know what else I was expecting from it.

So yeah, 50% cpu utilization being displayed in Task Manager is completely normal and not indicative of a problem...

The problem is that I don't think a fully loaded thread runs as fast as if HT was disabled and there was only 1 logical core.

I'll try re-running the tests though, just to make sure it wasn't a fluke.
 
Ok, here are some numbers for various numbers of SuperPiMod instances running a 2M calc (at the same time):

1x - 3:29.5 sec
2x - 4.23.5 sec
4x - 8:26.5 sec

So if you divide the 4x result by 4, it will be just over 2 minutes and that's what the 1x time should be if Hyper-Threading wasn't slowing down single threaded apps.

I'll try the same thing on a Mobile P4-M (no Hyper-Threading support) and see if the above theory is confirmed.
 
Just like I thought.

Here are the numbers from a (very old) Mobile P4-M 1.8 GHz laptop that has no Hyper-Threading:

1x - 3:22.5 sec
2x - 6:53.3 sec
4x - 13:34.9 sec

As you can see, it's much more linear here.

What this tells me is that the Atom N270 is incapable of running single-threaded apps at 100% speed potential. It's more like 66% of the max potential speed.
 
Your testing is completely flawed. For a proper test you need to be able to turn hyper threading off in the bios. Since you can't do this, there is no way on your computer to test what you are trying to test and prove.

You need the ability to run a SuperPI benchmark with and without hyper threading enabled. Without that ability, you can't prove anything with your testing.

You are looking at your results backwards. Hyper threading is not slowing down your single threaded apps. They are running as fast as possible on a single core CPU. What you're really seeing is that hyper threading makes your CPU more efficient and more capable when running multiple tasks which is what it is designed to do and your numbers prove that.

It takes your Atom 3:29.5 sec to run 1X. That's all that CPU is capable of. If you didn't have hyper threading then it would take roughly twice that long to run 2X as you proved with your other laptop. Hyper threading is allowing you to get twice as much done without it taking twice as long. That's a good thing. HT is working excellent in this benchmark. That's all you've proven.

Your testing does not prove that your 3:29.5 time would magically drop down to 2 minutes if you could disable hyper threading.
 
One thing that you are not taking into account from your benchmarks is the benefit of hyper-threading.

Why would you expect it to scale in a linear fashion?

You will notice that the scaling between 2 and 4 actually is pretty linear on the atom. Why would you expect the scaling to continue to 1? 2 and 4 are benefiting from HT, 1 is not.

HT isn’t just a gimmick that makes one processor show up as two, it actually runs about 30% faster than if you were simply running 2 threads with HT disabled. It allows the processor to more efficiently make use of its pipeline.

Trying to reverse that logic and expect to get that same level of efficiency when only running one thread just doesn’t make sense. HT isn’t slowing down single-threaded apps, it just simply does nothing for them.

Edit: Edit your boot.ini to include the /ONECPU switch and that should effectively simulate HT being disabled.
 
Last edited:
You're assuming core 0 and core 1 are on the same playing field. Core 0 being 100% and core 1 being 0 %, equaling 50% CPU usage is a limitation of the task manager and cpu polling not knowing the difference between hyper threading and dual processors, nothing else.

To put it on other words, lets say it was possible to have a quad core CPU where core 0 was 3ghz, core 1 was 2ghz, core 2 was 1 ghz and core 3 was 500mhz. If you maxed out core 0, it would show 25% cpu usage, even though in reality, it's almost as much processing power as the other 3 cores combined.
 
Here's what Tom's Hardware has to say,

"On the other hand, the Atom’s HyperThreading resulted in an impressive performance gain."

http://www.tomshardware.com/reviews/intel-atom-cpu,1947-9.html

Their platform allowed them to enable and disable HT in the bios and that was their conclusion. Maybe your laptop bios doesn't allow users to disable HT because they don't want users slowing down their computer based on flawed testing.
 
I understand what you guys are saying.

In fact, I was considering that when posting this. I know my testing only proves that either HT boosts performance for 2x instances, or slows down the performance for one. It's not possible to say which it is w/o the ability to turn it off (which the BIOS has no option for).

However, I didn't think it was possible for HT to actually speed up the performance of running two completely separate instances of a single-threaded app.

But after reading your replies, I'm starting to think that it may be possible.

I will try this test on a P4 where I can toggle HT on/off and then see if the HT-helps possibility is true. :D

Edit: I have to admit the thought that HT can "help" didn't even enter my mind, lol. It's probably because a) I don't know how it works, and I don't believe in magic and b) I have never owned a machine with HT before, so I never looked up any info about it.
 
Last edited:
However, I didn't think it was possible for HT to actually speed up the performance of running two completely separate instances of a single-threaded app.

But after reading your replies, I'm starting to think that it may be possible.
HT speeds up the running of multiple threads on the same CPU, whether they are from one multithreaded application or several single-threaded ones.
 
It works by allowing the processor to make better use of its computation resources, not adding additional resources. For example, if one thread is waiting on main memory for some data, this will not eject the thread from the core, so that core is stalled until the data arrives. In an HT system, another running thread may have instructions ready to execute immediately, and the processor will send them off to the execution unit, so work gets done during a period when the processor would normally be stalled. Most processor developments in the past 10 years have been of this type - keeping more instructions in the execution units and spending less time not doing work.

You should read this article: http://arstechnica.com/old/content/2002/10/hyperthreading.ars

Also assuming each process is doing the same amount of work, 2 concurrent processes running for 170s accomplish a lot more actual work than 1 process running for 150s.
 
Back
Top