I just read the Article on Hyper-threading, and was left with a feeling
that major points were missing and that the article was generally
misleading.
As I understand it, hyper-threading allows the CPU to execute
instruction in parallel, whenever two instruction does not touch the
same registers. Additional hardware ensures that no "primary" thread
exists, and that both threads running on the CPU are served almost
equally. Do please note, that HT is not two CPU's in one, but a extra
virtual CPU, as noted in the article.
Now comes the frustrating points:
1) The graph on "Hyper-Threading: A Virtual Dual CPU System", is very
misleading. It seems the indicate that is is not possible to utilize
the CPU 100% without HT, if two threads running in parallel does not
utilize the CPU 100% each. This is simply untrue. The OS should be
able to switch to the next thread, as soon as one thread makes a
blocking system call. This means that the CPU will _always_ be
utilized 100% if there exist a thread which can be executed on the
CPU. HT however can "over-utilize" the CPU better than non-HT CPU's, as
it has more instructions to choose from when trying to find two
instruction that does not touch the same registers. So a HT enabled
CPU may perform 105% clock cycle vice compared to a non-HT CPU. That
said, there can be huge improvements for threads that often synchronize
with each other, but that is really a big study and is subject for a
Ph.d.
2) The Conclusion of the article, is that HT CPU's outperforms non-HP
CPU's whenever multiple CPU-intensive programs are run in
parallel. Please - HT enabled CPU are not much faster than non-HT
CPU's. The reason for the "it feels better (TM)" is that threads
cannot starve other threads (if there is only two thread running at
the same time). If more than two CPU intensive threads are running on
the system, starvation can still occur. What the conclusion of the
article indicates is that the Windows scheduler does a really poor job
- Not that HT is better. Its like curing the symptoms of a badly
written OS. (Please note that I'm not favoring other OSes over Windows
- I do not know the implementation of the Windows scheduler
implementation well enough to do that. But it would be interesting to
see how the same tests performs on, say, Linux 2.5.)
My conclusion (from a theoretical point of view) would be: If you
usually play games, HT is nothing for you - go with the clock-rate. If
you however run multiple programs in parallel (recording videos,
ripping Cd's and browse the Internet), and cannot afford a real dual
system, then HT will provide a more interactive feel, but if the clock
rate is lower for the HT enable CPU (compared to the clock freq. of non-HT enabled CPU's), encoding and recording will take longer.
I would go for HT anytime, as I do not care for games that much.
Lastly, The article seems to indicate that only Windows supports HT.
Not that Linux does also - I do not know about other OSes for the Intel platform.
Regards
that major points were missing and that the article was generally
misleading.
As I understand it, hyper-threading allows the CPU to execute
instruction in parallel, whenever two instruction does not touch the
same registers. Additional hardware ensures that no "primary" thread
exists, and that both threads running on the CPU are served almost
equally. Do please note, that HT is not two CPU's in one, but a extra
virtual CPU, as noted in the article.
Now comes the frustrating points:
1) The graph on "Hyper-Threading: A Virtual Dual CPU System", is very
misleading. It seems the indicate that is is not possible to utilize
the CPU 100% without HT, if two threads running in parallel does not
utilize the CPU 100% each. This is simply untrue. The OS should be
able to switch to the next thread, as soon as one thread makes a
blocking system call. This means that the CPU will _always_ be
utilized 100% if there exist a thread which can be executed on the
CPU. HT however can "over-utilize" the CPU better than non-HT CPU's, as
it has more instructions to choose from when trying to find two
instruction that does not touch the same registers. So a HT enabled
CPU may perform 105% clock cycle vice compared to a non-HT CPU. That
said, there can be huge improvements for threads that often synchronize
with each other, but that is really a big study and is subject for a
Ph.d.
2) The Conclusion of the article, is that HT CPU's outperforms non-HP
CPU's whenever multiple CPU-intensive programs are run in
parallel. Please - HT enabled CPU are not much faster than non-HT
CPU's. The reason for the "it feels better (TM)" is that threads
cannot starve other threads (if there is only two thread running at
the same time). If more than two CPU intensive threads are running on
the system, starvation can still occur. What the conclusion of the
article indicates is that the Windows scheduler does a really poor job
- Not that HT is better. Its like curing the symptoms of a badly
written OS. (Please note that I'm not favoring other OSes over Windows
- I do not know the implementation of the Windows scheduler
implementation well enough to do that. But it would be interesting to
see how the same tests performs on, say, Linux 2.5.)
My conclusion (from a theoretical point of view) would be: If you
usually play games, HT is nothing for you - go with the clock-rate. If
you however run multiple programs in parallel (recording videos,
ripping Cd's and browse the Internet), and cannot afford a real dual
system, then HT will provide a more interactive feel, but if the clock
rate is lower for the HT enable CPU (compared to the clock freq. of non-HT enabled CPU's), encoding and recording will take longer.
I would go for HT anytime, as I do not care for games that much.
Lastly, The article seems to indicate that only Windows supports HT.
Not that Linux does also - I do not know about other OSes for the Intel platform.
Regards