Overclock.net › Forums › General Hardware › General Processor Discussions › Hyperthreading, how do you work?
New Posts  All Forums:Forum Nav:

Hyperthreading, how do you work?

post #1 of 10
Thread Starter 
^^^
post #2 of 10
It basically allows a single processor core to appear to be two processor cores to the OS. The drawback is that you are still working with the resources allocated to a single core. This is why it is better suited for programs that are highly parallel. This is the most basic explanation you could get, but it is a very very complex process.
I Love Cheese
(13 items)
 
  
CPUMotherboardGraphicsRAM
2600k @ 3.4 Asus P8P67 Basic XFX 5970 2 gig Black Edition 2x 4 gig DDR 1600 G-Skill 
Hard DriveOSMonitorPower
2x500 gig WD Vista Ultimate 64-bit Dual 25" Hannspree LCD CM 750 Watt 
CaseMouse
Rosewill THOR Logitech Trackball 
  hide details  
Reply
I Love Cheese
(13 items)
 
  
CPUMotherboardGraphicsRAM
2600k @ 3.4 Asus P8P67 Basic XFX 5970 2 gig Black Edition 2x 4 gig DDR 1600 G-Skill 
Hard DriveOSMonitorPower
2x500 gig WD Vista Ultimate 64-bit Dual 25" Hannspree LCD CM 750 Watt 
CaseMouse
Rosewill THOR Logitech Trackball 
  hide details  
Reply
post #3 of 10
Thread Starter 
Quote:
Originally Posted by joemaniaci View Post
It basically allows a single processor core to appear to be two processor cores to the OS. The drawback is that you are still working with the resources allocated to a single core. This is why it is better suited for programs that are highly parallel. This is the most basic explanation you could get, but it is a very very complex process.
For once, I wouldn't mind the elaboration of how it works.
post #4 of 10
It's really basic, physical cores can create virtual cores which are known as threads. It doesn't offer much of a performance boost because the thread(s) resources are only at one place, the physical core(s). If you want to know if threads or cores are better, it's really basic. Cores are better than threads.
Trinity
(19 items)
 
  
CPUMotherboardGraphicsRAM
AMD A10-5800K Biostar Hi-Fi A85W APU Integrated Graphics G.Skill 8GB (2 x 4GB) 1600MHz CL9 
Hard DriveHard DriveOptical DriveCooling
Crucial M4 64GB Western Digital WD Blue 500GB Lite-On iHAS124 CD/DVD Burner Cooler Master Hyper 212 EVO (Pull Configuration) 
OSMonitorMonitorKeyboard
Windows 7 Home Premium 64-Bit NEC MultiSync LCD1970VX NEC MultiSync LCD1970VX Filco Majestouch Black w/ Cherry MX Blue (JIS l... 
PowerCaseMouseMouse Pad
Corsair CX430 NZXT Source 220 Logitech Click! Mouse SteelSeries QcK Mini Diablo III Edition 
AudioAudioOther
Sony SRS-T10PC USB Portable Speaker Realtek Onboard Audio Intel Centrino Desktop Wireless 
  hide details  
Reply
Trinity
(19 items)
 
  
CPUMotherboardGraphicsRAM
AMD A10-5800K Biostar Hi-Fi A85W APU Integrated Graphics G.Skill 8GB (2 x 4GB) 1600MHz CL9 
Hard DriveHard DriveOptical DriveCooling
Crucial M4 64GB Western Digital WD Blue 500GB Lite-On iHAS124 CD/DVD Burner Cooler Master Hyper 212 EVO (Pull Configuration) 
OSMonitorMonitorKeyboard
Windows 7 Home Premium 64-Bit NEC MultiSync LCD1970VX NEC MultiSync LCD1970VX Filco Majestouch Black w/ Cherry MX Blue (JIS l... 
PowerCaseMouseMouse Pad
Corsair CX430 NZXT Source 220 Logitech Click! Mouse SteelSeries QcK Mini Diablo III Edition 
AudioAudioOther
Sony SRS-T10PC USB Portable Speaker Realtek Onboard Audio Intel Centrino Desktop Wireless 
  hide details  
Reply
post #5 of 10
Say you have four people working for you. With a normal quad core, each person can only do one job and they have a limited amount of resources allocated to them. With Hyper-Threading, each person can do two jobs, but like joemaniaci said, that worker still only has the resources he had if he were doing one job. It helps things that require multiple cores (or workers) to get done quicker, but these four workers each doing two jobs aren't as efficient as say eight workers each doing one job.
Poison Ivy
(31 items)
 
  
CPUMotherboardGraphicsRAM
i7 3770K (4.4GHz @ 1.26V) ASRock Z77 Extreme6 EVGA GTX 980Ti ACX 2.0+ 8GB G.SKILL Trident X 2400MHz 
Hard DriveHard DriveCoolingCooling
256GB Samsung 850 Pro 256GB Samsung 840 Pro Rasa RS240 Phobya Xtreme 200mm Radiator 
OSMonitorMonitorKeyboard
Windows 8.1 Pro 64-bit Dell U2412M QNIX QX2710LED Leopold FC660M (MX Clears) 
PowerCaseMouseMouse Pad
Corsair AX850 Corsair 600T White Edition SteelSeries Rival Glorious PC Gaming Race Desk Pad 
AudioAudioAudioAudio
Sony STR-K900 Receiver Bic America F12 Sub Sennheiser HD600 Beyerdynamic DT 770 Pro 80 
AudioAudioAudioAudio
FiiO E7 Little Dot MKIII AntLion ModMic 4.0 ART DJPre2 Phono Preamp 
AudioAudioAudioOther
Technics SL-DL1 Turntable TEAC EQA-22 Equalizer Pioneer SP-BS22-LR Bookshelf Speakers Logitech G27 Racing Wheel 
OtherOtherOther
Planck Keyboard Carbon Keycap Set Mount-It! Dual Monitor Desk Mount 
  hide details  
Reply
Poison Ivy
(31 items)
 
  
CPUMotherboardGraphicsRAM
i7 3770K (4.4GHz @ 1.26V) ASRock Z77 Extreme6 EVGA GTX 980Ti ACX 2.0+ 8GB G.SKILL Trident X 2400MHz 
Hard DriveHard DriveCoolingCooling
256GB Samsung 850 Pro 256GB Samsung 840 Pro Rasa RS240 Phobya Xtreme 200mm Radiator 
OSMonitorMonitorKeyboard
Windows 8.1 Pro 64-bit Dell U2412M QNIX QX2710LED Leopold FC660M (MX Clears) 
PowerCaseMouseMouse Pad
Corsair AX850 Corsair 600T White Edition SteelSeries Rival Glorious PC Gaming Race Desk Pad 
AudioAudioAudioAudio
Sony STR-K900 Receiver Bic America F12 Sub Sennheiser HD600 Beyerdynamic DT 770 Pro 80 
AudioAudioAudioAudio
FiiO E7 Little Dot MKIII AntLion ModMic 4.0 ART DJPre2 Phono Preamp 
AudioAudioAudioOther
Technics SL-DL1 Turntable TEAC EQA-22 Equalizer Pioneer SP-BS22-LR Bookshelf Speakers Logitech G27 Racing Wheel 
OtherOtherOther
Planck Keyboard Carbon Keycap Set Mount-It! Dual Monitor Desk Mount 
  hide details  
Reply
post #6 of 10
^As you can see in razr m3's example, you can process more files at once. Say you're uploading 8 folders on a 4 core cpu. If the cpu doesn't have threads, each one will have to do 2 folders each separately making it a bit slower. If each core has 2 threads, it can load all of the files at once.
Trinity
(19 items)
 
  
CPUMotherboardGraphicsRAM
AMD A10-5800K Biostar Hi-Fi A85W APU Integrated Graphics G.Skill 8GB (2 x 4GB) 1600MHz CL9 
Hard DriveHard DriveOptical DriveCooling
Crucial M4 64GB Western Digital WD Blue 500GB Lite-On iHAS124 CD/DVD Burner Cooler Master Hyper 212 EVO (Pull Configuration) 
OSMonitorMonitorKeyboard
Windows 7 Home Premium 64-Bit NEC MultiSync LCD1970VX NEC MultiSync LCD1970VX Filco Majestouch Black w/ Cherry MX Blue (JIS l... 
PowerCaseMouseMouse Pad
Corsair CX430 NZXT Source 220 Logitech Click! Mouse SteelSeries QcK Mini Diablo III Edition 
AudioAudioOther
Sony SRS-T10PC USB Portable Speaker Realtek Onboard Audio Intel Centrino Desktop Wireless 
  hide details  
Reply
Trinity
(19 items)
 
  
CPUMotherboardGraphicsRAM
AMD A10-5800K Biostar Hi-Fi A85W APU Integrated Graphics G.Skill 8GB (2 x 4GB) 1600MHz CL9 
Hard DriveHard DriveOptical DriveCooling
Crucial M4 64GB Western Digital WD Blue 500GB Lite-On iHAS124 CD/DVD Burner Cooler Master Hyper 212 EVO (Pull Configuration) 
OSMonitorMonitorKeyboard
Windows 7 Home Premium 64-Bit NEC MultiSync LCD1970VX NEC MultiSync LCD1970VX Filco Majestouch Black w/ Cherry MX Blue (JIS l... 
PowerCaseMouseMouse Pad
Corsair CX430 NZXT Source 220 Logitech Click! Mouse SteelSeries QcK Mini Diablo III Edition 
AudioAudioOther
Sony SRS-T10PC USB Portable Speaker Realtek Onboard Audio Intel Centrino Desktop Wireless 
  hide details  
Reply
post #7 of 10
Hyperthreading takes advantage of problems with processor pipelining to execute another thread if a thread gets stalled.

For example, assume a single-core non-HyperThreaded CPU. You can still run two threads because your operating system has a thread scheduler that splits CPU time between threads. It will look at thread priority and whether the thread can be scheduled (if a thread is waiting on user input or hard drive or network access, it might not be schedulable) to figure this out.

Now on a single-core HyperThreaded CPU, some physical resources used to manage thread state are duplicated, but there is still only one physical execution core. This makes it appear as two cores to the operating system.

I won't go into memory hierarchy too much, but modern systems have different levels of memory: L1, L2, (sometimes) L3, main RAM, and page file (on your hard drive). As you move down that list, access gets slower and slower. Sometimes the CPU encounters a cache miss, this is what happens when it requests data that is not present in L1 cache and so it checks L2 cache. If it misses there, too, it checks L3, then RAM, finally your page file. Memory access is fairly slow and gets slower depending on which level of RAM it accesses. If the CPU accesses L1 cache, it might only have to wait ten cycles before the data comes back. For L2 cache it might be a hundred. For main RAM it might be in the tens of thousands, and for your page file it could be several billion. Normal CPUs actually stall if this happens, they're just stuck waiting for the data to come back and that core can't do anything. The operating system doesn't have enough awareness of your memory to take this into consideration when scheduling threads.

HyperThreading allows greater throughput by switching to a different thread if a thread stalls due to a cache miss. Multithreaded applications with large workloads that can't fit into CPU cache (most CPUs only have 2 - 8 MB of cache) will benefit the most from HyperThreading, which is why video encoding works great on it. Multithreaded applications with very tiny workloads may actually have performance suffer because the cache misses occur so infrequently that HT offers no benefit over the normal OS thread scheduler.

Hopefully that clears some things up. There's a lot more to it but this is about how much I know about HT.
post #8 of 10
Quote:
Originally Posted by mott555 View Post
Hyperthreading takes advantage of problems with processor pipelining to execute another thread if a thread gets stalled.

For example, assume a single-core non-HyperThreaded CPU. You can still run two threads because your operating system has a thread scheduler that splits CPU time between threads. It will look at thread priority and whether the thread can be scheduled (if a thread is waiting on user input or hard drive or network access, it might not be schedulable) to figure this out.

Now on a single-core HyperThreaded CPU, some physical resources used to manage thread state are duplicated, but there is still only one physical execution core. This makes it appear as two cores to the operating system.

I won't go into memory hierarchy too much, but modern systems have different levels of memory: L1, L2, (sometimes) L3, main RAM, and page file (on your hard drive). As you move down that list, access gets slower and slower. Sometimes the CPU encounters a cache miss, this is what happens when it requests data that is not present in L1 cache and so it checks L2 cache. If it misses there, too, it checks L3, then RAM, finally your page file. Memory access is fairly slow and gets slower depending on which level of RAM it accesses. If the CPU accesses L1 cache, it might only have to wait ten cycles before the data comes back. For L2 cache it might be a hundred. For main RAM it might be in the tens of thousands, and for your page file it could be several billion. Normal CPUs actually stall if this happens, they're just stuck waiting for the data to come back and that core can't do anything. The operating system doesn't have enough awareness of your memory to take this into consideration when scheduling threads.

HyperThreading allows greater throughput by switching to a different thread if a thread stalls due to a cache miss. Multithreaded applications with large workloads that can't fit into CPU cache (most CPUs only have 2 - 8 MB of cache) will benefit the most from HyperThreading, which is why video encoding works great on it. Multithreaded applications with very tiny workloads may actually have performance suffer because the cache misses occur so infrequently that HT offers no benefit over the normal OS thread scheduler.

Hopefully that clears some things up. There's a lot more to it but this is about how much I know about HT.
I thought I understood hyperthreading until I read this ^. +rep.
The Dark Knight
(13 items)
 
Rebirth
(13 items)
 
 
CPUMotherboardGraphicsRAM
i5 2500K. 4.5Ghz (Summer Clocks) ASUS P8P67 Pro ( Rev 3.0 ) MSI 6970 Lightning (downclocked) CFX with MSI 6... 8GB G.Skill Sniper 1600Mhz 
Hard DriveOptical DriveOSMonitor
1 TB Spinpoint F3 +2TB F4(backups) Random LG drive Win7 SP1 64bit ASUS VH236H @1080p 
KeyboardPowerCase
Saitek Gaming keyboard ... >_> Corsair TX750 Rosewill Gear x3 
CPUMotherboardGraphicsRAM
C2D P8600 @ 2.4Ghz (undervolted) Crappy dell Studio XPS one 4670M (1GB) I don't remember... 
Hard DriveOptical DriveOSMonitor
Crucial M4 4x Blu-ray ROM Win7 SP1 64bit 15.6" WLED @ 1080p 
KeyboardPower
Old Saitek Gaming Keyboard 90W adapter 
  hide details  
Reply
The Dark Knight
(13 items)
 
Rebirth
(13 items)
 
 
CPUMotherboardGraphicsRAM
i5 2500K. 4.5Ghz (Summer Clocks) ASUS P8P67 Pro ( Rev 3.0 ) MSI 6970 Lightning (downclocked) CFX with MSI 6... 8GB G.Skill Sniper 1600Mhz 
Hard DriveOptical DriveOSMonitor
1 TB Spinpoint F3 +2TB F4(backups) Random LG drive Win7 SP1 64bit ASUS VH236H @1080p 
KeyboardPowerCase
Saitek Gaming keyboard ... >_> Corsair TX750 Rosewill Gear x3 
CPUMotherboardGraphicsRAM
C2D P8600 @ 2.4Ghz (undervolted) Crappy dell Studio XPS one 4670M (1GB) I don't remember... 
Hard DriveOptical DriveOSMonitor
Crucial M4 4x Blu-ray ROM Win7 SP1 64bit 15.6" WLED @ 1080p 
KeyboardPower
Old Saitek Gaming Keyboard 90W adapter 
  hide details  
Reply
post #9 of 10
Quote:
Originally Posted by mott555 View Post
Hyperthreading takes advantage of problems with processor pipelining to execute another thread if a thread gets stalled.

For example, assume a single-core non-HyperThreaded CPU. You can still run two threads because your operating system has a thread scheduler that splits CPU time between threads. It will look at thread priority and whether the thread can be scheduled (if a thread is waiting on user input or hard drive or network access, it might not be schedulable) to figure this out.

Now on a single-core HyperThreaded CPU, some physical resources used to manage thread state are duplicated, but there is still only one physical execution core. This makes it appear as two cores to the operating system.

I won't go into memory hierarchy too much, but modern systems have different levels of memory: L1, L2, (sometimes) L3, main RAM, and page file (on your hard drive). As you move down that list, access gets slower and slower. Sometimes the CPU encounters a cache miss, this is what happens when it requests data that is not present in L1 cache and so it checks L2 cache. If it misses there, too, it checks L3, then RAM, finally your page file. Memory access is fairly slow and gets slower depending on which level of RAM it accesses. If the CPU accesses L1 cache, it might only have to wait ten cycles before the data comes back. For L2 cache it might be a hundred. For main RAM it might be in the tens of thousands, and for your page file it could be several billion. Normal CPUs actually stall if this happens, they're just stuck waiting for the data to come back and that core can't do anything. The operating system doesn't have enough awareness of your memory to take this into consideration when scheduling threads.

HyperThreading allows greater throughput by switching to a different thread if a thread stalls due to a cache miss. Multithreaded applications with large workloads that can't fit into CPU cache (most CPUs only have 2 - 8 MB of cache) will benefit the most from HyperThreading, which is why video encoding works great on it. Multithreaded applications with very tiny workloads may actually have performance suffer because the cache misses occur so infrequently that HT offers no benefit over the normal OS thread scheduler.

Hopefully that clears some things up. There's a lot more to it but this is about how much I know about HT.
^+rep! amazing! great explanation!
post #10 of 10
Quote:
Originally Posted by mott555 View Post
Hyperthreading takes advantage of problems with processor pipelining to execute another thread if a thread gets stalled.

For example, assume a single-core non-HyperThreaded CPU. You can still run two threads because your operating system has a thread scheduler that splits CPU time between threads. It will look at thread priority and whether the thread can be scheduled (if a thread is waiting on user input or hard drive or network access, it might not be schedulable) to figure this out.

Now on a single-core HyperThreaded CPU, some physical resources used to manage thread state are duplicated, but there is still only one physical execution core. This makes it appear as two cores to the operating system.

I won't go into memory hierarchy too much, but modern systems have different levels of memory: L1, L2, (sometimes) L3, main RAM, and page file (on your hard drive). As you move down that list, access gets slower and slower. Sometimes the CPU encounters a cache miss, this is what happens when it requests data that is not present in L1 cache and so it checks L2 cache. If it misses there, too, it checks L3, then RAM, finally your page file. Memory access is fairly slow and gets slower depending on which level of RAM it accesses. If the CPU accesses L1 cache, it might only have to wait ten cycles before the data comes back. For L2 cache it might be a hundred. For main RAM it might be in the tens of thousands, and for your page file it could be several billion. Normal CPUs actually stall if this happens, they're just stuck waiting for the data to come back and that core can't do anything. The operating system doesn't have enough awareness of your memory to take this into consideration when scheduling threads.

HyperThreading allows greater throughput by switching to a different thread if a thread stalls due to a cache miss. Multithreaded applications with large workloads that can't fit into CPU cache (most CPUs only have 2 - 8 MB of cache) will benefit the most from HyperThreading, which is why video encoding works great on it. Multithreaded applications with very tiny workloads may actually have performance suffer because the cache misses occur so infrequently that HT offers no benefit over the normal OS thread scheduler.

Hopefully that clears some things up. There's a lot more to it but this is about how much I know about HT.
My brain just exploded. Didn't know anything about cache missing and junk.
Intel Computer
(13 items)
 
  
CPUMotherboardGraphicsRAM
[i5 2500k] [ASRock Z77 Extreme4-M] [EVGA GTX 560] [Kingston HyperX 8GB] 
Hard DriveOptical DriveOSMonitor
[Samsung F4 320gb] [Lite-On 24x Combo] [Windows 7 Ultimate 64bit] [Samsung SyncMaster 941bw] 
KeyboardPowerCaseMouse
[Microsft ANB-00001] [SeaSonic 520w M12II] [ASRock Z77 Extreme4-M Box] [Logitech G700] 
Mouse Pad
[Walmart Brand - Cloth Black] 
  hide details  
Reply
Intel Computer
(13 items)
 
  
CPUMotherboardGraphicsRAM
[i5 2500k] [ASRock Z77 Extreme4-M] [EVGA GTX 560] [Kingston HyperX 8GB] 
Hard DriveOptical DriveOSMonitor
[Samsung F4 320gb] [Lite-On 24x Combo] [Windows 7 Ultimate 64bit] [Samsung SyncMaster 941bw] 
KeyboardPowerCaseMouse
[Microsft ANB-00001] [SeaSonic 520w M12II] [ASRock Z77 Extreme4-M Box] [Logitech G700] 
Mouse Pad
[Walmart Brand - Cloth Black] 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: General Processor Discussions
Overclock.net › Forums › General Hardware › General Processor Discussions › Hyperthreading, how do you work?