Optimizing Power Efficiency in Throughput-Based Workloads
By identifying homogeneous workloads of processing cores and combining binomial distribution and QoS measurement algorithms to adjust processing core frequencies, the problem that existing technology cannot distinguish throughput and latency-critical workloads is solved, and throughput-based workloads are realized. Power efficiency optimization and performance guarantees for latency-sensitive workloads.
Patent Information
- Application Number
- CN201880036429.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-06-18
- Filing Date
- 2018-06-19
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2038-06-19
AI Technical Summary
Existing power management algorithms cannot effectively differentiate between throughput and latency-critical workloads, resulting in the inability to achieve optimal power efficiency and performance optimization, especially when SoCs become complex and difficult to manage power under global QoS goals.
By identifying homogeneous workloads based on deviations in processing core activity data, and combining binomial distribution and QoS metric algorithms, processing core frequencies are adjusted to minimize idle time and improve power efficiency while avoiding performance degradation.
It achieves power efficiency optimization for throughput-based workloads, identifies low-frequency sensitive workloads and safely reduces frequency, reduces idle time, balances power savings with performance losses, and ensures the performance requirements of latency-sensitive workloads.
Smart Images

Figure CN110709800B_ABST
Abstract
Description
[0001] Related Applications
[0002] This application claims priority to provisional application serial number 62 / 522,073, filed on June 19, 2017, with inventors Leonardo De Paula Rosa Piga et al., entitled “POWER EFFICIENCY OF OPTIMIZATION IN THROUGHPUT-BASED WORKLOADS,” and incorporated herein by reference. Background Art
[0003] Many server workloads exhibit stable homogeneous load behavior at a fixed workload using various load balancing techniques. These workloads are typically not latency critical and have no data dependent threads, i.e., the time to process a single request is irrelevant as long as the average throughput remains constant. System-on-Chip (SoC) power management algorithms need to recognize these throughput-based workloads so that the frequency can be reduced to minimize idle time without performance degradation, thereby achieving optimal power efficiency. Existing power management algorithms either focus on the behavior of individual instruction processors (e.g., a single processor) or contain ad hoc solutions for modeling the interaction between the SoC and the workload, making them unable to distinguish between throughput- vs. latency-critical workloads and leading to suboptimal operating points.
[0004] For example, a collection of locally optimized algorithms is unlikely to achieve a globally optimal operating state for a specific quality of service (QoS). Instead, this solution will result in poor performance and power efficiency. Therefore, as SoCs become more complex, it becomes increasingly important to understand how SoCs and workloads interact and manage power in a scalable manner while optimizing for global QoS goals. BRIEF DESCRIPTION OF THE DRAWINGS
[0005] The present disclosure will be more readily understood from the following description taken in conjunction with the accompanying drawings, in which like reference numerals represent like elements, and in which:
[0006] Figure 1 is a functional block diagram illustrating an example computing device (e.g., a server) including processing core frequency adjustment logic that can adjust the frequency of one or more processing cores according to one example set forth in the present disclosure;
[0007] Figure 2 According to an example of the present disclosure Figure 1 A more detailed functional block diagram of the processing core frequency adjustment logic;
[0008] Figure 3is a schematic diagram illustrating a CPU activity graph of a single processing core according to one example set forth in the present disclosure; and
[0009] Figure 4 is a flow chart of an example method for measuring QoS for executing workloads according to one example set forth in the present disclosure. DETAILED DESCRIPTION
[0010] In short, methods and apparatus provide power efficiency optimization in throughput-based workloads. In one example, a method for optimizing power efficiency in a computing device is described. For example, the computing device can be a server. The computing device determines processing core activity deviation data of a processing core (e.g., a CPU, a GPU, etc.) based on processing core activity data from the processing core in the computing device. The computing device adjusts the frequency of at least one of the processing cores in the computing device based on the processing core activity deviation data.
[0011] The computing device determines whether the processing core activity deviation data indicates a homogeneous workload of the processing cores. In response to determining that the processing core activity deviation data indicates a homogeneous workload of the processing cores, the computing device reduces the frequency of at least one of the processing cores.
[0012] When determining the processing core activity deviation data, the computing device determines the number of processing cores in an active state and the expected number of processing cores that will be in an active state. The computing device then determines the activity deviation between the number of processing cores in an active state and the expected number of processing cores that will be in an active state.
[0013] Determining the number of processing cores that are active is based on a processing core activity level of the processing cores. Determining the expected number of processing cores that will be active is based on a binomial distribution that takes into account the number of processing cores and the processing core activity level of the processing cores. The processing core is determined to be active when a percentage of active cycles in the processing core in a previous interval is greater than a threshold, wherein the previous interval is based on a moving average window. When determining the processing core activity deviation data, the computing device determines how much the current QoS of the processing core deviates from the target QoS.
[0014] In one example, a system on chip or SoC includes a plurality of processing cores and processing core frequency adjustment logic coupled to the plurality of processing cores. The processing core frequency adjustment logic determines processing core activity deviation data for the plurality of processing cores based on processing core activity data from the plurality of processing cores, and adjusts a frequency of at least one of the plurality of processing cores based on the determined processing core activity deviation data.
[0015] In another example, a server includes multiple processing cores, a network interface, and processing core frequency adjustment logic coupled to the multiple processing cores and the network interface. The processing core frequency adjustment logic determines processing core activity deviation data of the multiple processing cores based on processing core activity data from the multiple processing cores, and adjusts the frequency of at least one of the multiple processing cores based on the determined processing core activity deviation data.
[0016] The present disclosure describes a power management algorithm framework that proposes: 1) QoS metrics for throughput-based workloads; 2) heuristics to distinguish between throughput and latency-sensitive workloads; and 3) an algorithm that combines the heuristics and QoS metrics to determine a target frequency to minimize idle time and improve power efficiency without compromising performance.
[0017] The present disclosure provides a management algorithm framework that is capable of optimizing power efficiency in throughput-based workloads at the server level while still providing desired performance for latency-sensitive workloads. The present disclosure aims to achieve power savings by identifying workloads where one or more processing cores can run at a lower frequency (and therefore at a lower power) without significant negative performance impact. The present disclosure addresses at least the following two problems to make this technology feasible in practice: 1) how to identify workloads whose performance has low frequency sensitivity; 2) how much the frequency can be safely reduced before performance degrades excessively.
[0018] The present disclosure proposes a solution that is particularly useful for: (1) differentiating homogeneous, stable classes of workloads with independent threads, each of which performs a fixed amount of work from workloads with data-dependent threads, where the data-dependent threads are latency-critical; and 2) optimizing power efficiency by reducing idle time in throughput-oriented workloads.
[0019] For example, a particular QoS algorithm takes as a parameter a specific "target central processing unit (CPU) idle percentage" (between 0% and 100%) and modulates the CPU frequency to achieve that QoS goal. If the CPU idle time is greater than the threshold, the frequency is reduced, and vice versa. For throughput-based loads, ideally the system would like to reduce the idle time to zero, eliminating all the slack provided by the idle time. However, in practice this is not possible because the system would need to account for variations in workload behavior and the granularity of power state changes. Therefore, the actual target idle time is left as an adjustable configuration parameter to optimize for the balance between power savings and performance degradation.
[0020] The QoS metric for system idle time can be calculated using the following formula:
[0021]
[0022] where N is the total number of processing cores in the system, the idle cycles of core i is the sum of the non-C0 (i.e., CC1 and CC6 cycles) of the i-th core, and the total cycles is the total number of CPU cycles (both active and idle) at the current CPU frequency during the synchronization management unit (SMU) sampling time (lms).
[0023] The algorithm makes some assumptions about application behavior.
[0024] 1) The workload is purely throughput-based, and the latency of processing a single request is insignificant to performance as long as the average throughput remains constant. Therefore, the QoS algorithm does not kick in for any workload that similarly has alternating periods of active and idle CPU time, but where the active periods are latency-critical. For example, if the idle periods are spent waiting for input / output (I / O), and there are data dependencies between computation and I / O operations.
[0025] 2) The algorithm does not necessarily recommend separate per-core control. Instead, it assumes homogeneous loads, for which the same frequency is appropriate for all processing cores. For server workloads (which typically have load balancing), this is a realistic assumption. However, the algorithm should not be turned on for, for example, client workloads with a small number of threads, as this will result in degraded single-threaded performance.
[0026] 3) The load level is stable enough to change slowly relative to the feedback response time of the QoS algorithm. For example, if the load suddenly increases while the frequency is set to target low idle time and much lower load, the system will achieve lower performance until a feedback response is received.
[0027] Since QoS algorithms require specific conditions to work properly, there is a risk of degrading performance if they are turned on for applications that do not meet these conditions, so it is necessary to use conservative heuristics when turning them on.
[0028] Core Activity Distribution—Heuristics for Differentiating Throughput for Latency-Sensitive Workloads
[0029] A further observation about a homogeneous and stable throughput-based load is that the distribution of the number of processing cores active at a given moment closely follows the binomial distribution. The number of active cores is defined as those whose percentage of active cycles in the previous short interval is above a high threshold (e.g., 90%). This is because for such a load, the following characteristics can be observed.
[0030] 1) Since the load is stable over time, a single processing core has approximately equal probability of being active at different times T1 and T2. For example, at a load of 60%, any given core will be active approximately 60% of the time.
[0031] 2) Since the load is homogeneous and balanced, the probability is the same for all processing cores.
[0032] 3) The probability of any two processing cores being active at a given point in time is uncorrelated.
[0033] Therefore, as shown in the following equation, when N processing cores are observed at a given point in time, the expected number of active processing cores is given by the binomial distribution over N trials with probability A, which is equal to the activity level.
[0034]
[0035] For example, if the activity level is 60% and the workload is running on 4 cores, the expectation that exactly 3 cores will be active during a period of time is equal to That is, about 34.6% of the time.
[0036] By measuring the actual distribution of the number of active processing cores and comparing it to a theoretical binomial distribution (where N is the number of processing cores and A is the average activity level measured during the measurement interval), it is possible to estimate the extent to which applications deviate from the type targeted by the idle QoS. Specifically, this measurement captures the following.
[0037] 1) Deviations from a stable homogeneous and balanced load, which can cause the distribution to be biased towards specific processing cores.
[0038] 2) Deviation from a purely throughput-based workload, where individual units of work are uncorrelated.
[0039] Property 2) only adds value relative to measurements if the workload is stable and homogeneous. For example, consider a workload where a single thread that is completely CPU-bound runs without CPU affinity and is therefore scheduled in a round-robin fashion across N processing cores. This workload appears stable and homogeneous, with each processing core being active 1 / N of the time. However, enabling Idle QoS will degrade performance because it is not throughput-based, but rather each time slice that executes on a CPU depends on the previous time slice.
[0040] This situation is successfully identified by the binomial distribution heuristic, because the distribution will show that only one processing core is active 100% of the time (rather than a binomial distribution with A = 1 / N). Although this is a simple example, similar reasoning shows that for any workload that provides a series of dependent calculations, reducing the CPU frequency will lengthen the critical path and reduce performance, so the distribution will deviate from binomial because the time that the individual processing cores are active is correlated.
[0041] QoS on / off algorithm
[0042] To avoid performance degradation, the algorithm should be turned on only for workloads with the characteristics described in the previous section. The approach is based on the assumption that certain regularities observed for homogeneous (load-balanced) throughput-based applications are not observed for any other application type. Specifically, the algorithm turns on QoS when the following conditions are observed.
[0043] 1) Each processing core has a stable average load over a period of tens of seconds.
[0044] 2) All processing cores are busy with approximately the same average load.
[0045] 3) The distribution of processing core activity is approximately binomial.
[0046] For steady load levels, long time scales are needed because too much variation is observed in practice for shorter time scales. For example, consider the performance characteristics of a server from a benchmark program such as the one provided by the Standard Performance Evaluation Corporation (SPEC). Because the length of activity intervals varies between a few milliseconds and hundreds of milliseconds, an interval of only one or two seconds will still have a lot of random variation in how much active time and idle time it contains.
[0047] This makes the technique effective for workloads that exhibit steady load levels on a scale of minutes. Typical server benchmarks (such as those provided by SPEC) or SERT TM This is the case with benchmarks) which measure steady throttle load levels over several minutes and have a long warm-up interval at each given level before the measurement starts.
[0048] To detect a stable average load, an active moving average can be used, but given the temporal resolution of the sampling (lms), this would require a lot of memory. Therefore, the calculation of ordinary averages within a 1s scale can also be used, and a moving average window of these averages can be used. The size of the basic averaging interval (1s), the moving average window (tens of seconds), the time threshold for stable workload (tens of seconds), and the allowed variations (within a single processing core, between processing cores, and differences from the binomial distribution) are all adjustable parameters. Similarly, when these conditions no longer apply and the load variation within and between processing cores (calculated in the same way) exceeds a given threshold, the algorithm will not be used.
[0049] Turn to the attached figure, Figure 1 An example of a computing device 102 of the present disclosure is shown in FIG. The computing device 102 may be, for example, a server or any other suitable device. The computing device 102 may be part of a data center or part of a distributed system such as a cloud-based (e.g., cloud computing) system.
[0050] like Figure 1 As shown, computing device 102 includes processing core frequency adjustment logic 104. Computing device 102 also includes memory 106 such as RAM or ROM or any other suitable memory, which can be used to store parameters, such as parameters associated with the aforementioned algorithms. Memory 106 can also store executable instructions that can be accessed and executed by processing core frequency adjustment logic 104, as further described below.
[0051] Computing device 102 also includes processing core 1 122, processing core 2 126, processing core 3 124, and processing core N 128. As recognized by those of ordinary skill in the art, the number of processing cores may vary. Processing cores 122, 124, 126, 128 may be, for example, processing cores associated with a CPU, an accelerated processing unit (APU), or a graphics processing unit (GPU). In addition, processing cores 122, 124, 126, 128 may be part of SoC 112. In other examples, SoC 112 may be a heterogeneous SoC, an APU, a dGPU, a CPU, or a semi-custom SoC. In addition, although not shown, computing device 102 may also include additional SoCs with additional processing cores.
[0052] The computing device 102 also includes I / O devices 108, which may include, for example, a display, a keypad, a keyboard, or any other suitable I / O device. The computing device 102 also includes one or more network interfaces 110 to communicate with one or more networks. For example, the network interface 110 may support communication with any suitable network (e.g., Ethernet, WiFi, WAN, Internet) that allows communication between multiple devices, for example.
[0053] like Figure 1 As shown, processing core frequency adjustment logic 104, processing cores 122, 124, 126, 128, memory 106, I / O devices 108, and network interface 110 are all connected to bus 114. Bus 114 may be any suitable bus that allows devices to communicate with each other, such as a wired or wireless bus.
[0054] In some embodiments, some or all of the functions of computing device 102 may be performed by any one or more suitable processors, which may, for example, execute software drivers, firmware, or any other suitable executable code stored in memory. For example, some or all of the functions of processing core frequency adjustment logic 104 may be performed by any suitable processing core. In one example, processing core frequency adjustment logic 104 reads and executes executable instructions from memory 106. In some embodiments, processing core frequency adjustment logic 104 may be a CPU, APU, GPU, field programmable gate array (FPGA), application specific integrated circuit (ASIC), microcontroller, as one or more state machines, or as any suitable logic and / or a suitable combination of hardware and software, or any other suitable instruction processing device.
[0055] The computing device 102 having the processing core frequency adjustment logic 104 adjusts the frequency of one or more processing cores 122, 124, 126, 128, for example, as shown below. Figure 2 In one example, a computing device 102 having processing core frequency adjustment logic 104 may additionally or alternatively adjust the frequency of a processing core associated with another computing device (eg, a remote server). For example, computing device 102 may communicate with a remote server via one or more networks.
[0056] Figure 2 yes Figure 1 A more detailed functional block diagram of the processing core frequency adjustment logic 104 is shown in FIG. Figure 2 As shown, processing core frequency adjustment logic 104 includes processing core activity determination logic 202 , processing core workload sensitivity determination logic 204 , and processing core frequency determination logic 206 .
[0057] Processing core activity determination logic 202 receives information from, for example, one or more processing cores (e.g., Figure 1 122, 124, 126, 128) of the processing cores 122, 124, 126, 128 of the processing cores 122, 124, 126, 128) obtain (e.g., receive) processing core activity data 212. The processing core activity data 212 may include data indicating whether a particular processing core is active (e.g., executing a workload) or idle. The processing core activity determination logic 202 determines a processing core activity level of the processing core based on the processing core activity data 212. The processing core activity level indicates, for example, a percentage of processor activity over a period of time. In one example, the processing core activity determination logic 202 executes an algorithm including equation 1 described above. The processing core activity determination logic 202 provides the processing core activity level as the processing core activity level data 210 to the processing core workload sensitivity determination logic 204.
[0058] The processing core workload sensitivity determination logic 204 determines how much the current QoS of one or more processing cores deviates from the target QoS. For example, based on the processing core activity level data 210, the processing core workload sensitivity determination logic 204 determines the number of active processing cores. For example, when the percentage of active cycles in the previous short interval is above a high threshold (e.g., 90%), the processing core workload sensitivity determination logic 204 can determine that the processing core is in an active state. The processing core workload sensitivity determination logic 204 also determines the expected number of active cores based on, for example, the execution of an algorithm including Equation 2 described above. Then, for example, as described above, the processing core workload sensitivity determination logic 204 determines the activity deviation between the number of active processing cores and the expected number of active processing cores, and provides the activity deviation as processing core activity deviation data 208 to the processing core frequency determination logic 206.
[0059] The processing core frequency determination logic 206 then adjusts the frequency of one or more processing cores based on the processing core activity deviation data 208. For example, the processing core frequency determination logic 206 may cause the processing core frequency adjustment data 214 to adjust (e.g., increase or decrease) Figure 1 The frequency of one or more processing cores among processing cores 122, 124, 126, 128.
[0060] To illustrate the operation of the example algorithm as disclosed herein, Figure 3 shows the running of benchmark programs (such as those provided by SPEC A graph of CPU activity for a single core in a system running a 50% workload (benchmark). Figure 3 Only one processing core is shown for clarity, but the load is homogeneous and may look similar for the other processing cores. Figure 3Each point in shows the percentage of active (i.e. C0) periods in a 1 ms sample, and is plotted over a total period of two seconds. Figure 3 , it is clear that this workload keeps the CPU completely busy while processing requests, so periods of 100% C0 activity alternate with idle periods. In this case, about 50% of the time it is idle, which reflects the load level at this stage in the benchmark. Benchmark programs such as the SPEC Benchmarks) control the load by measuring the maximum throughput of the system and then adjusting the request rate between 0% and 100% in order to measure how power consumption varies with load.
[0061] For throughput-based loads like this, if core utilization is significantly below 100%, then cores can be throttled down while maintaining the same throughput, thereby reducing the percentage of idle time. This is the basis for the Idle Time QoS algorithm.
[0062] Figure 4 A flow chart 400 of an example method for measuring QoS for an executing workload according to one example set forth in the present disclosure is provided. Figure 4 The illustrated method and each of the example methods described herein can be performed by a computing device 102. As such, the methods can be performed by hardware or a combination of hardware and hardware executing software. Suitable hardware may include one or more GPUs, CPUs, APUs, ASICs, state machines, FPGAs, digital signal processors (DSPs), or other suitable hardware. Although reference is made to the illustrated flowcharts (e.g., in Figure 4 Although the methods are described with reference to the example computing device 102, it will be understood that many other ways of performing the actions associated with the methods may be used. For example, the order of some operations may be changed, and some of the operations described may be optional. In addition, although the methods may be described with reference to the example computing device 102, it should be understood that the methods may also be implemented by other devices, and the computing device 102 may implement other methods.
[0063] like Figure 4As shown, at box 402, the basic input / output system (BIOS) settings determine whether QoS is enabled. If QoS is enabled, a workload detection loop is started at box 408. The method includes obtaining a start timing parameter from box 406. Otherwise, the feature is disabled at box 404. Once a workload is detected at box 410, the method proceeds to box 412, where a QoS loop is started. At box 414, the QoS loop runs to measure the QoS on the executing workload. The method includes obtaining an idle time target parameter from box 416. At box 418, it is determined whether the workload has ended. The method also includes obtaining an end timing parameter from box 420. If the workload has ended, the method returns to box 410. Otherwise, the QoS loop continues to run at box 414. At box 414, the method also provides a power state limit signal to provide a power state change to one or more processing cores. In one example, from a processor such as Figure 1 One or more of the start timing parameter, the idle time target parameter, and the end timing parameter are obtained from a memory such as the memory 106 of the memory.
[0064] The above detailed description and the examples described herein are presented for the purpose of illustration and description only, not for limitation. For example, the described operation can be completed in any suitable manner. Therefore, it is contemplated that each embodiment of this article covers any and all modifications, variations or equivalents falling within the scope of the above disclosed and claimed basic principles. In addition, although the hardware in the form of processor execution code, the hardware in the form of state machine or the dedicated logic that can produce the same effect are described above, other structures can also be contemplated.
Claims
1. A method for optimizing power efficiency in a computing device having one or more processing cores, the method comprising: determining, by the computing device, processing core activity deviation data for the one or more processing cores based on processing core activity data from the one or more processing cores, wherein the processing core activity deviation data is based on activity deviations between an actual number of active processing cores and an expected number of active processing cores; as well as A frequency of at least one of the one or more processing cores is adjusted by the computing device in response to the processing core activity deviation data indicating a homogeneous workload of the one or more processing cores.
2. The method of claim 1, wherein the adjusting comprises: The frequency of the at least one of the one or more processing cores is reduced by the computing device.
3. The method of claim 1, wherein the expected number of active processing cores is determined using a binomial distribution that takes into account a total number of the one or more processing cores and a processing core activity level of the one or more processing cores. 4 . The method of claim 1 , wherein the processing core is determined to be in an active state when a percentage of active cycles in the processing core in a previous interval is greater than a threshold.
5. A computing system comprising: Multiple processing cores; as well as A processing core frequency adjustment logic coupled to the plurality of processing cores, the processing core frequency adjustment logic being configured to: determining processing core activity deviation data for the plurality of processing cores based on processing core activity data from the plurality of processing cores, wherein the processing core activity deviation data is based on activity deviations between an actual number of active processing cores and an expected number of active processing cores; and In response to the processing core activity deviation data indicating a homogeneous workload of the plurality of processing cores, a frequency of at least one of the plurality of processing cores is adjusted.
6. The computing system of claim 5, wherein the processing core frequency adjustment logic is further configured to: The frequency is adjusted by reducing the frequency of the at least one of the plurality of processing cores. 7 . The computing system of claim 5 , wherein the expected number of the processing cores is determined based on a total number of the plurality of processing cores and a processing core activity level of the plurality of processing cores that are active.
8. The computing system of claim 7, wherein the actual number of active processing cores is determined based on processing core activity levels of the plurality of processing cores.
9. The computing system of claim 8, wherein determining the expected number of active processing cores is based on a binomial distribution that takes into account the number of the plurality of processing cores and the processing core activity levels of the plurality of processing cores.
10. The computing system of claim 5, wherein the processing core is determined to be in an active state when a percentage of active cycles in the processing core in a previous interval is greater than a threshold.
11. The computing system of claim 10, wherein the previous interval is based on a moving average window.
12. A server, comprising: Multiple processing cores; Network interface; as well as A processing core frequency adjustment logic coupled to the plurality of processing cores and the network interface, the processing core frequency adjustment logic being configured to: determining processing core activity deviation data for the plurality of processing cores based on processing core activity data from the plurality of processing cores, wherein the processing core activity deviation data is based on activity deviations between an actual number of active processing cores and an expected number of active processing cores; as well as A frequency of at least one of the plurality of processing cores is adjusted in response to the processing core activity deviation data indicating a homogeneous workload of the plurality of processing cores.
13. The server of claim 12, wherein the expected number of active processing cores is determined based on a total number of the plurality of processing cores and a processing core activity level of the plurality of processing cores that are active.
14. The server of claim 13, wherein the adjusting comprises reducing the frequency of the at least one of the plurality of processing cores.
