Multi Threaded Processors
Multi Threaded Processors
About the Author David Burgart, Principal Engineer, has been with TeamQuest since its inception in 1991. Mr. Burgart specializes in TeamQuests flagship capacity modeling technology and is one of the primary architects for the capabilities described in this paper.
2 of 10
WHITE PAPER
Figure 1
Subscribe
3 of 10
WHITE PAPER
Figure 2
Subscribe
4 of 10
WHITE PAPER
Unfortunately, vendors dont provide this level of detail in multithreaded chips. To overcome the problem, we use available CPU statistics such as CPU seconds and logical CPU % busy. Then we solve a small model, with no user intervention, when the model is loaded to compute the single thread CPU service requirements. TeamQuest Model has included the concept of a load-dependent server for some time, but it is now being put to a new use; it has been employed to model the CPU Active Resource Queue. An LDS server is where the rate of service varies depending on the queue length. When modeling CPU Active Resource Queue in a multi-threaded environment, LDS is activated and CPU Active Resource Type is displayed as THREAD. The LDS requires the use of speedup factors. Since there are diminishing returns when adding threads to a core, speedup factors are necessary to maintain accuracy when adding threads to cores within the LDS. TeamQuest Model contains default speedup factors for many popular CPUs. The default speedup factors that we provide come from a combination of industry literature and our own testing experience. If you have performed application scalability testing in such environments and your application scales differently, Model provides a way for you to change the default values to better reflect your environment.
Subscribe
5 of 10
WHITE PAPER
The TeamQuest Model GUI now has several changes which make it easy to model todays multi-threading architectures. Instead of only being able to define CPU hardware using a CPU equipment name and the Number of CPUs, The hardware dialog box now expands the options to include a CPU equipment name, number of chips, number of cores per chip, and the number of threads per core. Most of the time TeamQuest Model knows the details for commonly used chips. Speedup factors are also easy to adjust using the new GUI. A dialog box appears with the default speedup factor for the System Type selected and the number of threads per core that was specified. This is where you can adjust the default speedup factors with data derived from your own application tests or other credible sources. On Windows, Linux, HP-UX, and VMware platforms with Intel hyperthreaded CPU hardware, you can control whether multi-threading is on or off at the CPU or hardware level. The Physical CPU Settings dialog box (accessed via the Active Resources spreadsheet by pressing the button in the Number of Servers column) allows you to control hyper-threading on or off just as you can with the real hardware. The hardware is capable of two threads per core, but if you set hyper-threading to Off the resulting number of servers per core will be reported as one. The IBM AIX platform also has controls to turn Simultaneous Multithreading on or off, but it is controlled at the Logical CPU level, not the Physical CPU or hardware level. Press the button in the logical CPU Number of Servers column and you will see the Logical CPU Settings dialog box. Here you can control the number of virtual CPUs that are assigned to this logical system and whether multi-threading is on or off at the logical system. Sun Solaris platforms do not have any controls to turn multithreading on or off. It is always on.
Subscribe
6 of 10
WHITE PAPER
This is no longer true with a multi-threading CPU architecture. When the CPU has more than a minimal utilization, the Effective Service Time will sometimes be greater than the Service Time. Figure 4B shows how multi-threading deviates from a traditional SMP straightline trend line (Figure 4A). In the case of this Solaris system using a Sun UltraSPARC T1 processor with four threads per core, the service time is indeed less than the effective service time. At low utilizations when there is only one thread per core active, however, it is likely that the service time will equal the effective service time and the utilization growth will be linear until more than one thread per core is active. But as the processor gets busier and more threads become active within the core, effective service will get progressively larger than the service time and the utilization growth will be larger than linear.
A Simple Example
To show the power of the new modeling capabilities of TeamQuest Model, we will use a Linux system running a Xeon CPU with 2 chips, 2 cores per chip and 2 threads per core for a total of eight logical CPUs. We first model this system with multi-threading is turned off. This model will act like an SMP processor with four servers. Figure 5
Subscribe
7 of 10
WHITE PAPER
When this model is solved with multi-threading turned off, the stretch factor for a mission critical workload is calculated to be 2.2. Stretch factor is an industry-accepted way to portray normalized response time delays. As a rule-of-thumb, it makes sense to consider changes whenever stretch factor is greater two. Figure 6 CPU Utilization is calculated to be 88%.
Figure 7 Now we are going to change the Intel CPU so that hyperthreading is on, resulting in the number of servers increasing from four to eight. As previously mentioned, we will press the button in the Number of Servers column for the physical CPU. The Physical CPU Settings dialog appears.
Figure 8
Subscribe
8 of 10
WHITE PAPER
We chose the On radio button in the Hyper-threading group box and press OK. The Number of servers is now eight. Now lets solve this model and see how the results change. The stretch factor drops approximately 1.54 compared to 2.22 when hyper-threading was turned off.
Figure 9 Similarly, CPU utilization when multi-threading is turned on has reduced to approximately 57% from 88% when hyperthreading was turned off.
Figure 10 As you can see, this application benefits from operating in a multi-threaded environment. CPU utilization was reduced dramatically, making headroom for more work and extending the life of the asset.
Subscribe
9 of 10
WHITE PAPER
Summary
As you can see, there are substantial differences between singlethreaded and multi-threaded architectures. In order to deal with the changes, TeamQuest has incorporated a number of changes to facilitate your capacity planning activities when employing modeling techniques for multi-threaded architectures. The new capabilities combined with the easy-to-use TeamQuest Model interface makes it easy to predict application and service performance on the new multi-threaded architectures. You need to be cognizant of the differences between the singleand multi-threaded technologies and understand their impacts on your applications and services. Armed with that information and TeamQuest Models new capabilities, you will be able to easily predict future performance, no matter what technology you choose.
Subscribe
TeamQuest Corporation
www.teamquest.com
Americas
One TeamQuest Way Clear Lake, Iowa 50428 USA +1 641.357.2700 +1 800.551.8326 [email protected]
Asia Pacific
Units 1001-4 10/F China Merchants Bldg 152-155 Connaught Rd Central Hong Kong, SAR +852 3571-9950 [email protected] Copyright 2008 TeamQuest Corporation All Rights Reserved
TeamQuest and the TeamQuest logo are registered trademarks in the US, EU, and elsewhere. All other trademarks and service marks are the property of their respective owners. No use of a third-party mark is to be construed to mean such marks owner endorses TeamQuest products or services. The names, places and/or events used in this publication are purely fictitious and are not intended to correspond to any real individual, group, company or event. Any similarity or likeness to any real individual, company or event is purely coincidental and unintentional. NO WARRANTIES OF ANY NATURE ARE EXTENDED BY THE DOCUMENT. Any product and related material disclosed herein are only furnished pursuant and subject to the terms and conditions of a license agreement. The only warranties made, remedies given, and liability accepted by TeamQuest, if any, with respect to the products described in this document are set forth in such license agreement. TeamQuest cannot accept any financial or other responsibility that may be the result of your use of the information in this document or software material, including direct, indirect, special, or consequential damages. You should be very careful to ensure that the use of this information and/or software material complies with the laws, rules, and regulations of the jurisdictions with respect to which it is used. The information contained herein is subject to change without notice. Revisions may be issued to advise of such changes and/or additions. U.S. Government Rights. All documents, product and related material provided to the U.S. Government are provided and delivered subject to the commercial license rights and restrictions described in the governing license agreement. All rights not expressly granted therein are reserved.