Field of the Invention
The invention relates to an integrated circuit, and more particularly, to a power measurement circuit, a baseboard management controller (BMC) having the same and load balancing requests based on server power consumption and least-connection scheduling.
Description of the Related Art
Load balancing is the process of distributing processing and communications activity evenly or in some cases unevenly (in scenarios where servers are not of equal computing power) across a computer network so that no single device is overwhelmed or handling 100% of the network or web traffic. Load balancing is especially important for networks where it's difficult to predict the number of requests that will be issued to a server. Busy Web sites typically employ two or more Web servers in a load balancing scheme. If one server starts to get swamped, requests are forwarded to another server with more capacity.
Load balancers generally use different scheduling algorithms to control network traffic. For example, (1) Round-robin: A round-robin algorithm distributes tasks equally to each server in circular order. (2) Fixed weighted: The weight of each server is preassigned and most of the requests are routed to the server with the highest priority. (3) Least-connection: A least-connection algorithm sends requests to servers, based on which server is currently serving the fewest connections. (4) Network Load-based: A load-based algorithm sends requests to servers, based on network traffic flow, such as in terms of bytes or packets.
Each scheduling algorithm has its own set of benefits and suitable scenarios. A service provider can select an optimal algorithm that best suits its purpose to give a smooth, reliable and fast service delivery to its clients. The invention provides a new scheduling algorithm for the load balancers.
On the other hand, a baseboard management controller (BMC) is a specialized service processor that monitors the physical state of a computer, network server or other hardware device using sensors and communicating with a system administrator through an independent connection. The BMC is part of the Intelligent Platform Management Interface (IPMI) and is usually contained in the motherboard or main circuit board of a server to be monitored. However, a conventional BMC does not include any hard-wired circuit dedicated to monitoring power consumption of its server. A system administrator of a corporate network may be present at one location while the servers may be spread around the buildings or even anywhere of the internet. It is very difficult and costly for the system administrator to be physically present at each server side and check power consumption of each server. Accordingly, what is needed is a BMC to address the above-identified problems. The invention addresses such a need.
In view of the above-mentioned problems, an object of the invention is to provide a power measurement circuit capable of estimating the power consumption of a server.
One embodiment of the invention provides a power measurement circuit. The power measurement circuit comprises a sampling register, a latch generator, an accumulation unit, a calculation unit and an output register. The sampling register samples an input signal based on a sampling clock to generate a binary digit. The latch generator generates a latch signal based on the sampling clock and a measurement interval. The accumulation unit accumulates the binary digit based on the latch signal to generate a sum value. The calculation unit calculates an ON-phase rate of the input signal according to the sum value and the measurement interval. The output register stores a power consumption value according to the ON-phase rate of the input signal.
Another embodiment of the invention provides a server system. The server system comprises a CPU, a P-phase voltage regulator module, a power measurement circuit and a baseboard management controller (BMC). The CPU is coupled to a load balancer via a first network. The P-phase voltage regulator module supplies a regulated voltage to the CPU and generates a first control signal. The power measurement circuit receives a voltage signal according to the first control signal, measures and stores a power consumption value. The BMC coupled to the load balancer via a second network is used to periodically read the power consumption value form the power measurement circuit and send a warning signal to a system administrator through the second network when an abnormal power consumption event is detected. One of the CPU and the BMC sends the power consumption value to the load balancer. The power measurement circuit comprises a sampling register, a latch generator, an accumulation unit, a calculation unit and an output register. The sampling register samples an input signal based on a sampling clock to generate a binary digit. The latch generator generates a latch signal based on the sampling clock and a measurement interval. The accumulation unit accumulates the binary digit based on the latch signal to generate a sum value. The calculation unit calculates an ON-phase rate of the input signal according to the sum value and the measurement interval. The output register stores a power consumption value according to the ON-phase rate of the first control signal.
Another embodiment of the invention provides a system. The system comprises a plurality of client devices, a plurality of servers and a load balancer. The servers periodically sends power consumption values. The load balancer coupled to the client devices through a first network is used to allocate requests from the client devices to the servers based on both the power consumption values and numbers of connections of the servers. Each of the servers comprises a CPU, a P-phase voltage regulator module, a power measurement circuit and a baseboard management controller (BMC). The CPU is coupled to the load balancer via a first network. The P-phase voltage regulator module supplies a regulated voltage to the CPU and generates a first control signal. The power measurement circuit receives a voltage signal according to the first control signal, measures and stores a power consumption value. The BMC coupled to the load balancer via a second network is used to periodically read the power consumption value form the power measurement circuit and send a warning signal to a system administrator through the second network when an abnormal power consumption event is detected. One of the CPU and the BMC sends the power consumption value to the load balancer. The power measurement circuit comprises a sampling register, a latch generator, an accumulation unit, a calculation unit and an output register. The sampling register samples an input signal based on a sampling clock to generate a binary digit. The latch generator generates a latch signal based on the sampling clock and a measurement interval. The accumulation unit accumulates the binary digit based on the latch signal to generate a sum value. The calculation unit calculates an ON-phase rate of the input signal according to the sum value and the measurement interval. The output register stores a power consumption value according to the ON-phase rate of the first control signal.
Another embodiment of the invention provides a method. The method comprises: periodically measuring a power consumption value according to a control signal from a P-phase voltage regulator module by each of a plurality of servers; periodically measuring a power consumption value according to a control signal from a P-phase voltage regulator module by each of a plurality of servers; periodically sending the power consumption value to a load balancer by each of the servers; collecting power consumption values from the plurality of servers by the load balancer, wherein the load balancer is coupled to a client device via a first network and to the servers via a second network; forming a candidate list containing a plurality of candidate servers according to the power consumption values and numbers of connections of the servers by the load balancer; and, allocating a following request from the client device to one candidate server at the top of the candidate list by the load balancer. Here, the step of periodically measuring comprises: sampling a control signal from a P-phase voltage regulator module based on a sampling clock to obtain a binary digit; accumulating the binary digit; repeating the steps of sampling and accumulating until a measurement interval has elapsed to obtain a sum value; calculating an ON-phase rate of the control signal according to the sum value and the measurement interval, wherein P>=1; and, storing the power consumption value according to the ON-phase rate in an output register.
Further scope of the applicability of the present invention will become apparent from the detailed description given hereinafter. However, it should be understood that the detailed description and specific examples, while indicating preferred embodiments of the invention, are given by way of illustration only, since various changes and modifications within the spirit and scope of the invention will become apparent to those skilled in the art from this detailed description.
The present invention will become more fully understood from the detailed description given hereinbelow and the accompanying drawings which are given by way of illustration only, and thus are not limitative of the present invention, and wherein:
As used herein and in the claims, the term “a,” “an,” “the” and similar terms used in the context of the present invention (especially in the context of the claims) are to be construed to cover both the singular and plural unless otherwise indicated herein or clearly contradicted by the context.
A buck converter is a voltage regulator that provides a stable supply voltage to a CPU in a server. The more the input current into the CPU, the more the power consumption of the CPU. Thus, a feature of the invention is to estimate a power consumption value of a CPU in a server by measuring the input current variations of the CPU. As known in the art, during turned-on phases of phase width modulation (PWM)/phase frequency modulation (PFM) signals, its current source provides currents and its inductor charges; instead, during turned-off phases of the PWM/PFM signals, its inductor provides currents for the CPU in the server. The longer the inductor charges, the more the consumed currents and energy. Accordingly, another feature of the invention is to estimate the power consumption of a CPU in a server by measuring an ON-phase rate of the PWM/PFM/Ugate signal. According to the invention, the ON-phase rate (ONR) of the PWM/PFM/Ugate signal is defined as a number (P) of phases of a PWM/PFM controller multiplied by a ratio between a total interval (SUM) of turned-on phases of the PWM/PFM/Ugate signal and a whole measurement interval (N1), i.e., ONR=(SUM*P)/N1.
Another feature of the invention is to include a power measurement circuit in a BMC. The power measurement circuit measures the power consumption of a CPU in a server and the BMC periodically reads the measured power consumption values from the power measurement circuit. The BMC/CPU provides the measured power consumption values for a load balancer. Following that, the load balancer distributes incoming requests among servers from a server pool based on the measured power consumption values from all the servers and the least-connection scheduling, to thereby balance power consumption among the servers. As soon as any abnormal power consumption event is detected, the BMC issues a warning signal, logs the abnormal power consumption values and informs the system administrator in real time.
In various embodiments, each of Network-A, Network-B and Network-C may be a local area network (LAN), a wide area network (WAN), a wireless network, an intranet, or the Internet, for example. Example client devices 181˜18M includes, without limitation, personal computers, intermediate network devices, network telephones, network gaming platforms, cellular telephones, network televisions, television set-top boxes. Moreover, each of client devices 181˜18M may be a different kind of network device and each of Network-A, Network-B and Network-C may be a different kind of network. Servers 101˜10N may be any of a few types of servers that provide one or more resources or network services. Although only one load balancer 160 is shown in
Prior to distributing network traffic from client devices 181˜18M among the servers 101˜10N, the load balancer 160 collects power consumption values from the servers 101˜10N of the server pool 170 by two ways. The first way is that the CPU 140 reads the power consumption values from the BMC 110 through IPMI and then the load balancer 160 reads the power consumption values from the CPU 140 through Network-A. The second way is that the load balancer 160 directly reads the power consumption values from the BMC 110 through Network-C.
Referring to
Step S210: Collect power consumption values R1 (as shown in
Step S220: Form a candidate list including candidate servers with their numbers of connections less than a predefined limit. The load balancer 160 draws up a candidate list in which each candidate server has a number of connections less than a predefined limit according to the connection table. In other words, the load balancer 160 removes any server with a number of connections over the predefined limit from the candidate list.
Step S230: Allocate a following/incoming request to a candidate server with a minimum power consumption according to the candidate list. In one embodiment, in order of power consumption, a candidate server with a minimum power consumption is placed at the top of the candidate list and allocated for a following/incoming request by the load balancer 160.
An operational method 200B of the load balancer 160 to distribute network communications based on power consumption of the servers and the least-connection scheduling will be described with reference to
Step S251: Sort power consumption values R1 from all servers 101˜10N into a plurality of power degrees. According to magnitude, the load balancer 160 sorts all the power consumption values R1 into a plurality of power degrees. For example, the power consumption values are sorted into three power degrees and a third power degree is the minimum power degree.
Step S252: Draw up a candidate list including candidate servers with the minimum power degree. According to the above example of step S251, the load balancer 160 includes the candidate servers with the minimum (third) power degree on the candidate list and removes the candidate servers with first/second power degrees from the candidate list.
Step S253: Allocate a following/incoming request to a candidate server with a fewest number of connections according to the candidate list. In one embodiment, in order of number of connections, a candidate server with a fewest number of connections is placed at the top of the candidate list and allocated for a following/incoming request by the load balancer 160.
In the meantime, according to the voltage level of the latch signal LS, the multiplexer 451 selects a first input terminal and a second input terminal for output. In one embodiment, when the latch signal LS has a low logic level, the multiplexer 451 selects the second input terminal (coupled to the output of the accumulation register 450) for output; when the latch signal LS has a high logic level, the multiplexer 451 selects the first input terminal (applied with a predefined value of 0) for output. The adder 452 adds the binary digit from the sampling register 410 and the output of the multiplexer 451 to output an added value AD and temporarily store it in the accumulation register 453. As soon as the measurement interval ends (i.e., cnt==N1), the sum register 455 latches the data from the accumulation register 453 at the rising/falling edge of the latch signal LS. Next, the calculation unit 470 reads a value SUM from the sum register 455 and calculates an ON-phase rate ONR of the control signal VR according to the measurement interval N1 and the number P of phases of the PWM controller 301 using the following equation: ONR=(SUM*P)/N1. In one embodiment, the IIR filter 480 uses the following infinite impulse response (IIR) equation to obtain an averaged ON-phase rate R1, where two parameters w1, w2 are preset values: R1=(ONR*w1+R1*w2)/(w1+w2). As a result, the output register 490 stores the averaged ON-phase rate R1 and is periodically read out as a power consumption value by the BMC 110. Please be noted that depending on different circuit needs, the calculation unit 470 can directly store the ON-phase rate ONR of the control signal VR in the output register 490, eliminating the need of including the IIR filter 480. Thus, the IIR filter 480 is optional and represented in dotted lines. In an alternative embodiment, the IIR filter 480 can be replaced with a lowpass filter.
As known in the art, upon decoding, a PWM decoder/receiver needs to align the start and the end of a PWM pulse with a measurement interval and a sampling clock, and measure its turned-on width and turned-off width to generate a decoded digit. Upon decoding, a PFM decoder/receiver needs to find the start and the end of a PFM pulse, and measure its frequency to generate a decoded digit. In addition, both of the PWM and PFM signals have to be decoded on a pulse-by-pulse basis. In contrast, since only turned-on phases of the shifted signal Ss are accumulated during the measurement interval, there is no need for any edge of the shifted signal Ss to be aligned with the measurement interval and the high frequency clock CK, and there is no need for the shifted signal Ss to be measured on a pulse-by-pulse basis in the invention. In other words, the start and the width of the measurement interval are arbitrary in the invention.
In sum, the invention has the following advantages. First, it is easy to measure the power consumption value R1 (or the ON-phase rate ONR) in comparison with the PWM/PFM decoder/receiver. Second, by constantly measuring the power consumption values R1 using the power measurement circuit and by periodically reading the power consumption values R1 using the BMC, any abnormal power consumption event can be detected in real time and a system administrator can be immediately informed. Third, by periodically collecting the power consumption values R1 from all the servers, the load balancer can distribute network communications (or requests) from client devices based on power consumption of the servers and the least-connection scheduling, to thereby improve efficiency and balance power consumption among the servers.
While certain exemplary embodiments have been described and shown in the accompanying drawings, it is to be understood that such embodiments are merely illustrative of and not restrictive on the broad invention, and that this invention should not be limited to the specific construction and arrangement shown and described, since various other modifications may occur to those ordinarily skilled in the art.
Number | Name | Date | Kind |
---|---|---|---|
5535370 | Raman | Jul 1996 | A |
6601084 | Bhaskaran et al. | Jul 2003 | B1 |
7844839 | Palmer et al. | Nov 2010 | B2 |
8261116 | Palmer et al. | Sep 2012 | B2 |
8341244 | Isobe | Dec 2012 | B2 |
8745425 | Kameda et al. | Jun 2014 | B2 |
9100832 | On | Aug 2015 | B2 |
20060165205 | Dally | Jul 2006 | A1 |
20080229127 | Felter | Sep 2008 | A1 |
20150074435 | Jane | Mar 2015 | A1 |
20150154048 | Alshinnawi | Jun 2015 | A1 |
20150212917 | Morrison | Jul 2015 | A1 |
Number | Date | Country | |
---|---|---|---|
20170168550 A1 | Jun 2017 | US |