When I go to the task manager I see 8 processors but I know that I have 4. Why?
Answer
Hyper-threading abstracts away task switching from the operating systems. Normally an operating system has to deal with scheduling processes over different CPUs as well as ensuring that each task that runs on the system has its fair share, but not too much (if something else wants it) of the CPU.
Hyper-threading is a way of taking that 2nd process of task sharing away from the operating system, at least for a little bit. The reason is that the processor can task switch much faster than the operating system can tell it to. So by presenting two logical processors when there is in fact only one, the operating system has to do only half as many task switching operations, but more CPU scheduling. But the net result is supposedly a faster machine in multi-tasking operations.
The actual benefits of this vary greatly depending on the workload that you're doing. For most people, there is no harm in leaving it on or turning it off. 4 vs 8 threads is like choosing between a ferrari or a lamborghini for home users.
However, in server scenarios, it can make a large difference. For example, hypervisors can often get a large increase in speed through the use of hyperthreading, as they have very strict CPU scheduling requirements.
However, SQL servers often do not get this increase, because it's often better to have four "large" threads than 8 "medium" sized threads.
No comments:
Post a Comment