[H]ard|Forum  

Go Back   [H]ard|Forum > [H]ard|Ware > Intel Processors

Reply
 
Thread Tools Search this Thread
  #1  
Old 09-08-2009, 11:07 AM
shurcooL Gawd, 2.9 Years
 
shurcooL is offline
Hyper-Threading slows down single threaded apps?

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 by shurcooL; 09-08-2009 at 11:29 AM..
__________________
Desktop: Q6600 G0 - TRUE 120 (Original) - 2 GB Corsair DDR2-800 CAS4 - EVGA GeForce 8800 GTX - GA-P35-DS3L (Rev. 1) - Windows XP Pro 32-bit - 24" LG L246WP - 21.5" Acer H213H - Logitech G9 - Cooler Master CM 690 Case - Corsair HX620 - Western Digital Raptor 150 GB - Western Digital Caviar Black 1 TB
Netbook: Acer Aspire One A110-1995 - 8.9" LED - 8 GB SSD (+ 8 GB SD Card) - 1 GB RAM - Windows XP Home (32-bit) - Seashell White
HTPC: Gateway EC1803h - Intel Core 2 Solo SU3500 1.4 GHz - 11.6" WXGA LED - 3 GB - 250 GB HDD - Intel GMA 4500MHD - HDMI out - 802.11n - flush 6-cell - Windows 7 Home Premium
  #2  
Old 09-08-2009, 11:08 AM
criccio [H]ardForum Junkie, 2.4 Years
 
criccio is offline
Same netbook here and I never really thought about that. In for some insight.
__________________
Entirely unencumbered by logic, the thread was able to spear directly into the heart of truth, killing it. – anon
  #3  
Old 09-08-2009, 12:43 PM
a123456 Limp Gawd, 3.8 Years
 
a123456 is offline
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.
  #4  
Old 09-08-2009, 02:25 PM
nightfawn [H]Lite, 1.1 Years
 
nightfawn is offline
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.
  #5  
Old 09-08-2009, 02:39 PM
shurcooL Gawd, 2.9 Years
 
shurcooL is offline
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.
__________________
Desktop: Q6600 G0 - TRUE 120 (Original) - 2 GB Corsair DDR2-800 CAS4 - EVGA GeForce 8800 GTX - GA-P35-DS3L (Rev. 1) - Windows XP Pro 32-bit - 24" LG L246WP - 21.5" Acer H213H - Logitech G9 - Cooler Master CM 690 Case - Corsair HX620 - Western Digital Raptor 150 GB - Western Digital Caviar Black 1 TB
Netbook: Acer Aspire One A110-1995 - 8.9" LED - 8 GB SSD (+ 8 GB SD Card) - 1 GB RAM - Windows XP Home (32-bit) - Seashell White
HTPC: Gateway EC1803h - Intel Core 2 Solo SU3500 1.4 GHz - 11.6" WXGA LED - 3 GB - 250 GB HDD - Intel GMA 4500MHD - HDMI out - 802.11n - flush 6-cell - Windows 7 Home Premium
  #6  
Old 09-08-2009, 05:58 PM
Zero82z [H]ard|DCer of the Month - July 2009, 6.6 Years
 
Zero82z is offline
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.
__________________
Main: i7 920 @4.1GHz w/Zalman CNPS10X Flex, ASUS Rampage II Extreme, 6GB Corsair DDR3-1600MHz, XFX HD 5870, EVGA GTX260, ASUS Xonar DX, Intel X25-M 80GB, Samsung 1TB F3 + 1TB F1, Kingwin Lazer Gold 1kW, CM ATCS 840, Dell S2209W, Samsung 712N, Windows 7 Pro x64.
Folding/2nd: Q9550 @3.8GHz w/Xigmatek HDT-S1283, ASUS P5Q Pro, 4GB G.Skill DDR2-1000, MSI TwinFrozr GTX260, WD 640GB, Corsair HX520, CM Centurion 590, Dell 1905FP, Windows 7 Pro x64.

\Well hey, you know more about this than I do so I am going to stfu and move along. - Kyle_Bennett
[H]ard|OCP Unofficial IRC Channel: irc://irc.dp.cx:6667 #hardocp | Heatware: Zero82z
  #7  
Old 09-08-2009, 08:17 PM
shurcooL Gawd, 2.9 Years
 
shurcooL is offline
Quote:
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.
__________________
Desktop: Q6600 G0 - TRUE 120 (Original) - 2 GB Corsair DDR2-800 CAS4 - EVGA GeForce 8800 GTX - GA-P35-DS3L (Rev. 1) - Windows XP Pro 32-bit - 24" LG L246WP - 21.5" Acer H213H - Logitech G9 - Cooler Master CM 690 Case - Corsair HX620 - Western Digital Raptor 150 GB - Western Digital Caviar Black 1 TB
Netbook: Acer Aspire One A110-1995 - 8.9" LED - 8 GB SSD (+ 8 GB SD Card) - 1 GB RAM - Windows XP Home (32-bit) - Seashell White
HTPC: Gateway EC1803h - Intel Core 2 Solo SU3500 1.4 GHz - 11.6" WXGA LED - 3 GB - 250 GB HDD - Intel GMA 4500MHD - HDMI out - 802.11n - flush 6-cell - Windows 7 Home Premium
  #8  
Old 09-11-2009, 08:09 PM
shurcooL Gawd, 2.9 Years
 
shurcooL is offline
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.
__________________
Desktop: Q6600 G0 - TRUE 120 (Original) - 2 GB Corsair DDR2-800 CAS4 - EVGA GeForce 8800 GTX - GA-P35-DS3L (Rev. 1) - Windows XP Pro 32-bit - 24" LG L246WP - 21.5" Acer H213H - Logitech G9 - Cooler Master CM 690 Case - Corsair HX620 - Western Digital Raptor 150 GB - Western Digital Caviar Black 1 TB
Netbook: Acer Aspire One A110-1995 - 8.9" LED - 8 GB SSD (+ 8 GB SD Card) - 1 GB RAM - Windows XP Home (32-bit) - Seashell White
HTPC: Gateway EC1803h - Intel Core 2 Solo SU3500 1.4 GHz - 11.6" WXGA LED - 3 GB - 250 GB HDD - Intel GMA 4500MHD - HDMI out - 802.11n - flush 6-cell - Windows 7 Home Premium
  #9  
Old 09-12-2009, 01:56 PM
shurcooL Gawd, 2.9 Years
 
shurcooL is offline
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.
__________________
Desktop: Q6600 G0 - TRUE 120 (Original) - 2 GB Corsair DDR2-800 CAS4 - EVGA GeForce 8800 GTX - GA-P35-DS3L (Rev. 1) - Windows XP Pro 32-bit - 24" LG L246WP - 21.5" Acer H213H - Logitech G9 - Cooler Master CM 690 Case - Corsair HX620 - Western Digital Raptor 150 GB - Western Digital Caviar Black 1 TB
Netbook: Acer Aspire One A110-1995 - 8.9" LED - 8 GB SSD (+ 8 GB SD Card) - 1 GB RAM - Windows XP Home (32-bit) - Seashell White
HTPC: Gateway EC1803h - Intel Core 2 Solo SU3500 1.4 GHz - 11.6" WXGA LED - 3 GB - 250 GB HDD - Intel GMA 4500MHD - HDMI out - 802.11n - flush 6-cell - Windows 7 Home Premium
  #10  
Old 09-12-2009, 02:51 PM
unclewebb [H]ard|Gawd, 4.2 Years
 
unclewebb is offline
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.
  #11  
Old 09-12-2009, 02:52 PM
GotNoRice 2[H]4U, 9.2 Years
 
GotNoRice is online now
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 by GotNoRice; 09-12-2009 at 03:03 PM..
__________________
Main Rig: Q9650 E0 @ 4.4Ghz (Tuniq Tower 120) - Gigabyte EP45-UD3P - 2x 4870x2 Quad CrossfireX - 6GB PC8500 - X-Fi Titanium PCI-E - BFG PhysX PPU - Intel X25-M G2 - Antec TruePower Quattro 1000w
LAN Rig: Q6600 G0 @ 3.6Ghz - Asus P5Q-Pro - 2x 4850 Crossfire - 4GB PC6400 - Audigy2 ZS - 2x 15k 36gb SCSI Raid-0, 2x 10k 146gb SCSI Raid-0 - Antec Earthwatts EA650
Server/Low Power Rig: Core i5 650 @ 3.85Ghz - Asus P7H55-M PRO - 9800GT 1GB - 4GB DDR3 - FSP 550w PSU
  #12  
Old 09-12-2009, 02:57 PM
bigdogchris [H]ardness Supreme, 2.5 Years
 
bigdogchris is online now
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.
__________________
Japanese cosplay ftw
PS3 ftw
PhysX ftl

"I can tell you that in the United States, the fact that we have free Internet Service — or unrestricted Internet — is a source of strength, and I think should be encouraged." ~ Supreme Leader Obama
  #13  
Old 09-12-2009, 03:08 PM
unclewebb [H]ard|Gawd, 4.2 Years
 
unclewebb is offline
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/...pu,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.
  #14  
Old 09-12-2009, 06:07 PM
shurcooL Gawd, 2.9 Years
 
shurcooL is offline
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.

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 by shurcooL; 09-12-2009 at 06:13 PM..
__________________
Desktop: Q6600 G0 - TRUE 120 (Original) - 2 GB Corsair DDR2-800 CAS4 - EVGA GeForce 8800 GTX - GA-P35-DS3L (Rev. 1) - Windows XP Pro 32-bit - 24" LG L246WP - 21.5" Acer H213H - Logitech G9 - Cooler Master CM 690 Case - Corsair HX620 - Western Digital Raptor 150 GB - Western Digital Caviar Black 1 TB
Netbook: Acer Aspire One A110-1995 - 8.9" LED - 8 GB SSD (+ 8 GB SD Card) - 1 GB RAM - Windows XP Home (32-bit) - Seashell White
HTPC: Gateway EC1803h - Intel Core 2 Solo SU3500 1.4 GHz - 11.6" WXGA LED - 3 GB - 250 GB HDD - Intel GMA 4500MHD - HDMI out - 802.11n - flush 6-cell - Windows 7 Home Premium
  #15  
Old 09-12-2009, 06:08 PM
Zero82z [H]ard|DCer of the Month - July 2009, 6.6 Years
 
Zero82z is offline
Quote:
Originally Posted by shurcooL View Post
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.
__________________
Main: i7 920 @4.1GHz w/Zalman CNPS10X Flex, ASUS Rampage II Extreme, 6GB Corsair DDR3-1600MHz, XFX HD 5870, EVGA GTX260, ASUS Xonar DX, Intel X25-M 80GB, Samsung 1TB F3 + 1TB F1, Kingwin Lazer Gold 1kW, CM ATCS 840, Dell S2209W, Samsung 712N, Windows 7 Pro x64.
Folding/2nd: Q9550 @3.8GHz w/Xigmatek HDT-S1283, ASUS P5Q Pro, 4GB G.Skill DDR2-1000, MSI TwinFrozr GTX260, WD 640GB, Corsair HX520, CM Centurion 590, Dell 1905FP, Windows 7 Pro x64.

\Well hey, you know more about this than I do so I am going to stfu and move along. - Kyle_Bennett
[H]ard|OCP Unofficial IRC Channel: irc://irc.dp.cx:6667 #hardocp | Heatware: Zero82z
  #16  
Old 09-12-2009, 06:37 PM
keenan 2[H]4U, 1.1 Years
 
keenan is offline
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/2...rthreading.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.
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 07:58 PM.


Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright 2000 - 2010 KB Networks, Inc.