Software Controlled Clock Modulation for Energy Efficiency Optimization

Software Controlled Clock Modulation for Energy Efficiency Optimization

Software Controlled Clock Modulation for Energy Efficiency Optimization on Intel Processors Robert Schone,¨ Thomas Ilsche, Mario Bielert, Daniel Molka, and Daniel Hackenberg Center for Information Services and High Performance Computing (ZIH) Technische Universitat¨ Dresden, 01062 Dresden, Germany, Email:frobert.schoene, thomas.ilsche, mario.bielert, daniel.molka, [email protected] age for energy efficiency optimization in High Performance Abstract—Current Intel processors implement a variety of Computing (HPC). We define our measurement environment, power saving features like frequency scaling and idle states. hardware, and software in Section III. In Section IV, we de- These mechanisms limit the power draw and thereby decrease the thermal dissipation of the processors. However, they also have an scribe how throttling states in various Intel processors perform impact on the achievable performance. The various mechanisms in detail. The sustained behavior of power and performance significantly differ regarding the amount of power savings, the for Haswell-EP processors is presented in Section V. In latency of mode changes, and the associated overhead. In this Section VI, we describe a model that determines whether paper, we describe and closely examine the so-called software P- or T-states should be used and exemplarily apply it on controlled clock modulation mechanism for different processor generations. We present results that imply that the available Intel Haswell-EP processors. We conclude this paper with a documentation is not always correct and describe when this summary and outlook in Section VII. feature can be used to improve energy efficiency. We additionally compare it against the more popular feature of dynamic voltage II. BACKGROUND AND RELATED WORK and frequency scaling and develop a model to decide which Weste and Harris describe the processor power consumption feature should be used to optimize inter-process synchronizations on Intel Haswell-EP processors. as follows [5, Section 5.1.3]: P Index Terms—Microprocessors, Performance analysis, Systems dynamic Pstatic modeling, Dynamic voltage scaling z 2 }| { z }| { Ptotal = αCVDD f + ISC VDD + (Ileak + Icont) · VDD (1) I. INTRODUCTION The different power saving features target different parts of The limits of technology scaling due to the increasing Equation 1. In this paper, we focus on the effects of software power density [1] have resulted in various power optimization controlled clock modulation, which only influences the activity techniques that are now available in state-of-the-art processors. factor α. Thus, it does not affect the static power consumption, The ACPI standard [2] defines four different power saving which is dominated by leakage power. In contrast, DVFS states that are supported by current Intel processors: System reduces the frequency f as well as the supply voltage VDD , sleeping states (S-states), processor power states (C-states), which reduces both, static power and dynamic power. processor performance states (P-states), and throttling states Clock modulation is related to clock gating: In clock gating (T-states). These states are implemented by using one of the (depicted in Figure 1), the clock is disabled whenever the following hardware power saving techniques: power gating (S- stop-clock signal is active. The applied clock signal is then and deep C-states), clock gating (shallow C-states), dynamic the result of the external clock signal AND the de-asserted voltage and frequency scaling (P-states, C1E-state), and clock stop-clock. Thus, the dynamic power consumption can be modulation (T-states). S- and C-states stop the processing of reduced significantly, as “short circuit current has become instructions. They need an external signal, e.g., an interrupt, almost negligible”[5, Section 5.2.5] in nanometer processes. to return to a working state. Furthermore, the processor state Clock modulation uses a comparable mechanism. When a has to be restored when resuming to normal operation, which certain condition (clock modulation assertion) is set, the clock creates considerable overhead [3]. P- and T-states are not is disabled whenever a clock modulation signal indicates it. subject of these restrictions. Thus, they can be used easily for energy efficiency optimization. While dynamic voltage and frequency scaling (DVFS) optimization is so common that it External Clock Signal is part of operating systems [4], optimization efforts that use ... clock modulation are still rare. This paper describes details of Stop-Clock Assertion Intel’s clock modulation implementation for several processor Applied generations. This will help researchers to assess whether they Clock Signal ... should use this feature for their optimization. time This paper is structured as follows: In Section II, we describe Intels clock modulation feature and discuss its us- Fig. 1: Influence of clock gating on a processor clock signal ©2016 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works. This paper has been published in the Proceedings of the 4th International Workshop on Energy Efficient Supercomputing (E2SC), 2016, DOI: 10.1109/E2SC.2016.015 External III. EXPERIMENTAL METHODOLOGY Clock Signal ... ... Clock Modulation We investigate the short term effects of clock modulation as Assertion well as the behavior over longer time periods. In this Section, ... Clock Modulation we describe the used workflows and the set of processors that Signal ... we investigated. Applied Clock Signal ... ... A. Analysis of short time scale effects time To determine how clock modulation is implemented by Fig. 2: Influence of clock modulation on a processor clock the processor, we use a measurement routine that is similar signal to the one used by Mazouz et al. for measuring P-state latencies [13]. Our implementation is shown in Listing 1. We run 220 iterations of this measurement loop and record the respective run times in memory. In order to represent software The resulting signal that is applied to the processor is thus the that is already established in the operating system contexts, we result of ANDing the external clock signal, and the NEGated skip the first 75 % of the results in the analysis, as they exhibit result of ANDing the condition, and the clock modulation more noise than the latter 25 %. This results in a total number signal. This is depicted in Figure 2. of 218 samples. To control the clock modulation setting, we use the x86 adapt1 library and kernel module [3]. The initial intent of support for clock modulation in Intel The entire benchmark is repeated with all combinations of processors is to prevent them from overheating [6, Chapter available frequencies and clock modulation settings. Addition- 14.7.2]. The first implementation, which is called Thermal ally, the clock modulation is set either on one or on all cores Monitor 1 (TM1), has been introduced with Intel Pentium of a system to check whether the implementation treats this 4 processors. Another feature that enforces a low processor differently. The gathered execution times are analyzed in a temperature is called Thermal Monitor 2 (TM2), which uses post-mortem step to answer the following questions: DVFS to achieve a lower power dissipation. In [7], Rotem et • How long is the cycle of the clock modulation signal? al. describe how this technique is more effective than its clock • How long is the assertion phase of the clock modulation modulation counterpart. Starting with Intel Core 2 processors, signal depending on the clock modulation value? Intel introduced Adaptive Thermal Monitor where different • Is this mechanism influenced by the frequency of the transition targets can be used under overheating conditions. processor? Processor manuals [6] describe this mechanism to dynami- • Does it depend on the number of cores using it? cally select between TM2 and TM1. According to technical • Is the signal synchronous on all cores of a processor? documents for desktop processors [8], [9], this mechanism applies DVFS when the target temperature is exceeded and To gather the initialization delay, we get the expected runtime clock modulation in addition, if the thermal effect of DVFS of the measurement loop, activate clock modulation, and is not sufficient. Clock modulation can also be triggered by execute the loop until its runtime is significantly higher. software via the MSR register IA32_CLOCK_MODULATION. Afterwards we ensure that the extended runtime is within This interface can be used to modify the percentage of skipped the expected range. To measure the delay after deactivating cycles in steps of 6.25 % (12.5 % for older architectures). clock modulation, we wait a random time after the last clock modulation cycle, deactivate clock modulation, and wait for Clock modulation does not need any support by voltage 60 µs for an extended runtime. We register the random wait- regulators and can therefore be implemented with a reasonable time, the extended runtime and the time between deactivating amount of extra hardware. Thus, current Intel processors clock modulation and the start time of the interrupted loop. implement it per processor core in contrast to DVFS which typically has a coarser granularity. unsigned hi , l o ; unsigned long long c ou n t ; Bhalachandra et al. use clock modulation to optimize the f o r ( count = 0 ; count < STORE SIZE ; count++ ) f energy efficiency of imbalanced MPI programs [10]. They asm v o l a t i l e ( / / 150 adds implement a model that changes the clock modulation setting ” a d d l $1,%%eax ; ” // ... repeat more adds ::: ”%eax”); at every collective MPI routine according to the time spent in // get time in reference cycles communication phases. Cicotti et al. present the EfficientSpeed asm v o l a t i l e (”mfence;rdtsc”:”=a”(lo),”=d”(hi )); library [11].

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us