WO2016197621A1 - 一种调整服务器的频率的方法及装置 - Google Patents

一种调整服务器的频率的方法及装置 Download PDF

Info

Publication number
WO2016197621A1
WO2016197621A1 PCT/CN2016/073870 CN2016073870W WO2016197621A1 WO 2016197621 A1 WO2016197621 A1 WO 2016197621A1 CN 2016073870 W CN2016073870 W CN 2016073870W WO 2016197621 A1 WO2016197621 A1 WO 2016197621A1
Authority
WO
WIPO (PCT)
Prior art keywords
frequency
server
servers
execution time
server group
Prior art date
Application number
PCT/CN2016/073870
Other languages
English (en)
French (fr)
Inventor
徐渊
隋秀峰
包云岗
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2016197621A1 publication Critical patent/WO2016197621A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • G06F1/08Clock generators with changeable or programmable clock frequency

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method and apparatus for adjusting a frequency of a server.
  • the Performance Monitor detects the delay value of the current target task on each server in real time and delays the current target task on each server. The value is sent to the frequency control module (Frequency Contrl).
  • Frequency Contrl frequency control module
  • each server performs the target task in the serial order.
  • the frequency control module receives the delay value of the task on all servers, it determines the adjusted frequency of all servers according to the delay value of the current target task on all servers, the average value of the delay value of the current target task on all servers, and the SLO. And the frequency control module uniformly adjusts the frequency of all servers.
  • the frequency control module can determine the frequency adjustment value of each server after the current target task needs to be executed on each server. Therefore, the above-mentioned frequency modulation strategy can reduce the probability that a subsequent target task will generate a long tail after being executed on each server. However, for the target task in the execution process, the above-mentioned FM strategy cannot reduce the probability that the current target task will generate a long tail after being executed on each server.
  • the embodiment of the invention provides a method and a device for adjusting the frequency of a server, which can reduce the probability that a target task in the execution process will generate a long tail after being executed on all servers.
  • the embodiment of the present invention adopts the following technical solutions:
  • an embodiment of the present invention provides a method for adjusting a frequency of a server, where the method is used to adjust a frequency of at least one of the N servers, where the N servers are used to perform a target task in sequence, wherein , N is a positive integer greater than 1, the method includes:
  • the execution time of the acquiring target task on the jth server includes:
  • the execution time of the acquiring target task on the jth server includes:
  • determining the j+1 according to the execution time Up to the first server group in the Nth server, and adjusting the frequency of the first server group including:
  • the determining, by the execution time, the first server group in the j+1th to the Nth servers And adjusting the frequency of the first server group including:
  • the relaxation time Determining the first server group from the j+1th to the Nth servers, wherein the slack time is the execution time and the difference from the sum of the cutoff costs of the i servers Determining the difference of the first threshold;
  • the frequency of each server in the first server group is adjusted to the second frequency.
  • the method further includes:
  • the server in the third server group runs at the first frequency, and adjusts the frequency of the third server group to the second frequency.
  • the method further includes:
  • the frequency of each server in the first server group is adjusted to the first frequency.
  • an embodiment of the present invention provides an apparatus for adjusting a frequency of a server, where the apparatus is configured to adjust a frequency of at least one of the N servers, where the N servers are used to sequentially perform a target task, where , N is a positive integer greater than 1, and the device includes:
  • a time statistics module configured to acquire an execution time of the target task at the jth server, where j is a positive integer greater than 0 and less than N;
  • a frequency control module configured to determine, according to the execution time acquired by the time statistics module, a first server group in the j+1th to Nth servers, when the execution time is greater than a preset first threshold, and Adjusting the frequency of the first server group.
  • the time statistics module is specifically configured to:
  • the time statistics module is specifically configured to:
  • the frequency control module is specifically configured to:
  • the frequency control module is specifically configured to:
  • the frequency of each server in the first server group is adjusted to the second frequency.
  • the frequency control module is further configured to:
  • the server in the third server group runs at the first frequency, and adjusts the frequency of the third server group to the second frequency.
  • the frequency control module is further configured to: when the target task is executed on the N servers Thereafter, the frequency of each server in the first server group is adjusted to the first frequency.
  • the method and device for adjusting the frequency of the server provided by the embodiment of the present invention, when the execution time of the obtained target task is greater than the preset first threshold, the j+1 to the Nth are determined according to the execution time.
  • the first server group in the server and adjust the frequency of the first server group.
  • j is a positive integer greater than 0 and less than N.
  • the frequency control module uniformly adjusts the frequency of all servers after the target tasks are executed on all servers in the prior art.
  • the execution time of the target task at the jth server can be obtained in real time, and the first server group is determined according to the execution time, and the frequency of the first server group is adjusted.
  • the target task that has generated the long tail is compensated in the subsequent execution process, that is, by adjusting the frequency of the first server group, the first server group is used to perform the target task.
  • Time to compensate for the long tail of the target task on the current server Therefore, the probability that a target task in execution will generate a long tail after execution on all servers is reduced.
  • FIG. 1 is a schematic structural diagram of a data center according to an embodiment of the present invention.
  • FIG. 2 is a flowchart of a method for adjusting a frequency of a server according to an embodiment of the present invention
  • FIG. 3 is a flowchart of another method for adjusting a frequency of a server according to an embodiment of the present invention.
  • FIG. 4 is a flowchart of another method for adjusting a frequency of a server according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of another method for adjusting a frequency of a server according to an embodiment of the present invention.
  • FIG. 6 is a flowchart of another method for adjusting a frequency of a server according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of grouping all servers according to an embodiment of the present invention.
  • FIG. 8 is a flowchart of another method for adjusting a frequency of a server according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of a section for dividing a total execution time according to an embodiment of the present invention.
  • FIG. 10 is a flowchart of another method for adjusting a frequency of a server according to an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of an apparatus for adjusting a frequency of a server according to an embodiment of the present disclosure
  • FIG. 12 is a schematic structural diagram of an apparatus for adjusting a frequency of a server according to an embodiment of the present invention.
  • the embodiment of the invention can be used in a data center, and the data center is provided with a time statistics module and a frequency control module.
  • the time statistics module can perform real-time statistics on the processing status of each task in the server, for example, the execution time of each task on the server, wherein the execution time may include the node delay of the server and the network delay during the transmission; frequency control
  • the module can determine the first server group of all servers and adjust the frequency of the first server group based on parameters used to represent the processing status of each task on each of all servers.
  • a performance monitoring module for monitoring the performance of each server in real time can be specifically set. The performance monitoring module can monitor all the servers in accordance with the parameters reported by the time statistics module for indicating the processing status of each task in the server.
  • the processing status of each task on the server is also provided with a plurality of serial servers, as shown in FIG. 1 is a structural diagram of a time statistics module, a performance monitoring module, a frequency control module, and N servers such as a server 1 and a server 2.
  • the server 1 to the server N are serial, and in the process of executing the task, the server 1 to the server N need to sequentially execute the same task in the order of serial arrangement.
  • An embodiment of the present invention provides a method for adjusting a frequency of a server, where the method is used to adjust a frequency of at least one of N servers, where the N servers are used to perform serial tasks in sequence, where N is greater than 1 Positive integer.
  • the method includes:
  • j is a positive integer greater than 0 and less than N.
  • the execution time of the task on the server is longer; when the server running at the higher frequency is higher, the execution time of the task on the server is shorter. Therefore, in the process of adjusting the frequency of the server, it is possible to determine to increase or decrease the frequency of the server by obtaining the execution time, for example, adjusting the frequency of the server to a high frequency or adjusting to a low frequency. It should be noted that, in the actual application scenario, there may be multiple tasks being executed on each server, and obtaining the execution time of each task separately consumes a large amount of resources. Therefore, sampling may be set according to different application scenarios.
  • Time that is, the execution time of each task running on the server can be periodically acquired, and then step 102 is executed according to the execution time of each task periodically acquired, without having to acquire the execution time of each task appearing on the server. , thereby reducing the resources used to obtain the execution time of the task.
  • the execution time may be a parameter directly acquired according to a certain periodicity, or a result obtained by analyzing and/or calculating according to the acquired parameter, where the execution time is a parameter related to adjusting the frequency of the server.
  • this section can be referred to in the place where the execution time is involved in this article.
  • the first server group of all the servers may be determined according to the execution time, and then the frequency of the first server group may be adjusted according to the requirements of different application scenarios according to a preset adjustment rule. It should be noted that there may be multiple ways of adjusting the frequency. For details, refer to other implementation manners of the embodiments of the present invention.
  • the execution time of the target task in the jth server may be the time taken by the jth server to execute the target task, or the first to jth server execution targets after the jth server performs the target task.
  • the first server group may include one or more servers that need to be adjusted. In the embodiment of the present invention, the number of servers in the first server group is not specifically limited, and the servers in the first server group may be determined according to different application scenarios. Quantity.
  • the implementation manner shown in FIG. 3 may be implemented on the basis of the implementation manner shown in FIG. 2, where step 101 may be specifically implemented as step 1011. :
  • step 1012 In another implementation manner of the embodiment of the present invention, on the basis of the implementation manner shown in FIG. 2, the implementation manner shown in FIG. 4 may also be implemented, where step 101 may be specifically implemented.
  • step 1012 For step 1012:
  • the method for adjusting the frequency of the server provided by the embodiment of the present invention, when the execution time of the obtained target task is greater than the preset first threshold, the j+1th to the Nth server are determined according to the execution time.
  • the first server group in the group and adjust the frequency of the first server group.
  • j is a positive integer greater than 0 and less than N.
  • the frequency control module uniformly adjusts the frequency of all servers after the target tasks are executed on all servers in the prior art.
  • the execution time of the target task at the jth server can be obtained in real time, and the first server group is determined according to the execution time, and the frequency of the first server group is adjusted.
  • the target task that has generated the long tail is compensated in the subsequent execution process, that is, by adjusting the frequency of the first server group, the first server group is used to perform the target task.
  • Time to compensate for the long tail of the target task on the current server Therefore, the probability that a target task in execution will generate a long tail after execution on all servers is reduced.
  • the first server group may be determined according to the cut frequency cost and the execution time of the j+1th to Nth servers. Therefore, on the basis of the implementation as shown in FIG. 2, the implementation may be implemented as shown in FIG. 5, where step 102 is performed according to the execution when the execution time is greater than a preset first threshold.
  • the time is determined to be the first server group in the j+1th to the Nth server, and the frequency of the first server group is adjusted, which may be specifically implemented as step 1021 and step 1022:
  • the cut-frequency cost represents a difference in time required for executing the target task when a single server is operating at a first frequency and when the single server is operating at a second frequency, the value of the second frequency being greater than The first frequency.
  • the target task is The i servers generate long tails, which need to be compensated during the subsequent execution of the target task; when the execution time is less than or equal to the first threshold, the target task does not generate a long tail on the i-th server.
  • the specific implementation manner of the compensation will be mentioned in other implementation manners of the embodiments of the present invention.
  • the compensation process is performed during the subsequent execution of the target task, in the embodiment of the present invention, the compensation can be implemented by adjusting several servers of all the serial servers that perform the target task last.
  • the cost of the cutoff caused by the adjustment frequency is taken into consideration. Therefore, it is necessary to separately obtain the cutoff cost of the j+1th to the Nth servers.
  • the setting of the first threshold may be performed according to the experience value in advance. It should be noted that, since the performance of each server may be different, setting a different first threshold for a server that processes a large data and a server that processes a relatively small data may more accurately determine whether a long tail occurs. Therefore, different first thresholds can be set for all servers in the data center according to the performance of each server.
  • the server in the first server group runs at the first frequency.
  • the method for adjusting the frequency of the server provided by the embodiment of the present invention, when the execution time of the obtained target task in the jth server is greater than a preset first threshold, according to the execution time and the j+1th to Nth servers
  • the frequency-cutting cost of each server determines the first server group in the j+1th to Nth servers, and adjusts the operating frequency of the first server group to the second frequency.
  • j is a positive integer greater than 0 and less than N
  • the server in the first server group runs at the first frequency.
  • the frequency control module uniformly adjusts the frequency of all servers after the target tasks are executed on all servers in the prior art.
  • the execution time of the target task in the jth server can be obtained in real time, and the cut frequency cost of each server in the j+1th to the Nth server is obtained, and then the execution time and the obtained cut frequency cost are obtained according to the execution time and the obtained cut frequency cost. Determining the first server group and adjusting the operating frequency of the first server group to the second frequency. In this way, by adjusting the frequency of the first server group, the target task that has generated the long tail is compensated in the subsequent execution process, that is, by adjusting the frequency of the first server group, the first server group is used to perform the target task. Time to compensate for the long tail of the target task on the current server. Therefore, the probability that a target task in execution will generate a long tail after execution on all servers is reduced.
  • the i server that dynamically adjusts from the first frequency to the second frequency according to the j+1th to the Nth servers may be used to determine the first server group.
  • the execution time is determined, the first server group in the j+1th to the Nth servers is determined, and the working frequency of the first server group is adjusted to the second frequency, which may be specifically implemented as step 10221 to step 10224.
  • i is a positive integer greater than 0 and less than N-j.
  • the first server group is determined in the servers.
  • the relaxation time is a difference between the execution time and the first threshold.
  • Elapsed_time represents an execution time
  • Threshold_time represents a first threshold. Since the process of adjusting the frequency of the server in the embodiment of the present invention belongs to a real-time adjustment process, that is, whenever a target task generates a long tail on the current server, the frequency of the first server group is adjusted, so that the adjusted The server needs to be determined based on the slack time generated by the target task on the current server, without having to consider the slack time generated by the target task on other servers before the current server. Therefore, in the embodiment of the present invention, only the relaxation time generated by the target task on the current server can be acquired.
  • the cutoff cost, relaxation time, and formula of each server in the j+1th to Nth servers may be used. Calculate to get m.
  • m is a positive integer greater than 0 and less than Nji
  • m represents the number of first server groups in the N servers
  • Scale_time i represents the cut-frequency cost of the i-th server.
  • the first server group determined by step 10223 may be the last m of the server in the physical topology order, that is, according to the target task.
  • the order of execution on each physical server sorts each physical server to form a physical topology order of the server.
  • the server which is the m servers that the task arrives at the end, adjusts the m servers.
  • the server to be adjusted can be formed into an intersection, for example, m1 servers need to be adjusted for the target task 1, and m2 servers need to be adjusted for the target task 2, where m1> M2, for both target task 1 and target task 2, only need to adjust m1 servers.
  • all servers can be divided into two groups, the first group of servers running at a high frequency, the second group of servers running at a low frequency, and in order to conveniently determine the location of the first server group, all servers can be followed according to certain rules. Sort. For example, the first group of servers can be sorted in ascending order according to the load level of each server performing the same task, that is, in ascending order according to the load value of each server; the second group of servers can be sorted according to the load degree of each server when performing the same task. Arrange, that is, in descending order of the load value of each server. As shown in FIG. 7, N servers, performance monitoring modules, and frequency control modules are disposed in the data center.
  • the first group includes k servers, each of which runs at a high frequency of each server, and the k servers are arranged in ascending order of the server as server k, server k-1 to server 1;
  • the group includes Nk servers, each of which runs at a low frequency of each server, and the k servers are arranged in descending order of server load as server k+1, server k+2 to server N.
  • a certain number of servers may be sequentially selected from the leftmost end of the second group to move to the leftmost end of the first group.
  • the servers that need to be adjusted are tuned from the most heavily loaded servers in the second set of servers.
  • the rules and the sorting manners of the sorting are not specifically defined, and specific rules and sorting manners may be set according to different application scenarios, for example, generating long on N servers according to a certain number of tasks.
  • the probabilities of the tails are sorted in descending order, or in ascending order of the time taken to perform the same task on each of the N servers or the resources consumed.
  • the arrangement shown in FIG. 7 may be adopted, so that the first server group may be a logically continuous server, that is, a first server group composed of servers with similar loads.
  • the operating frequency of the m first server groups with higher load levels in the second group of servers is adjusted from the low frequency to the high frequency of each server, which can effectively reduce the target tasks in negative
  • the execution time on the server of the first server group with a higher degree of loading thereby adjusting the long tail generated by the target task on the jth server by adjusting the frequency of the first server group by adjusting a smaller number of servers.
  • the method for adjusting the frequency of the server provided by the embodiment of the present invention, when the execution time of the obtained target task is greater than the preset first threshold, the dynamic adjustment from the first frequency to the second frequency
  • the server's cut frequency value and relaxation time determine the first server group in the j+1th to Nth servers, and adjust the frequency of the first server group to the second frequency.
  • j is a positive integer greater than 0 and less than N.
  • the frequency control module uniformly adjusts the frequency of all servers after the target tasks are executed on all servers in the prior art.
  • the frequency-cutting value and the relaxation time of the i servers dynamically adjusted from the first frequency to the second frequency can be obtained in real time, and according to the difference between the relaxation time and the sum of the cut-frequency costs of the i servers,
  • the first server group is determined and the frequency of the first server group is adjusted to the second frequency.
  • the target task that has generated the long tail is compensated in the subsequent execution process, that is, by adjusting the frequency of the first server group, the first server group is used to perform the target task. Time to compensate for the long tail of the target task on the current server. Therefore, the probability that a target task in execution will generate a long tail after execution on all servers is reduced.
  • the size relationship determines the second server group and adjusts the frequency of the second server group, or determines the third server group according to the relationship between the total execution time of the N servers and the third threshold, and adjusts the frequency of the third server group. . Therefore, on the basis of the implementation shown in FIG. 5, it can also be implemented as shown in FIG. 8:
  • the server in the second server group runs on the second frequency.
  • the second server group may include one or more servers that need to be adjusted.
  • the number of servers in the second server group is not specifically limited, and the second may be determined according to different application scenarios. The number of servers in the server group.
  • the server in the third server group runs at the first frequency.
  • the third server group may include one or more servers that need to be adjusted.
  • the number of servers in the third server group is not specifically limited, and the third may be determined according to different application scenarios. The number of servers in the server group.
  • Lantency j Lantency j-1 + Elapsed_time j is calculated to obtain the total execution time Lantency j.
  • Lantency j-1 represents the total execution time of the first j-1 servers
  • Elapsed_time j represents the time taken by the target task to start execution on the jth server until execution is completed.
  • the jth server is the Nth server during the execution of the target task
  • the total execution time Lantivity j of the 1st to Nth servers is determined according to the formula.
  • the N servers it is determined whether the N servers need to be adjusted according to the total execution time of the N servers.
  • the N servers are adjusted according to the preset rule.
  • the preset condition and the preset rule may be set according to historical data. There are various methods for determining the second server group and the third server group, for example, by setting a section for determining whether the total execution time satisfies the condition, and then setting separately for different intervals in which the total execution time is located.
  • the preset rules are set to ensure that the adjusted frequency of the N servers can be more adapted to the execution of the next target task, thereby reducing the probability that the next target task will generate a long tail after being executed on the N servers.
  • interval setting and interval judgment is mentioned.
  • the interval may include a first interval, a second interval, and a third interval.
  • each server may be set as the high frequency of each server.
  • the section includes a first section, a second section, and a third section.
  • the interval may further include a fourth interval, which is set to avoid frequently adjusting the frequency of the server.
  • the upper limit of the first interval is the same as the lower limit of the fourth interval, and is T down ;
  • the upper limit of the fourth interval is the same as the lower limit of the second interval, and is T up ;
  • the value is the same as the lower limit of the third interval and is Deadline.
  • the n servers having a smaller load degree in the first group of servers as shown in FIG. 7 are adjusted from running at high frequency to running. Low frequency, while the number of servers in the first group increases from k to k+n, and the number of servers in the second group decreases from Nk to Nkn, where n ⁇ Nk; when the total execution time of the target task is in the second interval Internally, it is possible to determine n servers with a greater degree of load in the second group of servers as shown in FIG. 7, and adjust the n servers from low frequency operation to high frequency operation, and the number of first group servers is from k.
  • the number of servers in the second group increases from Nk to N-k+n, where n ⁇ Nk; when the total execution time of the current target task is in the third interval, it indicates that the target task is at all
  • the long tail generated during the execution on the server cannot be compensated.
  • the frequency of the server running at low frequency in all servers can be adjusted to high frequency and the preset time can be maintained to reduce the subsequent target task due to the current target task.
  • Nagao raw long tail probability is generated, wherein, the preset time may be empirically set in advance the value of the historical data, the present invention is not specifically limited embodiments.
  • the upper and lower limits of each interval may be specifically set for different application scenarios according to historical data. In the embodiment of the present invention, the specific method for setting the upper and lower limits of each interval is not limited.
  • the method for adjusting the frequency of the server determines the total execution time and the third threshold of the second server group or the N servers according to the relationship between the total execution time of the N servers and the second threshold.
  • the size relationship determines the third server group and adjusts the frequency of the second server group or the third server group.
  • the frequency control module uniformly adjusts the frequency of all servers after the target tasks are executed on all servers in the prior art.
  • the total execution time of the N servers may be acquired, and the second server group or the third server group is determined according to the total execution time and the second threshold, and the size relationship of the third threshold, and the second server is adjusted.
  • the frequency of the group or the third server group is adjusted.
  • the frequency of the server whose frequency is adjusted may be restored after the target task is executed on the N servers. Therefore, on the basis of the implementation shown in FIG. 5, it can also be implemented as shown in FIG. 10:
  • the frequency-adjusted server By adjusting the frequency-adjusted server from running at high frequency to running at low frequency, it can be determined according to the specific application scenario whether all the adjusted frequency servers need to be switched back to run at low frequencies. It should be noted that, in particular, whether the server with the adjusted frequency is switched back to run at a low frequency or the server with a partially adjusted frequency is set back to operate at a low frequency is not specifically limited in the embodiment of the present invention.
  • the method for adjusting the frequency of the server provided by the embodiment of the present invention, when the execution time of the obtained target task is greater than the preset first threshold, the j+1th to the Nth server are determined according to the execution time.
  • the first server group in the group and adjust the frequency of the first server group.
  • j is a positive integer greater than 0 and less than N.
  • the frequency control module uniformly adjusts the frequency of all servers after the target tasks are executed on all servers in the prior art.
  • the execution time of the target task at the jth server can be obtained in real time, and the first server group is determined according to the execution time, and the frequency of the first server group is adjusted.
  • the target task that has generated the long tail is compensated in the subsequent execution process, that is, by adjusting the frequency of the first server group, the first server group is used to perform the target task.
  • the energy consumption of the adjusted server can be reduced by adjusting the frequency of the adjusted server to a low frequency, thereby achieving energy saving in the data center.
  • An embodiment of the present invention provides an apparatus 20 for adjusting a frequency of a server.
  • the apparatus 20 is configured to adjust a frequency of at least one of the N servers, where the N servers are used for serial serial execution.
  • Target task wherein N is a positive integer greater than 1, and said apparatus 20 comprises:
  • the time statistics module 21 is configured to obtain an execution time of the target task at the jth server, where j is a positive integer greater than 0 and less than N.
  • the frequency control module 22 is configured to determine, according to the execution time acquired by the time statistics module 21, the first server group in the j+1th to Nth servers when the execution time is greater than a preset first threshold. And adjusting the frequency of the first server group.
  • time statistics module 21 is specifically configured to:
  • time statistics module 21 is specifically configured to:
  • the frequency control module 22 is specifically configured to:
  • the frequency control module 22 is specifically configured to:
  • the frequency of each server in the first server group is adjusted to the second frequency.
  • the frequency control module 22 is further configured to:
  • the frequency control module 22 is further configured to: after the target task is executed on the N servers, the server in each of the first server groups is The frequency is adjusted to the first frequency.
  • the device for adjusting the frequency of the server determines the j+1th to Nth servers according to the execution time when the acquired target task is greater than the preset first threshold in the execution time of the jth server.
  • the first server group in the group and adjust the frequency of the first server group.
  • j is a positive integer greater than 0 and less than N.
  • the frequency control module uniformly adjusts the frequency of all servers after the target tasks are executed on all servers in the prior art.
  • the execution time of the target task at the jth server can be obtained in real time, and the first server group is determined according to the execution time, and the frequency of the first server group is adjusted.
  • the target task that has generated the long tail is compensated in the subsequent execution process, that is, by adjusting the frequency of the first server group, the first server group is used to perform the target task.
  • Time to compensate for the long tail of the target task on the current server Therefore, the probability that a target task in execution will generate a long tail after execution on all servers is reduced.
  • An embodiment of the present invention provides an apparatus 30 for adjusting a frequency of a server.
  • the apparatus 30 is configured to adjust a frequency of at least one of the N servers, where the N servers are used for serial serial execution.
  • the target task where N is a positive integer greater than one; the device 30 can include a memory 31, a receiver 32, a processor 33, and a bus 34, wherein the memory 31, the receiver 32, and the processor 33 are communicatively coupled by a bus 34.
  • the memory 31 may be a read only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM).
  • the memory 31 can store an operating system and other applications.
  • the program code for implementing the technical solution provided by the embodiment of the present invention is stored in the memory 31 and executed by the processor 33 when the technical solution provided by the embodiment of the present invention is implemented by software or firmware.
  • the receiver 32 is used for communication between the device 30 and other devices or communication networks such as, but not limited to, Ethernet, Radio Access Network (RAN), Wireless Local Area Network (WLAN), and the like.
  • RAN Radio Access Network
  • WLAN Wireless Local Area Network
  • the processor 33 can adopt a general-purpose central processing unit (CPU).
  • CPU central processing unit
  • a microprocessor an application specific integrated circuit (ASIC), or one or more integrated circuits, for performing related procedures to implement the technical solutions provided by the embodiments of the present invention.
  • ASIC application specific integrated circuit
  • Bus 34 may include a path for communicating information between various components of the device, such as memory 31, receiver 32, and processor 33.
  • FIG. 12 only shows the memory 31, the receiver 32 and the processor 33, and the bus 34, in the specific implementation process, those skilled in the art should understand that the device 30 also includes the normal operation. Other devices necessary. At the same time, those skilled in the art will appreciate that hardware devices that implement other functions may also be included, depending on the particular needs.
  • the receiver 32 is configured to acquire the execution time of the target task at the jth server, where j is greater than 0 and less than N. Integer.
  • the processor 33 is coupled to the memory 31 and the receiver 32, and configured to determine the j+1th to Nth servers according to the execution time when the execution time is greater than a preset first threshold The first server group in the group and adjust the frequency of the first server group.
  • the receiver 32 is specifically configured to acquire a time taken by the jth server to execute the target task.
  • the receiver 32 is specifically configured to acquire, after the end of the target task by the jth server, the first to the jth servers perform the target task. Total execution time.
  • the processor 33 is specifically configured to:
  • the receiver 32 is specifically configured to:
  • the frequency of each server in the first server group is adjusted to the second frequency.
  • the processor 33 is further configured to:
  • the server in the third server group runs at the first frequency, and adjusts the frequency of the third server group to the second frequency.
  • the processor 33 is further configured to:
  • the frequency of each server in the first server group is adjusted to the first frequency.
  • the device for adjusting the frequency of the server determines the j+1th to Nth servers according to the execution time when the execution time of the obtained target task is greater than the preset first threshold.
  • the first server group in the group and adjust the frequency of the first server group.
  • j is a positive integer greater than 0 and less than N.
  • the frequency control module uniformly adjusts the frequency of all servers after the target tasks are executed on all servers in the prior art.
  • the execution time of the target task at the jth server can be obtained in real time, and the first server group is determined according to the execution time, and the frequency of the first server group is adjusted.
  • the target task that has generated the long tail is compensated in the subsequent execution process, that is, by adjusting the frequency of the first server group, the first server group is used to perform the target task.
  • Time to compensate for the long tail of the target task on the current server Therefore, the probability that a target task in execution will generate a long tail after execution on all servers is reduced.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明实施例公开了一种调整服务器的频率的方法及装置,涉及通信技术领域,能够降低执行过程中的目标任务在所有服务器上执行完毕后产生长尾的概率。本发明实施例的方法包括:获取目标任务在第j个服务器的执行时间,其中,j为大于0并且小于N的正整数;当所述执行时间大于预设的第一阈值时,根据所述执行时间确定第j+1至第N个服务器中的第一服务器组,并调整所述第一服务器组的频率。本发明适用于数据中心。

Description

一种调整服务器的频率的方法及装置 技术领域
本发明涉及通信技术领域,尤其涉及一种调整服务器的频率的方法及装置。
背景技术
在现有数据中心的分布式环境下,针对search和memkeyvalue这两类拓扑结构,为了减少目标任务在各个服务器上执行完毕后产生的长尾,也就是尽可能保证目标任务在各个服务器上执行的总执行时间小于或等于SLO(Service-Level Object,服务等级目标值),性能监测模块(Performance Monitor)实时检测当前目标任务在各个服务器上的延迟值,并将当前目标任务在各个服务器上的延迟值向频率控制模块(Frequency Contrl)发送。其中,各个服务器之间串行,也就是后一个服务器在执行目标任务时,需要使用前一个服务器执行目标任务之后得到的执行结果,各个服务器均用于执行同一个目标任务,并且在执行目标任务的过程中,各个服务器按照串行顺序依次执行目标任务。当频率控制模块接收到任务在所有服务器上的延迟值之后,根据当前目标任务在所有服务器上的延迟值、当前目标任务在所有服务器上的延迟值的平均值、SLO确定所有服务器调整后的频率,并由频率控制模块统一调整所有服务器的频率。
在实际调频过程中,由于当前目标任务需要在各个服务器上执行完毕后,频率控制模块才能确定各个服务器的频率调整值。因此,采用上述调频策略可以降低后续目标任务在各个服务器上执行完毕后产生长尾的概率。但是,对于执行过程中的目标任务而言,上述调频策略无法降低当前目标任务在各个服务器上执行完毕后产生长尾的概率。
发明内容
本发明实施例提供一种调整服务器的频率的方法及装置,能够降低执行过程中的目标任务在所有服务器上执行完毕后产生长尾的概率。
为达到上述目的,本发明实施例采用如下技术方案:
第一方面,本发明实施例提供一种调整服务器的频率的方法,所述方法用于调整N个服务器中至少一个服务器的频率,所述N个服务器用于依次串行的执行目标任务,其中,N为大于1的正整数,所述方法包括:
获取目标任务在第j个服务器的执行时间,其中,j为大于0并且小于N的正整数;
当所述执行时间大于预设的第一阈值时,根据所述执行时间确定第j+1至第N个服务器中的第一服务器组,并调整所述第一服务器组的频率。
结合第一方面,在第一方面的第一种可能的实现方式中,所述获取目标任务在第j个服务器的执行时间包括:
获取所述第j个服务器执行所述目标任务所占用的时间。
结合第一方面,在第一方面的第二种可能的实现方式中,所述获取目标任务在第j个服务器的执行时间包括:
获取所述第j个服务器执行所述目标任务结束后,第1至第j个服务器执行所述目标任务所占用的总执行时间。
结合第一方面,或第一方面的第一至第二种可能的实现方式中的任意一项,在第一方面的第三种可能的实现方式中,根据所述执行时间确定第j+1至第N个服务器中的第一服务器组,并调整所述第一服务器组的频率,包括:
分别获取第j+1至第N个服务器的切频代价,其中,切频代价表示在单个服务器运行在第一频率时和所述单个服务器运行在第二频率时,用于执行所述目标任务所需要的时间的差值,所述第二频率的数值大于所述第一频率;
根据所述第j+1至第N个服务器中每个服务器的切频代价和所述执行时间,确定所述第j+1至第N个服务器中的第一服务器组,其中所述第一服务器组中的服务器运行在所述第一频率,并调整所述第一服务器组的工作频率至所述第二频率。
结合第一方面的第三种可能的实现方式,在第一方面的第四种可能的实现方式中,所述根据所述执行时间确定第j+1至第N个服务器中的第一服务器组,并调整所述第一服务器组的频率,包括:
确定所述第j+1至第N个服务器中,从所述第一频率调整至所述第二频率的i个服务器,其中,i为大于0并且小于N-j的正整数;
获取所述i个服务器的切频代价之和;
当所述i个服务器的切频代价之和小于松弛时间时,根据所述松弛时间 与所述i个服务器的切频代价之和的差值,从所述第j+1至第N个服务器中确定所述第一服务器组,其中,所述松弛时间为所述执行时间和所述第一阈值的差值;
将所述第一服务器组中每个服务器的频率调整至所述第二频率。
结合第一方面的第三种可能的实现方式,在第一方面的第五种可能的实现方式中,所述方法还包括:
当所述N个服务器的总执行时间小于预设的第二阈值时,根据所述总执行时间,以及所述N个服务器中每个服务器的切频代价,确定所述N个服务器中的第二服务器组,其中,所述第二服务器组中的服务器运行在所述第二频率,并将所述第二服务器组中每个服务器的频率调整至所述第一频率;
当所述总执行时间大于预设的第三阈值时,根据所述总执行时间,以及所述N个服务器中每个服务器的切频代价,确定所述N个服务器中的第三服务器组,其中,所述第三服务器组中的服务器运行在所述第一频率,并将所述第三服务器组的频率调整至所述第二频率。
结合第一方面的第三种可能的实现方式,在第一方面的第六种可能的实现方式中,所述方法还包括:
当所述目标任务在所述N个服务器上执行结束后,将所述第一服务器组中每个服务器的频率调整至所述第一频率。
第二方面,本发明实施例提供一种调整服务器的频率的装置,所述装置用于调整N个服务器中至少一个服务器的频率,所述N个服务器用于依次串行的执行目标任务,其中,N为大于1的正整数,所述装置包括:
时间统计模块,用于获取目标任务在第j个服务器的执行时间,其中,j为大于0并且小于N的正整数;
频率控制模块,用于当所述执行时间大于预设的第一阈值时,根据所述时间统计模块获取的所述执行时间确定第j+1至第N个服务器中的第一服务器组,并调整所述第一服务器组的频率。
结合第二方面,在第二方面的第一种可能的实现方式中,所述时间统计模块,具体用于:
获取所述第j个服务器执行所述目标任务所占用的时间。
结合第二方面,在第二方面的第二种可能的实现方式中,所述时间统计模块,具体用于:
获取所述第j个服务器执行所述目标任务结束后,第1至第j个服务器执行所述目标任务所占用的总执行时间。
结合第二方面,或第二方面的第一至第二种可能的实现方式中的任意一项,在第二方面的第三种可能的实现方式中,所述频率控制模块,具体用于:
分别获取第j+1至第N个服务器的切频代价,其中,切频代价表示在单个服务器运行在第一频率时和所述单个服务器运行在第二频率时,用于执行所述目标任务所需要的时间的差值,所述第二频率的数值大于所述第一频率;
根据所述第j+1至第N个服务器中每个服务器的切频代价和所述执行时间,确定所述第j+1至第N个服务器中的第一服务器组,其中所述第一服务器组中的服务器运行在所述第一频率,并调整所述第一服务器组的工作频率至所述第二频率。
结合第二方面的第三种可能的实现方式,在第二方面的第四种可能的实现方式中,所述频率控制模块,具体用于:
确定所述第j+1至第N个服务器中,从所述第一频率调整至所述第二频率的i个服务器,其中,i为大于0并且小于N-j的正整数;
获取所述i个服务器的切频代价之和;
当所述i个服务器的切频代价之和小于松弛时间时,根据所述松弛时间与所述i个服务器的切频代价之和的差值,从所述第j+1至第N个服务器中确定所述第一服务器组,其中,所述松弛时间为所述执行时间和所述第一阈值的差值;
将所述第一服务器组中每个服务器的频率调整至所述第二频率。
结合第二方面的第三种可能的实现方式,在第二方面的第五种可能的实现方式中,所述频率控制模块,还用于:
当所述N个服务器的总执行时间小于预设的第二阈值时,根据所述总执行时间,以及所述N个服务器中每个服务器的切频代价,确定所述N个服务器中的第二服务器组,其中,所述第二服务器组中的服务器运行在所述第二频率,并将所述第二服务器组中每个服务器的频率调整至所述第一频率;
当所述总执行时间大于预设的第三阈值时,根据所述总执行时间,以及所述N个服务器中每个服务器的切频代价,确定所述N个服务器中的第三服务器组,其中,所述第三服务器组中的服务器运行在所述第一频率,并将所述第三服务器组的频率调整至所述第二频率。
结合第二方面的第三种可能的实现方式,在第二方面的第六种可能的实现方式中,所述频率控制模块,还用于当所述目标任务在所述N个服务器上执行结束后,将所述第一服务器组中每个服务器的频率调整至所述第一频率。
本发明实施例提供的一种调整服务器的频率的方法及装置,当获取的目标任务在第j个服务器的执行时间大于预设的第一阈值时,根据执行时间确定第j+1至第N个服务器中的第一服务器组,并调整第一服务器组的频率。其中,j为大于0并且小于N的正整数。相比较于现有技术中目标任务在所有服务器上执行完毕之后,频率控制模块统一调整所有服务器的频率。本发明实施例中,可以实时获取目标任务在第j个服务器的执行时间,并根据执行时间确定第一服务器组,并调整第一服务器组的频率。这样可以通过调整第一服务器组的频率,使已经产生长尾的目标任务在后续执行过程中得到一定补偿,也就是通过调整第一服务器组的频率,来减少第一服务器组用于执行目标任务的时间,从而弥补目标任务在当前服务器上产生长尾的时间。因此,降低了执行过程中的目标任务在所有服务器上执行完毕后产生长尾的概率。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为本发明实施例提供的一种数据中心的结构示意图;
图2为本发明实施例提供的一种调整服务器的频率的方法流程图;
图3为本发明实施例提供的另一种调整服务器的频率的方法流程图;
图4为本发明实施例提供的另一种调整服务器的频率的方法流程图;
图5为本发明实施例提供的另一种调整服务器的频率的方法流程图;
图6为本发明实施例提供的另一种调整服务器的频率的方法流程图;
图7为本发明实施例提供的一种将所有服务器分组的示意图;
图8为本发明实施例提供的另一种调整服务器的频率的方法流程图;
图9为本发明实施例提供的一种划分总执行时间所在区间的示意图;
图10为本发明实施例提供的另一种调整服务器的频率的方法流程图;
图11为本发明实施例提供的一种调整服务器的频率的装置结构示意图;
图12为本发明实施例提供的一种调整服务器的频率的设备结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。
在本发明实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本发明。在本发明实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括复数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。
本发明实施例可以用于数据中心,数据中心设置有时间统计模块和频率控制模块。其中,时间统计模块可以实时统计每个任务在服务器中的处理状态,比如:每个任务在服务器上的执行时间,其中,执行时间可以包括服务器的节点延迟和传输过程中的网络延迟;频率控制模块可以根据用于表示所有服务器中每个服务器上每个任务的处理状态的参数,来确定所有服务器中的第一服务器组,并调整第一服务器组的频率。在数据中心还可以专门设置用于实时监测各个服务器性能的性能监测模块,性能监测模块可以根据时间统计模块上报的用于表示每个任务在服务器中的处理状态的参数,来监测所有服务器中每个服务器上每个任务的处理状态。数据中心还设置有多个串行的服务器,如图1所示为时间统计模块、性能监测模块、频率控制模块和服务器1、服务器2等N个服务器的结构示意图。其中,服务器1至服务器N串行,并且,在执行任务的过程中,服务器1至服务器N需要按照串行排列的顺序依次执行同一个任务。
本发明实施例提供一种调整服务器的频率的方法,所述方法用于调整N个服务器中至少一个服务器的频率,所述N个服务器用于依次串行的执行任务,其中,N为大于1的正整数。如图2所示,所述方法包括:
101、获取目标任务在第j个服务器的执行时间。
其中,j为大于0并且小于N的正整数。
任务在服务器上的执行过程中,当任务所在服务器运行频率较低时,任务在服务器上的执行时间较长;当任务所在服务器运行频率较高时,任务在服务器上的执行时间较短。因此,在调整服务器的频率的过程中,可以通过获取执行时间来确定将服务器的频率调高或调低,比如:将服务器的频率调整至高频或是调整至低频。需要说明的是,由于在实际应用场景中,每个服务器上可能存在多个正在执行的任务,而分别获取每个任务的执行时间会占用大量资源,因此,可以根据不同的应用场景设定采样时间,也就是可以周期性获取服务器上运行的每个任务的执行时间,之后根据周期性获取的每个任务的执行时间,执行步骤102,而不必获取每个出现在服务器上的任务的执行时间,从而减少获取任务的执行时间所占用的资源。
102、当所述执行时间大于预设的第一阈值时,根据所述执行时间确定第j+1至第N个服务器中的第一服务器组,并调整所述第一服务器组的频率。
需要说明的是,执行时间可以是按照一定周期性直接获取的参数,或者是根据所获取的参数通过分析和/或计算得到的结果,其中,执行时间是与调整服务器的频率相关的参数。此外,在本文中涉及到执行时间的地方均可以参考这部分内容。在本发明实施例中可以根据执行时间来确定所有服务器中的第一服务器组,之后可以按照预先设定的调整规则根据不同应用场景的需求来调整第一服务器组的频率。需要说明的是,调整频率的方式可以有多种,具体可以参照后文中本发明实施例的其他实现方式。
需要说明的是,目标任务在第j个服务器的执行时间可以是第j个服务器执行目标任务所占用的时间,或是第j个服务器执行目标任务结束后,第1至第j个服务器执行目标任务所占用的总执行时间。第一服务器组可以包括一个或多个需要调整的服务器,在本发明实施例中,对于第一服务器组中服务器的数量不作具体限定,可以根据不同的应用场景来确定第一服务器组中服务器的数量。
因此,在本发明实施例的另一个实现方式中,在如图2所示的实现方式的基础上,还可以实现为如图3所示的实现方式,其中,步骤101可以具体实现为步骤1011:
1011、获取所述第j个服务器执行所述目标任务所占用的时间。
或者,在本发明实施例的另一个实现方式中,在如图2所示的实现方式的基础上,还可以实现为如图4所示的实现方式,其中,步骤101可以具体实现 为步骤1012:
1012、获取所述第j个服务器执行所述目标任务结束后,第1至第j个服务器执行所述目标任务所占用的总执行时间。
本发明实施例提供的一种调整服务器的频率的方法,当获取的目标任务在第j个服务器的执行时间大于预设的第一阈值时,根据执行时间确定第j+1至第N个服务器中的第一服务器组,并调整第一服务器组的频率。其中,j为大于0并且小于N的正整数。相比较于现有技术中目标任务在所有服务器上执行完毕之后,频率控制模块统一调整所有服务器的频率。本发明实施例中,可以实时获取目标任务在第j个服务器的执行时间,并根据执行时间确定第一服务器组,并调整第一服务器组的频率。这样可以通过调整第一服务器组的频率,使已经产生长尾的目标任务在后续执行过程中得到一定补偿,也就是通过调整第一服务器组的频率,来减少第一服务器组用于执行目标任务的时间,从而弥补目标任务在当前服务器上产生长尾的时间。因此,降低了执行过程中的目标任务在所有服务器上执行完毕后产生长尾的概率。
为了更加准确的确定第一服务器组,在本发明实施例的另一个实现方式中,可以根据第j+1至第N个服务器的切频代价和执行时间来确定第一服务器组。因此,在如图2所示的实现方式的基础上,还可以实现为如图5所示的实现方式,其中,步骤102当所述执行时间大于预设的第一阈值时,根据所述执行时间确定第j+1至第N个服务器中的第一服务器组,并调整所述第一服务器组的频率,可以具体实现为步骤1021和步骤1022:
1021、当所述执行时间大于预设的第一阈值时,分别获取第j+1至第N个服务器的切频代价。
其中,切频代价表示在单个服务器运行在第一频率时和所述单个服务器运行在第二频率时,用于执行所述目标任务所需要的时间的差值,所述第二频率的数值大于所述第一频率。
在本发明实施例中,可以通过将目标任务在第j个服务器的执行时间和预先设置的第一阈值进行比较来判断是否产生长尾,当执行时间大于第一阈值时,则目标任务在第i个服务器产生长尾,需要在目标任务的后续执行过程中进行补偿;当执行时间小于或等于第一阈值时,则目标任务在第i个服务器未产生长尾。其中,补偿的具体实现方式在后文中本发明实施例的其他实现方式中会提到。
需要说明的是,由于补偿过程是在目标任务在后续执行过程中进行的,因此,在本发明实施例中,可以通过调整串行的所有服务器中最后执行目标任务的几个服务器来实现补偿。而在调整服务器的频率的过程中,会考虑到调整频率所带来的切频代价,因此,这里需要分别获取第j+1至第N个服务器的切频代价。
在本发明实施例中,在目标任务在当前服务器上执行之前,可以预先根据经验值来进行第一阈值的设定。需要说明的是,由于每个服务器的性能可能不同,对于处理数据较大的服务器和处理数据相对较小的服务器设定不同的第一阈值可以更准确的对是否发生长尾进行判断。因此,可以根据每个服务器的性能为数据中心的所有服务器分别设定不同的第一阈值。
1022、根据所述第j+1至第N个服务器中每个服务器的切频代价和所述执行时间,确定所述第j+1至第N个服务器中的第一服务器组,并调整所述第一服务器组的工作频率至所述第二频率。
其中,所述第一服务器组中的服务器运行在所述第一频率。
本发明实施例提供的一种调整服务器的频率的方法,当获取的目标任务在第j个服务器的执行时间大于预设的第一阈值时,根据执行时间和第j+1至第N个服务器中每个服务器的切频代价,确定第j+1至第N个服务器中的第一服务器组,并调整第一服务器组的工作频率至第二频率。其中,j为大于0并且小于N的正整数,第一服务器组中的服务器运行在第一频率。相比较于现有技术中目标任务在所有服务器上执行完毕之后,频率控制模块统一调整所有服务器的频率。本发明实施例中,可以实时获取目标任务在第j个服务器的执行时间,并获取第j+1至第N个服务器中每个服务器的切频代价,之后根据执行时间和获取的切频代价确定第一服务器组,并调整第一服务器组的工作频率至第二频率。这样可以通过调整第一服务器组的频率,使已经产生长尾的目标任务在后续执行过程中得到一定补偿,也就是通过调整第一服务器组的频率,来减少第一服务器组用于执行目标任务的时间,从而弥补目标任务在当前服务器上产生长尾的时间。因此,降低了执行过程中的目标任务在所有服务器上执行完毕后产生长尾的概率。
为了更加准确的确定第一服务器组,在本发明实施例的另一个实现方式中,可以根据第j+1至第N个服务器中,从第一频率动态调整至第二频率的i个服务器的切频代价之和,以及松弛时间,确定第一服务器组。因此,在如 图5所示的实现方式的基础上,还可以实现为如图6所示的实现方式,其中,步骤1022根据所述第j+1至第N个服务器中每个服务器的切频代价和所述执行时间,确定所述第j+1至第N个服务器中的第一服务器组,并调整所述第一服务器组的工作频率至所述第二频率,可以具体实现为步骤10221至步骤10224:
10221、确定所述第j+1至第N个服务器中,从所述第一频率调整至所述第二频率的i个服务器。
其中,i为大于0并且小于N-j的正整数。
10222、获取所述i个服务器的切频代价之和。
10223、当所述i个服务器的切频代价之和小于松弛时间时,根据所述松弛时间与所述i个服务器的切频代价之和的差值,从所述第j+1至第N个服务器中确定所述第一服务器组。
其中,所述松弛时间为所述执行时间和所述第一阈值的差值。
在本发明实施例中,可以根据公式Slack_time=Elapsed_time-Threshold_time进行计算得到松弛时间Slack_time。其中,Elapsed_time表示执行时间,Threshold_time表示第一阈值。由于在本发明实施例的调整服务器的频率的过程属于实时调整过程,也就是每当出现目标任务在当前服务器上产生长尾时,就会对第一服务器组的频率进行调整,这样被调整的服务器需要根据目标任务在当前服务器上产生的松弛时间来确定,而不需要考虑目标任务在当前服务器之前的其他服务器上产生的松弛时间。因此,在本发明实施例中,可以只获取目标任务在当前服务器上产生的松弛时间。
在本发明实施例中,可以根据第j+1至第N个服务器中每个服务器的切频代价、松弛时间和公式
Figure PCTCN2016073870-appb-000001
进行计算得到m。其中,m为大于0并且小于N-j-i的正整数,m表示N个服务器中的第一服务器组的数量,Scale_timei表示第i个服务器的切频代价。在本发明实施例中,为了避免针对每个目标任务所调整的服务器造成过多的资源浪费,步骤10223确定的第一服务器组可以是服务器在物理拓扑排序的最后m个,也就是按照目标任务在各个物理服务器上的执行的先后顺序,将各个物理服务器进行排序,形成服务器的物理拓扑排序,之后在服务器的调整过程中,通过确定m的值来确定物理拓扑排序中需要调整的最后m个服务器,也就是任务最后到达的m个服务器,并对这m个服务器进行调整。这样当需要针对多个正在执行任务来调整服务器的频率时,就可以使待调整服务器形成交集,比如:针对目标任务1需要调整m1 个服务器,针对目标任务2需要调整m2个服务器,其中m1>m2,则同时针对目标任务1和目标任务2,只需要调整m1个服务器。如果在调整过程中采用随机挑选服务器的方式来进行调整,那可能同时需要调整m1+m2个服务器来保证目标任务1和目标任务2的执行,相对于只调整m1个服务器至高频,按照物理拓扑排序进行服务器的调整,可以节省大量资源。
在本发明实施例中,可以将所有服务器分成两组,第一组服务器运行在高频,第二组服务器运行在低频,并且为了方便确定第一服务器组的位置,可以将所有服务器按照一定规则进行排序。比如:第一组服务器可以按照每个服务器执行相同任务时的负载程度升序排列,也就是按照每个服务器的负载值升序排列;第二组服务器可以按照每个服务器执行相同任务时的负载程度降序排列,也就是按照每个服务器的负载值降序排列。如图7所示,在数据中心中设置有N个服务器、性能监测模块和频率控制模块。其中,第一组包括k个服务器,这k个服务器均运行在每个服务器的高频,且这k个服务器按照服务器的负载程度升序排列为服务器k、服务器k-1至服务器1;第二组包括N-k个服务器,这N-k个服务器均运行在每个服务器的低频,且这k个服务器按照服务器的负载程度降序排列为服务器k+1、服务器k+2至服务器N。在调整服务器的频率的过程中,当需要将一定数量的服务器从运行在低频调整至运行在高频时,可以从第二组最左端按照顺序依次选择一定数量的服务器移至第一组最左端需要调整的服务器是从第二组服务器中负载程度最高的服务器开始调整的。通过将两组服务器按照第一组升序和第二组降序的方式进行排列,可以看成将两组服务器的最左端连接起来时,所有服务器从服务器1至服务器N是按照负载程度的降序排列的。
需要说明的是,在本发明实施例中不具体限定排序的规则和排序方式,可以根据不同的应用场景设定具体的规则和排序方式,比如:按照一定数量的任务在N个服务器上产生长尾的概率降序排列,或者按照N个服务器中每个服务器上执行相同任务所占用的时间或是所耗费的资源升序排列。
10224、将所述第一服务器组中每个服务器的频率调整至所述第二频率。
为了方便调整,可以采取如图7所示的排列方式,这样第一服务器组可以是逻辑上连续的服务器,也就是负载程度相近的服务器组成的第一服务器组。对于数据中心而言,将第二组服务器中负载程度较高的m个第一服务器组的运行频率从低频调整至每个服务器的高频,可以有效的降低目标任务分别在负 载程度较高的第一服务器组的服务器上的执行时间,从而通过调整较少数量的服务器来实现通过调整第一服务器组的频率对目标任务在第j个服务器产生的长尾进行补偿。
本发明实施例提供的一种调整服务器的频率的方法,当获取的目标任务在第j个服务器的执行时间大于预设的第一阈值时,根据从第一频率动态调整至第二频率的i个服务器的切频代价值和松弛时间,确定第j+1至第N个服务器中的第一服务器组,并将第一服务器组的频率调整至第二频率。其中,j为大于0并且小于N的正整数。相比较于现有技术中目标任务在所有服务器上执行完毕之后,频率控制模块统一调整所有服务器的频率。本发明实施例中,可以实时获取从第一频率动态调整至第二频率的i个服务器的切频代价值和松弛时间,并根据松弛时间与i个服务器的切频代价之和的差值,确定第一服务器组,并将第一服务器组的频率调整至第二频率。这样可以通过调整第一服务器组的频率,使已经产生长尾的目标任务在后续执行过程中得到一定补偿,也就是通过调整第一服务器组的频率,来减少第一服务器组用于执行目标任务的时间,从而弥补目标任务在当前服务器上产生长尾的时间。因此,降低了执行过程中的目标任务在所有服务器上执行完毕后产生长尾的概率。
为了降低在目标任务之后执行的其他目标任务在N个服务器上执行完毕后产生长尾的概率,在本发明实施例的另一个实现方式中,可以根据N个服务器的总执行时间和第二阈值的大小关系来确定第二服务器组,并调整第二服务器组的频率,或者根据N个服务器的总执行时间和第三阈值的大小关系来确定第三服务器组,并调整第三服务器组的频率。因此,在如图5所示的实现方式的基础上,还可以实现为如图8所示的实现方式:
103、当所述N个服务器的总执行时间小于预设的第二阈值时,根据所述总执行时间,以及所述N个服务器中每个服务器的切频代价,确定所述N个服务器中的第二服务器组,并将所述第二服务器组中每个服务器的频率调整至所述第一频率。
其中,所述第二服务器组中的服务器运行在所述第二频率。
需要说明的是,第二服务器组可以包括一个或多个需要调整的服务器,在本发明实施例中,对于第二服务器组中服务器的数量不作具体限定,可以根据不同的应用场景来确定第二服务器组中服务器的数量。
104、当所述总执行时间大于预设的第三阈值时,根据所述总执行时间, 以及所述N个服务器中每个服务器的切频代价,确定所述N个服务器中的第三服务器组,并将所述第三服务器组的频率调整至所述第二频率。
其中,所述第三服务器组中的服务器运行在所述第一频率。
需要说明的是,第三服务器组可以包括一个或多个需要调整的服务器,在本发明实施例中,对于第三服务器组中服务器的数量不作具体限定,可以根据不同的应用场景来确定第三服务器组中服务器的数量。
根据公式Lantencyj=Lantencyj-1+Elapsed_timej进行计算得到总执行时间Lantencyj。其中,Lantencyj-1表示前j-1个服务器的总执行时间,Elapsed_timej表示所述目标任务在第j个服务器上开始执行到执行完毕所占用的时间。当在执行目标任务过程中,所述第j个服务器是第N个服务器时,根据公式确定第1至第N个服务器的总执行时间Lantencyj
在本发明实施例中,可以根据N个服务器的总执行时间来确定是否需要对N个服务器进行调整,当N个服务器的总执行时间满足预设条件时,按照预设规则调整N个服务器。其中,预设条件和预设规则可以根据历史数据来设定。具体用于判断第二服务器组和第三服务器组的方法有多种,比如:通过预先设定用来判断总执行时间是否满足条件的区间,之后针对总执行时间所在的不同区间内来分别设定预设规则,以保证调整后的N个服务器的频率可以更适应于下一个目标任务的执行,从而降低下一个目标任务在N个服务器上执行完毕后产生长尾的概率,在后文会提到区间设定以及区间判断的具体实现方式。
例如:区间可以包括第一区间、第二区间和第三区间。
当N个服务器的总执行时间Lantencyj在第一区间时,可以根据公式
Figure PCTCN2016073870-appb-000002
进行计算得到p,并将p个服务器中的每个服务器的频率调整为p个服务器中的每个服务器的低频。其中,p表示第二服务器组中服务器的数量,Tdown表示第一区间的上限,Scale_timei表示第i个服务器的切频代价。需要说明的是,在目标任务开始执行之前,为了保证目标任务在N个服务器上的执行过程中产生长尾的概率较低,可以将每个服务器分别设置为每个服务器的高频。之后根据目标任务在N个服务器上的总执行时间所在区间来判断是否需要将部分服务器调整至部分服务器的低频。当N个服务器的总执行时间Lantencyj在第二区间时,可以根据公式
Figure PCTCN2016073870-appb-000003
进行计算得到q,并将q个服务器中的每个服务器的频率调整至q个服务器中的每个服务器的高频。其中,q表示第三服务器组中服务器的数量,Tup表示第二 区间的下限。当N个服务器的总执行时间Lantencyj在第三区间时,可以将N个服务器中的每个服务器的频率调整至N个服务器中的每个服务器的高频。
如图9所示,区间包括第一区间、第二区间和第三区间。在本发明实施例中,区间还可以包括第四区间,第四区间是为了避免频繁调整服务器的频率而设置的,在理想情况下,任务在数据中心的所有服务器上执行结束的总执行时间将收敛于此区间内,并达到稳定状态。其中,第一区间的上限值与第四区间的下限值相同,为Tdown;第四区间的上限值与第二区间的下限值相同,为Tup;第二区间的上限值与第三区间的下限值相同,为Deadline。
当目标任务的总执行时间在第一区间内时,可以确定如图7所示的第一组服务器中负载程度较小的n个服务器,将这n个服务器从运行在高频调整至运行在低频,同时第一组服务器的数量从k个增加至k+n个,第二组服务器的数量从N-k个减少至N-k-n个,其中,n<N-k;当目标任务的总执行时间在第二区间内时,可以确定如图7所示的第二组服务器中负载程度较大的n个服务器,将这n个服务器从运行在低频调整至运行在高频,同时第一组服务器的数量从k个减少至k-n个,第二组服务器的数量从N-k个增加至N-k+n个,其中,n<N-k;当当前目标任务的总执行时间在第三区间内时,表示目标任务在所有服务器上执行过程中产生的长尾是无法进行补偿的,此时可以将所有服务器中运行在低频的服务器的频率调整至高频,并维持预设时间,以减少后续目标任务因当前目标任务产生的长尾而产生长尾的概率,其中,预设时间可以是根据历史数据预先设定的经验值,在本发明实施例中不具体限定。需要说明的是,每个区间的上限和下限可以根据历史数据,针对不同的应用场景具体设定,在本发明实施例中,不对设定每个区间的上限和下限的具体方法进行限定。
本发明实施例提供的一种调整服务器的频率的方法,根据N各服务器的总执行时间和第二阈值的大小关系,确定第二服务器组,或者,N各服务器的总执行时间和第三阈值的大小关系,确定第三服务器组,并调整第二服务器组或第三服务器组的频率。相比较于现有技术中目标任务在所有服务器上执行完毕之后,频率控制模块统一调整所有服务器的频率。本发明实施例中,可以获取N个服务器的总执行时间,并根据总执行时间和第二阈值,以及第三阈值的大小关系来确定第二服务器组或第三服务器组,并调整第二服务器组或第三服务器组的频率。这样可以通过调整第二服务器组或第三服务器组的频 率,来降低下一个目标任务在执行过程中产生长尾的概率,同时通过调整第二服务器组或第三服务器组的频率,降低执行时间较短的服务器的能耗。
为了节约数据中心的能耗,在本发明实施例的另一个实现方式中,可以在目标任务在N个服务器上执行结束之后,将被调整频率的服务器的频率进行恢复。因此,在如图5所示的实现方式的基础上,还可以实现为如图10所示的实现方式:
105、当所述目标任务在所述N个服务器上执行结束后,将所述第一服务器组中每个服务器的频率调整至所述第一频率。
将已调整频率的服务器从运行在高频调整为运行在低频的过程中,可以根据具体的应用场景来确定是否需要将所有已调整频率的服务器调回运行在低频。需要说明的是,具体是将所有已调整频率的服务器调回运行在低频,还是将部分已调整频率的服务器调回运行在低频在本发明实施例中,不作具体限定。
本发明实施例提供的一种调整服务器的频率的方法,当获取的目标任务在第j个服务器的执行时间大于预设的第一阈值时,根据执行时间确定第j+1至第N个服务器中的第一服务器组,并调整第一服务器组的频率。其中,j为大于0并且小于N的正整数。相比较于现有技术中目标任务在所有服务器上执行完毕之后,频率控制模块统一调整所有服务器的频率。本发明实施例中,可以实时获取目标任务在第j个服务器的执行时间,并根据执行时间确定第一服务器组,并调整第一服务器组的频率。这样可以通过调整第一服务器组的频率,使已经产生长尾的目标任务在后续执行过程中得到一定补偿,也就是通过调整第一服务器组的频率,来减少第一服务器组用于执行目标任务的时间,从而弥补目标任务在当前服务器上产生长尾的时间。因此,降低了执行过程中的目标任务在所有服务器上执行完毕后产生长尾的概率。并且,可以在目标任务在N个服务器上执行结束后,通过将被调整的服务器的频率调回低频,来降低被调整的服务器的能耗,从而实现数据中心的节能。
本发明实施例提供一种调整服务器的频率的装置20,如图11所示,所述装置20用于调整N个服务器中至少一个服务器的频率,所述N个服务器用于依次串行的执行目标任务,其中,N为大于1的正整数,所述装置20包括:
时间统计模块21,用于获取目标任务在第j个服务器的执行时间,其中,j为大于0并且小于N的正整数。
频率控制模块22,用于当所述执行时间大于预设的第一阈值时,根据所述时间统计模块21获取的所述执行时间确定第j+1至第N个服务器中的第一服务器组,并调整所述第一服务器组的频率。
在本发明实施例的另一个实现方式中,所述时间统计模块21,具体用于:
获取所述第j个服务器执行所述目标任务所占用的时间。
在本发明实施例的另一个实现方式中,所述时间统计模块21,具体用于:
获取所述第j个服务器执行所述目标任务结束后,第1至第j个服务器执行所述目标任务所占用的总执行时间。
在本发明实施例的另一个实现方式中,所述频率控制模块22,具体用于:
分别获取第j+1至第N个服务器的切频代价,其中,切频代价表示在单个服务器运行在第一频率时和所述单个服务器运行在第二频率时,用于执行所述目标任务所需要的时间的差值,所述第二频率的数值大于所述第一频率;
根据所述第j+1至第N个服务器中每个服务器的切频代价和所述执行时间,确定所述第j+1至第N个服务器中的第一服务器组,其中所述第一服务器组中的服务器运行在所述第一频率,并调整所述第一服务器组的工作频率至所述第二频率。
在本发明实施例的另一个实现方式中,所述频率控制模块22,具体用于:
确定所述第j+1至第N个服务器中,从所述第一频率调整至所述第二频率的i个服务器,其中,i为大于0并且小于N-j的正整数;
获取所述i个服务器的切频代价之和;
当所述i个服务器的切频代价之和小于松弛时间时,根据所述松弛时间与所述i个服务器的切频代价之和的差值,从所述第j+1至第N个服务器中确定所述第一服务器组,其中,所述松弛时间为所述执行时间和所述第一阈值的差值;
将所述第一服务器组中每个服务器的频率调整至所述第二频率。
在本发明实施例的另一个实现方式中,所述频率控制模块22,还用于:
当所述N个服务器的总执行时间小于预设的第二阈值时,根据所述总执行时间,以及所述N个服务器中每个服务器的切频代价,确定所述N个服务器中的第二服务器组,其中,所述第二服务器组中的服务器运行在所述第二频率,并将所述第二服务器组中每个服务器的频率调整至所述第一频率;
当所述总执行时间大于预设的第三阈值时,根据所述总执行时间,以及 所述N个服务器中每个服务器的切频代价,确定所述N个服务器中的第三服务器组,其中,所述第三服务器组中的服务器运行在所述第一频率,并将所述第三服务器组的频率调整至所述第二频率。
在本发明实施例的另一个实现方式中,所述频率控制模块22,还用于当所述目标任务在所述N个服务器上执行结束后,将所述第一服务器组中每个服务器的频率调整至所述第一频率。
本发明实施例提供的一种调整服务器的频率的装置,当获取的目标任务在第j个服务器的执行时间大于预设的第一阈值时,根据执行时间确定第j+1至第N个服务器中的第一服务器组,并调整第一服务器组的频率。其中,j为大于0并且小于N的正整数。相比较于现有技术中目标任务在所有服务器上执行完毕之后,频率控制模块统一调整所有服务器的频率。本发明实施例中,可以实时获取目标任务在第j个服务器的执行时间,并根据执行时间确定第一服务器组,并调整第一服务器组的频率。这样可以通过调整第一服务器组的频率,使已经产生长尾的目标任务在后续执行过程中得到一定补偿,也就是通过调整第一服务器组的频率,来减少第一服务器组用于执行目标任务的时间,从而弥补目标任务在当前服务器上产生长尾的时间。因此,降低了执行过程中的目标任务在所有服务器上执行完毕后产生长尾的概率。
本发明实施例提供一种调整服务器的频率的设备30,如图12所示,所述设备30用于调整N个服务器中至少一个服务器的频率,所述N个服务器用于依次串行的执行目标任务,其中,N为大于1的正整数;设备30可包括存储器31、接收器32、处理器33和总线34,其中,存储器31、接收器32、处理器33通过总线34通信连接。
存储器31可以是只读存储器(Read Only Memory,ROM),静态存储设备,动态存储设备或者随机存取存储器(Random Access Memory,RAM)。存储器31可以存储操作系统和其他应用程序。在通过软件或者固件来实现本发明实施例提供的技术方案时,用于实现本发明实施例提供的技术方案的程序代码保存在存储器31中,并由处理器33来执行。
接收器32用于设备30与其他设备或通信网络(例如但不限于以太网,无线接入网(Radio Access Network,RAN),无线局域网(Wireless Local Area Network,WLAN)等)之间的通信。
处理器33可以采用通用的中央处理器(Central Processing Unit,CPU), 微处理器,应用专用集成电路(Application Specific Integrated Circuit,ASIC),或者一个或多个集成电路,用于执行相关程序,以实现本发明实施例所提供的技术方案。
总线34可包括一通路,在装置各个部件(例如存储器31、接收器32和处理器33)之间传送信息。
应注意,尽管图12所示的硬件仅仅示出了存储器31、接收器32和处理器33以及总线34,但是在具体实现过程中,本领域的技术人员应当明白,设备30还包含实现正常运行所必须的其他器件。同时,根据具体需要,本领域的技术人员应当明白,还可包含实现其他功能的硬件器件。
图12所示的设备30用于实现图11所示的装置20时,所述接收器32,用于获取目标任务在第j个服务器的执行时间,其中,j为大于0并且小于N的正整数。
所述处理器33,与所述存储器31和所述接收器32耦合,用于当所述执行时间大于预设的第一阈值时,根据所述执行时间确定第j+1至第N个服务器中的第一服务器组,并调整所述第一服务器组的频率。
在本发明实施例的另一个实现方式中,所述接收器32,具体用于获取所述第j个服务器执行所述目标任务所占用的时间。
在本发明实施例的另一个实现方式中,所述接收器32,具体用于获取所述第j个服务器执行所述目标任务结束后,第1至第j个服务器执行所述目标任务所占用的总执行时间。
在本发明实施例的另一个实现方式中,所述处理器33,具体用于:
分别获取第j+1至第N个服务器的切频代价,其中,切频代价表示在单个服务器运行在第一频率时和所述单个服务器运行在第二频率时,用于执行所述目标任务所需要的时间的差值,所述第二频率的数值大于所述第一频率;
根据所述第j+1至第N个服务器中每个服务器的切频代价和所述执行时间,确定所述第j+1至第N个服务器中的第一服务器组,其中所述第一服务器组中的服务器运行在所述第一频率,并调整所述第一服务器组的工作频率至所述第二频率。
在本发明实施例的另一个实现方式中,所述接收器32,具体用于:
确定所述第j+1至第N个服务器中,从所述第一频率调整至所述第二频率的i个服务器,其中,i为大于0并且小于N-j的正整数;
获取所述i个服务器的切频代价之和;
当所述i个服务器的切频代价之和小于松弛时间时,根据所述松弛时间与所述i个服务器的切频代价之和的差值,从所述第j+1至第N个服务器中确定所述第一服务器组,其中,所述松弛时间为所述执行时间和所述第一阈值的差值;
将所述第一服务器组中每个服务器的频率调整至所述第二频率。
在本发明实施例的另一个实现方式中,所述处理器33,还用于:
当所述N个服务器的总执行时间小于预设的第二阈值时,根据所述总执行时间,以及所述N个服务器中每个服务器的切频代价,确定所述N个服务器中的第二服务器组,其中,所述第二服务器组中的服务器运行在所述第二频率,并将所述第二服务器组中每个服务器的频率调整至所述第一频率;
当所述总执行时间大于预设的第三阈值时,根据所述总执行时间,以及所述N个服务器中每个服务器的切频代价,确定所述N个服务器中的第三服务器组,其中,所述第三服务器组中的服务器运行在所述第一频率,并将所述第三服务器组的频率调整至所述第二频率。
在本发明实施例的另一个实现方式中,所述处理器33,还用于:
当所述目标任务在所述N个服务器上执行结束后,将所述第一服务器组中每个服务器的频率调整至所述第一频率。
本发明实施例提供的一种调整服务器的频率的设备,当获取的目标任务在第j个服务器的执行时间大于预设的第一阈值时,根据执行时间确定第j+1至第N个服务器中的第一服务器组,并调整第一服务器组的频率。其中,j为大于0并且小于N的正整数。相比较于现有技术中目标任务在所有服务器上执行完毕之后,频率控制模块统一调整所有服务器的频率。本发明实施例中,可以实时获取目标任务在第j个服务器的执行时间,并根据执行时间确定第一服务器组,并调整第一服务器组的频率。这样可以通过调整第一服务器组的频率,使已经产生长尾的目标任务在后续执行过程中得到一定补偿,也就是通过调整第一服务器组的频率,来减少第一服务器组用于执行目标任务的时间,从而弥补目标任务在当前服务器上产生长尾的时间。因此,降低了执行过程中的目标任务在所有服务器上执行完毕后产生长尾的概率。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同 之处。尤其,对于设备实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求的保护范围为准。

Claims (14)

  1. 一种调整服务器的频率的方法,其特征在于,所述方法用于调整N个服务器中至少一个服务器的频率,所述N个服务器用于依次串行的执行目标任务,其中,N为大于1的正整数,所述方法包括:
    获取目标任务在第j个服务器的执行时间,其中,j为大于0并且小于N的正整数;
    当所述执行时间大于预设的第一阈值时,根据所述执行时间确定第j+1至第N个服务器中的第一服务器组,并调整所述第一服务器组的频率。
  2. 根据权利要求1所述的方法,其特征在于,所述获取目标任务在第j个服务器的执行时间包括:
    获取所述第j个服务器执行所述目标任务所占用的时间。
  3. 根据权利要求1所述的方法,其特征在于,所述获取目标任务在第j个服务器的执行时间包括:
    获取所述第j个服务器执行所述目标任务结束后,第1至第j个服务器执行所述目标任务所占用的总执行时间。
  4. 根据权利要求1至3中任意一项所述的方法,其特征在于,根据所述执行时间确定第j+1至第N个服务器中的第一服务器组,并调整所述第一服务器组的频率,包括:
    分别获取第j+1至第N个服务器的切频代价,其中,切频代价表示在单个服务器运行在第一频率时和所述单个服务器运行在第二频率时,用于执行所述目标任务所需要的时间的差值,所述第二频率的数值大于所述第一频率;
    根据所述第j+1至第N个服务器中每个服务器的切频代价和所述执行时间,确定所述第j+1至第N个服务器中的第一服务器组,其中所述第一服务器组中的服务器运行在所述第一频率,并调整所述第一服务器组的工作频率至所述第二频率。
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述执行时间确定第j+1至第N个服务器中的第一服务器组,并调整所述第一服务器组的频率,包括:
    确定所述第j+1至第N个服务器中,从所述第一频率调整至所述第二频率的i个服务器,其中,i为大于0并且小于N-j的正整数;
    获取所述i个服务器的切频代价之和;
    当所述i个服务器的切频代价之和小于松弛时间时,根据所述松弛时间与所述i个服务器的切频代价之和的差值,从所述第j+1至第N个服务器中确定所述第一服务器组,其中,所述松弛时间为所述执行时间和所述第一阈值的差值;
    将所述第一服务器组中每个服务器的频率调整至所述第二频率。
  6. 根据权利要求4所述的方法,其特征在于,所述方法还包括:
    当所述N个服务器的总执行时间小于预设的第二阈值时,根据所述总执行时间,以及所述N个服务器中每个服务器的切频代价,确定所述N个服务器中的第二服务器组,其中,所述第二服务器组中的服务器运行在所述第二频率,并将所述第二服务器组中每个服务器的频率调整至所述第一频率;
    当所述总执行时间大于预设的第三阈值时,根据所述总执行时间,以及所述N个服务器中每个服务器的切频代价,确定所述N个服务器中的第三服务器组,其中,所述第三服务器组中的服务器运行在所述第一频率,并将所述第三服务器组的频率调整至所述第二频率。
  7. 根据权利要求4所述的方法,其特征在于,所述方法还包括:
    当所述目标任务在所述N个服务器上执行结束后,将所述第一服务器组中每个服务器的频率调整至所述第一频率。
  8. 一种调整服务器的频率的装置,其特征在于,所述装置用于调整N个服务器中至少一个服务器的频率,所述N个服务器用于依次串行的执行目标任务,其中,N为大于1的正整数,所述装置包括:
    时间统计模块,用于获取目标任务在第j个服务器的执行时间,其中,j为大于0并且小于N的正整数;
    频率控制模块,用于当所述执行时间大于预设的第一阈值时,根据所述时间统计模块获取的所述执行时间确定第j+1至第N个服务器中的第一服务器组,并调整所述第一服务器组的频率。
  9. 根据权利要求8所述的装置,其特征在于,所述时间统计模块,具体用于:
    获取所述第j个服务器执行所述目标任务所占用的时间。
  10. 根据权利要求8所述的装置,其特征在于,所述时间统计模块,具体用于:
    获取所述第j个服务器执行所述目标任务结束后,第1至第j个服务器执行所述目标任务所占用的总执行时间。
  11. 根据权利要求8至10中任意一项所述的装置,其特征在于,所述频率控制模块,具体用于:
    分别获取第j+1至第N个服务器的切频代价,其中,切频代价表示在单个服务器运行在第一频率时和所述单个服务器运行在第二频率时,用于执行所述目标任务所需要的时间的差值,所述第二频率的数值大于所述第一频率;
    根据所述第j+1至第N个服务器中每个服务器的切频代价和所述执行时间,确定所述第j+1至第N个服务器中的第一服务器组,其中所述第一服务器组中的服务器运行在所述第一频率,并调整所述第一服务器组的工作频率至所述第二频率。
  12. 根据权利要求11所述的装置,其特征在于,所述频率控制模块,具体用于:
    确定所述第j+1至第N个服务器中,从所述第一频率调整至所述第二频率的i个服务器,其中,i为大于0并且小于N-j的正整数;
    获取所述i个服务器的切频代价之和;
    当所述i个服务器的切频代价之和小于松弛时间时,根据所述松弛时间与所述i个服务器的切频代价之和的差值,从所述第j+1至第N个服务器中确定所述第一服务器组,其中,所述松弛时间为所述执行时间和所述第一阈值的差值;
    将所述第一服务器组中每个服务器的频率调整至所述第二频率。
  13. 根据权利要求11所述的装置,其特征在于,所述频率控制模块,还用于:
    当所述N个服务器的总执行时间小于预设的第二阈值时,根据所述总执行时间,以及所述N个服务器中每个服务器的切频代价,确定所述N个服务器中的第二服务器组,其中,所述第二服务器组中的服务器运行在所述第二频率,并将所述第二服务器组中每个服务器的频率调整至所述第一频率;
    当所述总执行时间大于预设的第三阈值时,根据所述总执行时间,以及所述N个服务器中每个服务器的切频代价,确定所述N个服务器中的第三服务器组,其中,所述第三服务器组中的服务器运行在所述第一频率,并将所述第三服务器组的频率调整至所述第二频率。
  14. 根据权利要求11所述的装置,其特征在于,所述频率控制模块,还用于当所述目标任务在所述N个服务器上执行结束后,将所述第一服务器组中每个服务器的频率调整至所述第一频率。
PCT/CN2016/073870 2015-06-12 2016-02-16 一种调整服务器的频率的方法及装置 WO2016197621A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510326091.2 2015-06-12
CN201510326091.2A CN106254058B (zh) 2015-06-12 2015-06-12 一种调整服务器的频率的方法及装置

Publications (1)

Publication Number Publication Date
WO2016197621A1 true WO2016197621A1 (zh) 2016-12-15

Family

ID=57504197

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/073870 WO2016197621A1 (zh) 2015-06-12 2016-02-16 一种调整服务器的频率的方法及装置

Country Status (2)

Country Link
CN (1) CN106254058B (zh)
WO (1) WO2016197621A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111078718A (zh) * 2019-12-30 2020-04-28 广州酷狗计算机科技有限公司 频率控制方法、装置、设备以及计算机存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111475297B (zh) * 2018-06-27 2023-04-07 国家超级计算天津中心 一种作业柔性配置方法
US10931542B2 (en) 2018-08-10 2021-02-23 Futurewei Technologies, Inc. Network embedded real time service level objective validation

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130205149A1 (en) * 2012-02-06 2013-08-08 Sony Corporation Apparatus and method for dynamically adjusting frequency of central processing unit
CN104460934A (zh) * 2013-09-13 2015-03-25 华为终端有限公司 多cpu调度方法及装置
CN104679213A (zh) * 2013-11-26 2015-06-03 英业达科技有限公司 服务器及服务器的控制方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7647399B2 (en) * 2005-12-06 2010-01-12 Shunra Software Ltd. System and method for comparing a service level at a remote network location to a service level objective
CN104486129B (zh) * 2014-12-24 2017-11-03 中国科学院计算技术研究所 分布式环境下保障应用服务质量的方法及系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130205149A1 (en) * 2012-02-06 2013-08-08 Sony Corporation Apparatus and method for dynamically adjusting frequency of central processing unit
CN104460934A (zh) * 2013-09-13 2015-03-25 华为终端有限公司 多cpu调度方法及装置
CN104679213A (zh) * 2013-11-26 2015-06-03 英业达科技有限公司 服务器及服务器的控制方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111078718A (zh) * 2019-12-30 2020-04-28 广州酷狗计算机科技有限公司 频率控制方法、装置、设备以及计算机存储介质
CN111078718B (zh) * 2019-12-30 2023-04-07 广州酷狗计算机科技有限公司 频率控制方法、装置、设备以及计算机存储介质

Also Published As

Publication number Publication date
CN106254058A (zh) 2016-12-21
CN106254058B (zh) 2019-06-11

Similar Documents

Publication Publication Date Title
US11758415B2 (en) Method and apparatus of sharing information related to status
KR101770673B1 (ko) 작업부하 밀도를 증가시키고 또한 에너지 효율성을 개선하기 위한 전력 균형화
CN109343904B (zh) 一种基于Lyapunov优化的雾计算动态卸载方法
TWI654563B (zh) Computing resource expansion and release method and device thereof for real-time stream computing
CN105900064A (zh) 调度数据流任务的方法和装置
CN108983946B (zh) 一种服务器功耗控制方法、系统及设备
WO2016197621A1 (zh) 一种调整服务器的频率的方法及装置
CN113033800A (zh) 分布式深度学习方法、装置、参数服务器及主工作节点
CN106464733A (zh) 一种调整云计算中虚拟资源的方法及装置
CN114500578A (zh) 分布式存储系统负载均衡调度方法、装置及存储介质
Safavifar et al. Adaptive workload orchestration in pure edge computing: A reinforcement-learning model
US20070162601A1 (en) Method for autonomic system management using adaptive allocation of resources
JP2010198184A (ja) ジョブ管理システム、その方法及びそのプログラム
WO2018090784A1 (zh) 基于分布式流计算的处理方法、系统、物理设备和存储介质
CN105430083B (zh) 一种云平台部署方法
CN111124439A (zh) 一种云边协同的智能动态卸载算法
TWI584667B (zh) 多請求的排程方法及排程裝置
CN110019313B (zh) 资源优化方法、装置、设备及介质
CN114827142B (zh) 一种确保容器化边缘服务请求实时性的调度方法
Wang et al. Poster: Maintaining training efficiency and accuracy for edge-assisted online federated learning with abs
CN111009926A (zh) 基于云计算的清洁能源消纳方法、装置
US20130166871A1 (en) Memory control method for a computer system
EP3161586B1 (en) Method and system for regulating in real time the clock frequencies of at least one cluster of electronic machines
CN111045815B (zh) 多个处理机的已部署资源的优化方法及其扩展设备
CN115865812A (zh) 拥塞链路处理方法、装置和网络控制器

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16806519

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16806519

Country of ref document: EP

Kind code of ref document: A1