{"id":1127,"date":"2011-03-18T17:45:49","date_gmt":"2011-03-18T17:45:49","guid":{"rendered":"http:\/\/mccltd.net\/blog\/?p=1127"},"modified":"2011-03-18T17:45:49","modified_gmt":"2011-03-18T17:45:49","slug":"hyperthreading-technology","status":"publish","type":"post","link":"http:\/\/darenmatthews.com\/blog\/?p=1127","title":{"rendered":"Hyperthreading Technology"},"content":{"rendered":"<p>Modern processors can only handle one instruction from one program at any given point in time. Each instruction that is sent to the processor is called a thread. Even though it seems as if you&#8217;re multitasking with your computer (running more then one program at a time) you&#8217;re really not .<!--more--><\/p>\n<p>The CPU will divide it&#8217;s time and power evenly between all the programs by switching back and forth. This little charade of switching back and forth tricks the end user (you and me) and gives us the sense of multitasking.<\/p>\n<p>Dual CPU based systems can work on two independent threads of information from the software but each processor is still limited at working on one thread at any given moment though. The software must be able to dish out two separate pieces of information like Win2000 or Adobe Photoshop for a dual processor system to be really used, by the way.<\/p>\n<p>The Pentium 4 3.06 GHz processor was the first Intel desktop processor in history that can process two independent threads at the same time. With a SMT (Simultaneous Multi-Thread) enabled OS like Win2000\/XP, Linux, etc. the operation system will identify the P4 3.06 GHz CPU as two logical processors that share the single physical CPU&#8217;s resources.<\/p>\n<p>A physical processor can be thought of as the chip itself, whereas a logica processor is what the computer sees &#8211; with Hyper-Threading enabled the computer can have one physical processor installed in the motherboard, but the computer will see two logical processors, and treat the system as if there were actually two processors.<\/p>\n<p><a href=\"http:\/\/darenmatthews.com\/blog\/wp-content\/uploads\/2011\/01\/hyperthreading_image11.gif\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-1132\" title=\"hyperthreading_image1\" src=\"http:\/\/darenmatthews.com\/blog\/wp-content\/uploads\/2011\/01\/hyperthreading_image11.gif\" alt=\"hyperthreading_image1\" width=\"456\" height=\"336\" srcset=\"http:\/\/darenmatthews.com\/blog\/wp-content\/uploads\/2011\/01\/hyperthreading_image11.gif 456w, http:\/\/darenmatthews.com\/blog\/wp-content\/uploads\/2011\/01\/hyperthreading_image11-300x221.gif 300w\" sizes=\"(max-width: 456px) 100vw, 456px\" \/><\/a><\/p>\n<p>Even when we put a regular processor under 100% load, we&#8217;re never fully utilizing 100% of the execution units. With a HyperThreading enabled processor those spare execution units can used towards computing other things now.<\/p>\n<p><strong>CPU Utilisation:<\/strong><\/p>\n<p><a href=\"http:\/\/darenmatthews.com\/blog\/wp-content\/uploads\/2011\/01\/hyperthreading_image22.gif\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-1135\" title=\"hyperthreading_image2\" src=\"http:\/\/darenmatthews.com\/blog\/wp-content\/uploads\/2011\/01\/hyperthreading_image22.gif\" alt=\"hyperthreading_image2\" width=\"461\" height=\"337\" srcset=\"http:\/\/darenmatthews.com\/blog\/wp-content\/uploads\/2011\/01\/hyperthreading_image22.gif 461w, http:\/\/darenmatthews.com\/blog\/wp-content\/uploads\/2011\/01\/hyperthreading_image22-300x219.gif 300w\" sizes=\"(max-width: 461px) 100vw, 461px\" \/><\/a><br \/>\nAs you can see from the slides above (from the Intel Developer Forum) the single Superscalar processor is busy computing information however about half the processor remains unused. In the Multiprocessing portion of the demonstration we see a dual CPU system working on two separate threads, however again about 50% of both CPU&#8217;s remain unutilized.<\/p>\n<p>In the last HyperThreading enabled processor, both threads are simultaneously being computed, and the CPU&#8217;s efficiency has increased from around 50% to over 90%!<\/p>\n<p>The last example is of dual HyperThreading enabled processors which can work on four independent threads at the same time. Again CPU efficiency is around 90% (and in this case there would be four logical processors, and two physical processors).<\/p>\n<p>While this all sounds very good in the above example, it&#8217;s also about the most ideal situation ever &#8211; so let&#8217;s get back to the real world.<\/p>\n<p>As the above sample shows, there is a bit of overlapping when computing threads. In the execution units which are &#8220;overlapped&#8221;, the processor now it has twice as much work to do and would not be any faster then a regular Superscalar processor working on the same information separately.<\/p>\n<p>If you were to run two pieces of software that are completely different, and use different execution units, your system performance should get a noticeable boost however!<\/p>\n<p>The operating system will also play a key role in how well HyperThreading works. The OS assigns operations to the independent logical processors, and so if it&#8217;s determined that one of the logical CPU&#8217;s is to remain idle, the OS will issue a HALT command to the free logical processor thus devoting all of the other system resources to the working logical processor.<\/p>\n<p>As you can see, HyperThreading has the potential to significantly boost system performance under certain circumstances. From Xeon\/HyperThreading test results over at Anandtech you get a feel that HyperThreading Technology is still in it&#8217;s infancy in terms of real added value across the board. As it stands now, the performance that HT brings to the table is still very application specific. Some programs will notice a performance boost, and in some cases, other programs will see a performance hit with HT enabled.<\/p>\n<p>As more and more software is written specifically for HyperThreading, the performance differences will grow larger. It didn&#8217;t take long for software developers to adopt SSE2, hopefully they&#8217;ll jump on the HyperThreading bandwagon quickly and the consumer will see the benefit of this this ingenuous technology quickly.<\/p>\n<p><a href=\"http:\/\/www.pcstats.com\/articleview.cfm?articleID=1302\" target=\"_blank\">source<\/a><\/p>\n<div id=\"_mcePaste\" style=\"position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;\"><span style=\"font-family: verdana; color: black; font-size: x-small;\"><span><span class=\"artcat\"><span style=\"font-family: Verdana; font-size: x-small;\">Modern  processors can only handle one instruction from one program at  any given point in time. Each instruction that is sent to the processor is called a  thread. What I mean is that even though it looks like you&#8217;re <em>multitasking<\/em> with your computer (running more then one  program at a time) you&#8217;re <em>really not<\/em> .<\/span><\/p>\n<p><span style=\"font-family: Verdana; font-size: x-small;\"> The CPU  will divide it&#8217;s time and power evenly between all the programs by switching back  and forth. This little charade of switching back and forth tricks the end  user (you and me) and gives us    the sense of  multitasking.<\/span><\/p>\n<p><span style=\"font-family: Verdana; font-size: x-small;\"> Dual CPU based systems can work  on two independent threads of information from the software  but  each  processor is still limited at working on one thread at any given moment though.  The software must be able to dish out two separate pieces of  information like Win2000       or Adobe Photoshop for  a <a id=\"KonaLink2\" class=\"kLink\" style=\"text-decoration: underline ! important; position: static; font-family: inherit ! important; font-weight: inherit ! important; font-size: inherit ! important;\" href=\"http:\/\/www.pcstats.com\/articleview.cfm?articleID=1302#\"><span style=\"color: #3e6a8d ! important; font-weight: inherit ! important; font-size: inherit ! important; position: static;\"><span class=\"kLink\" style=\"color: #3e6a8d ! important; font-family: inherit ! important; font-weight: inherit ! important; font-size: inherit ! important; position: relative; border-bottom: 1px solid #3e6a8d; background-color: transparent;\">dual <\/span><span class=\"kLink\" style=\"color: #3e6a8d ! important; font-family: inherit ! important; font-weight: inherit ! important; font-size: inherit ! important; position: relative; border-bottom: 1px solid #3e6a8d; background-color: transparent;\">processor<\/span><\/span><\/a> system to be really used, by the way.<\/span><\/p>\n<p><span style=\"font-family: Verdana; font-size: x-small;\"><strong>So what&#8217;s new with the Pentium4 3.06GHz  processor?<\/strong> <\/span><\/p>\n<p><span style=\"font-family: Verdana; font-size: x-small;\">The  Pentium 4 3.06 GHz processor is the first Intel desktop processor in history  that can process two independent threads at the same time. With a SMT  (Simultaneous Multi-Thread) enabled OS like Win2000\/XP, <a id=\"KonaLink3\" class=\"kLink\" style=\"text-decoration: underline ! important; position: static; font-family: inherit ! important; font-weight: inherit ! important; font-size: inherit ! important;\" href=\"http:\/\/www.pcstats.com\/articleview.cfm?articleID=1302#\"><span style=\"color: #3e6a8d ! important; font-weight: inherit ! important; font-size: inherit ! important; position: static;\"><span class=\"kLink\" style=\"color: #3e6a8d ! important; font-family: inherit ! important; font-weight: inherit ! important; font-size: inherit ! important; position: relative;\">Linux<\/span><\/span><\/a>, etc. the  operation system will identify the P4 3.06 GHz CPU as two <em>logical<\/em> processors that share the single physical CPU&#8217;s resources. A physical processor  can be thought of as the chip itself, whereas a logica processor is what the  computer sees &#8211; with Hyper-Threading enabled the computer  can have one physical processor installed in the motherboard, but the computer will  see two logical processors, and treat the system as if there were actually two  processors.<\/span><\/p>\n<p align=\"center\"><img loading=\"lazy\" src=\"http:\/\/www.pcstats.com\/articleimages\/122002\/hyperthreading_image2.gif\" border=\"0\" alt=\"\" width=\"456\" height=\"336\" \/><\/p>\n<p align=\"left\"><span style=\"font-family: Verdana; font-size: x-small;\">Even when we put a regular processor  under 100% load, we&#8217;re never fully utilizing 100% of the execution units. With a  HyperThreading enabled processor those spare execution units can used towards  computing other things now.<\/span><\/p>\n<p align=\"left\"><span style=\"font-family: Verdana; font-size: x-small;\"><strong>CPU  Utilization:<\/strong><\/span><\/p>\n<p align=\"center\"><img loading=\"lazy\" src=\"http:\/\/www.pcstats.com\/articleimages\/122002\/hyperthreading_image1.gif\" border=\"0\" alt=\"\" width=\"461\" height=\"337\" \/><\/p>\n<p align=\"left\"><span style=\"font-family: Verdana; font-size: x-small;\">As you can see from the slides above (from the Intel  Developer Forum) the single Superscalar processor is busy computing information  however about half the processor remains unused. In the Multiprocessing portion  of the demonstration we see a dual CPU system working on two separate threads, however again about  50% of both CPU&#8217;s remain unutilized.<\/span><\/p>\n<p align=\"left\"><span style=\"font-family: Verdana; font-size: x-small;\">In the last HyperThreading enabled processor, both threads  are simultaneously being computed, and the CPU&#8217;s efficiency has increased  from around 50% to over 90%!<\/span><\/p>\n<p align=\"left\"><span style=\"font-family: Verdana; font-size: x-small;\">The last example is of dual HyperThreading enabled processors  which can work on four independent threads at the same time. Again CPU  efficiency is around 90% (and in this case there would be four  logical processors, and two physical processors).<\/span><\/p>\n<p align=\"left\"><span style=\"font-family: Verdana; font-size: x-small;\"> While this all sounds very  good in the above example, it&#8217;s also about the most ideal situation  ever &#8211; so let&#8217;s get back to the real  world.<\/span><\/p>\n<p align=\"left\"><span style=\"font-family: Verdana; font-size: x-small;\"> As the above sample shows, there is a bit of overlapping  when computing threads. In the execution units which are &#8220;overlapped&#8221;, the processor now it has  twice as much work to do and would not be any faster  then a regular Superscalar processor working on the same information  separately.<\/span><\/p>\n<p align=\"left\"><span style=\"font-family: Verdana; font-size: x-small;\"> If you were to run  two pieces of software that are completely different, and use different execution  units, your system performance should get a noticeable boost  however!<\/span><\/p>\n<p align=\"left\"><span style=\"font-family: Verdana; font-size: x-small;\">The <a id=\"KonaLink4\" class=\"kLink\" style=\"text-decoration: underline ! important; position: static; font-family: inherit ! important; font-weight: inherit ! important; font-size: inherit ! important;\" href=\"http:\/\/www.pcstats.com\/articleview.cfm?articleID=1302#\"><span style=\"color: #3e6a8d ! important; font-weight: inherit ! important; font-size: inherit ! important; position: static;\"><span class=\"kLink\" style=\"color: #3e6a8d ! important; font-family: inherit ! important; font-weight: inherit ! important; font-size: inherit ! important; position: relative;\">operating <\/span><span class=\"kLink\" style=\"color: #3e6a8d ! important; font-family: inherit ! important; font-weight: inherit ! important; font-size: inherit ! important; position: relative;\">system<\/span><\/span><\/a> will also play a key<strong> <\/strong> role in how well HyperThreading works. The OS assigns  <a id=\"KonaLink5\" class=\"kLink\" style=\"text-decoration: underline ! important; position: static; font-family: inherit ! important; font-weight: inherit ! important; font-size: inherit ! important;\" href=\"http:\/\/www.pcstats.com\/articleview.cfm?articleID=1302#\"><span style=\"color: #3e6a8d ! important; font-weight: inherit ! important; font-size: inherit ! important; position: static;\"><span class=\"kLink\" style=\"color: #3e6a8d ! important; font-family: inherit ! important; font-weight: inherit ! important; font-size: inherit ! important; position: relative;\">operations<\/span><\/span><\/a> to the independent logical processors, and so if it&#8217;s determined  that one of the logical CPU&#8217;s is to remain idle, the OS will issue a HALT  command to the free logical processor thus devoting all of the other system  resources to the working logical processor. <\/span><\/p>\n<p align=\"left\"><span style=\"font-family: Verdana; font-size: x-small;\">As you can see, HyperThreading has the potential to significantly boost  <a id=\"KonaLink6\" class=\"kLink\" style=\"text-decoration: underline ! important; position: static; font-family: inherit ! important; font-weight: inherit ! important; font-size: inherit ! important;\" href=\"http:\/\/www.pcstats.com\/articleview.cfm?articleID=1302#\"><span style=\"color: #3e6a8d ! important; font-weight: inherit ! important; font-size: inherit ! important; position: static;\"><span class=\"kLink\" style=\"color: #3e6a8d ! important; font-family: inherit ! important; font-weight: inherit ! important; font-size: inherit ! important; position: relative; border-bottom: 1px solid #3e6a8d; background-color: transparent;\">system <\/span><span class=\"kLink\" style=\"color: #3e6a8d ! important; font-family: inherit ! important; font-weight: inherit ! important; font-size: inherit ! important; position: relative; border-bottom: 1px solid #3e6a8d; background-color: transparent;\">performance<\/span><\/span><\/a> under certain circumstances. From Xeon\/HyperThreading test results over at <a href=\"http:\/\/www.anandtech.com\/IT\/showdoc.html?i=1606&amp;p=5\">Anandtech<\/a> you get a feel that HyperThreading  Technology is still in it&#8217;s infancy in terms  of real added value across the board. As it stands now, the performance that HT  brings to the table is still very <a id=\"KonaLink7\" class=\"kLink\" style=\"text-decoration: underline ! important; position: static; font-family: inherit ! important; font-weight: inherit ! important; font-size: inherit ! important;\" href=\"http:\/\/www.pcstats.com\/articleview.cfm?articleID=1302#\"><span style=\"color: #3e6a8d ! important; font-weight: inherit ! important; font-size: inherit ! important; position: static;\"><span class=\"kLink\" style=\"color: #3e6a8d ! important; font-family: inherit ! important; font-weight: inherit ! important; font-size: inherit ! important; position: relative;\">application<\/span><\/span><\/a> specific.  Some programs will notice a performance boost, and in some cases, other programs  will see a performance hit with HT enabled.<\/span><\/p>\n<p align=\"left\"><span style=\"font-family: Verdana; font-size: x-small;\">As more and  more software is written specifically for HyperThreading, the performance differences will grow larger. It  didn&#8217;t take long for software developers to adopt SSE2,  hopefully they&#8217;ll jump on the HyperThreading bandwagon quickly and the consumer will see  the benefit of this this ingenuous technology quickly.<\/span><\/p>\n<p><\/span><\/span><\/span><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Modern processors can only handle one instruction from one program at any given point in time. Each instruction that is sent to the processor is called a thread. Even though it seems as if you&#8217;re multitasking with your computer (running more then one program at a time) you&#8217;re really not .<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[50],"tags":[],"_links":{"self":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1127"}],"collection":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1127"}],"version-history":[{"count":11,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1127\/revisions"}],"predecessor-version":[{"id":1184,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1127\/revisions\/1184"}],"wp:attachment":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1127"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}