WO2017016499A1 - 分布式数据库负载调平的方法和装置 - Google Patents

分布式数据库负载调平的方法和装置 Download PDF

Info

Publication number
WO2017016499A1
WO2017016499A1 PCT/CN2016/092005 CN2016092005W WO2017016499A1 WO 2017016499 A1 WO2017016499 A1 WO 2017016499A1 CN 2016092005 W CN2016092005 W CN 2016092005W WO 2017016499 A1 WO2017016499 A1 WO 2017016499A1
Authority
WO
WIPO (PCT)
Prior art keywords
load
server
servers
low
data piece
Prior art date
Application number
PCT/CN2016/092005
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 腾讯科技(深圳)有限公司
Priority to KR1020187000181A priority Critical patent/KR102047900B1/ko
Priority to AU2016299084A priority patent/AU2016299084A1/en
Priority to JP2018522846A priority patent/JP6615342B2/ja
Priority to CA2990753A priority patent/CA2990753A1/en
Priority to EP16829864.4A priority patent/EP3331218B1/en
Publication of WO2017016499A1 publication Critical patent/WO2017016499A1/zh
Priority to US15/833,147 priority patent/US10554737B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1029Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers using data related to the state of servers by a load balancer
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • G06F3/0611Improving I/O performance in relation to response time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Definitions

  • the present application relates to the field of Internet technologies, and in particular, to a method and apparatus for load balancing of distributed databases.
  • the distributed database divides the data in the original centralized database into a large number of data pieces, and distributes them to multiple independent data storage nodes, and uses the network to connect the physically dispersed multiple data storage units to form a logically unified database. It uses a scalable system architecture that leverages multiple servers to share storage load, improving system reliability, availability, and access efficiency, and is easy to scale.
  • migration threshold Migration Thresholds
  • the embodiment of the present application provides a method and apparatus for load balancing of a distributed database, which effectively reduces the load of the entire distributed database system.
  • the embodiment of the present application provides a method for load balancing a distributed database, including the following steps:
  • the servers are sorted according to the load from high to low, and the n servers ranked first are used as high load servers, and the n servers ranked lower are used as low load servers, and n is a positive integer;
  • the data pieces in the i-th high-load server are sorted in descending order of the load ratio, and the data pieces in the reverse i-th low-load server are sorted according to the load ratio from high to low.
  • i is a positive integer, i is less than or equal to n;
  • the embodiment of the present application further provides a distributed database load leveling device, which includes a processor and a memory, where the memory stores instructions executable by the processor, where the instructions are used to perform the following operations:
  • the servers are sorted according to the load from high to low, and the n servers ranked first are used as high load servers, and the n servers ranked lower are used as low load servers, and n is a positive integer;
  • the data pieces in the i-th high-load server are sorted in descending order of the load ratio, and the data pieces in the reverse i-th low-load server are sorted according to the load ratio from high to low.
  • i is a positive integer, i is less than or equal to n;
  • the embodiment of the present application further provides a non-volatile storage medium storing computer instructions.
  • the computer instructions When the computer instructions are executed by the processor, the following steps are performed:
  • the servers are sorted according to the load from high to low, and the n servers ranked first are used as high load servers, and the n servers ranked lower are used as low load servers, and n is a positive integer;
  • the data pieces in the i-th high-load server are sorted in descending order of the load ratio, and the data pieces in the reverse i-th low-load server are sorted according to the load ratio from high to low.
  • i is a positive integer, i is less than or equal to n;
  • the distributed database system of the embodiment of the present application sorts the servers according to the load condition of the server, respectively filters out the high load server and the low load server, and lowers the high load ratio data slice and the low load server in the high load server.
  • the data slice offset of the load ratio effectively reduces the load on the high-load server.
  • the low-load server calls up a part of the data slice, it reduces part of the load pressure, and the newly loaded data is empty. A part of the load space is eliminated, which avoids the situation that the load of the low load server is too large due to the high load server transferring the data slice to the low load server, thereby effectively reducing the load of the entire distributed database system.
  • FIG. 1 is a bus diagram of a system in which a distributed database load leveling device is located in an embodiment of the present application;
  • FIG. 2 is a flowchart of a first embodiment of a method for load balancing a distributed database according to the present application
  • FIG. 3 is a flowchart of a second embodiment of a method for load balancing a distributed database according to the present application
  • FIG. 4 is a flowchart of a third embodiment of a method for load balancing a distributed database according to the present application.
  • FIG. 5 is a flowchart of a fourth embodiment of a method for load leveling of a distributed database according to the present application.
  • FIG. 6 is a flowchart of a fifth embodiment of a method for load leveling of a distributed database according to the present application.
  • FIG. 7 is a flowchart of a sixth embodiment of a method for load leveling of a distributed database according to the present application.
  • FIG. 8 is a schematic block diagram of a first embodiment of a device for load leveling of a distributed database according to the present application.
  • FIG. 9 is a schematic block diagram of a second embodiment of an apparatus for load leveling a distributed database according to the present application.
  • the existing method of evenly distributing data slices only considers the capacity of the data slice, and does not consider the load occupied by the data slice. If the data piece being moved is overloaded, when it is moved to another server, the load on other servers will be too large, which will still affect the overall efficiency of the entire distributed database system.
  • FIG. 1 is a bus diagram of a system in which a distributed database load leveling device is located in an embodiment of the present application.
  • the system can include a processor 101, such as a CPU, a network interface 104, a user interface 103, a memory 105, and a communication bus 102.
  • the communication bus 102 is used to implement connection communication between these components.
  • the user interface 103 may include a display, a keyboard, and may also include a standard wired interface and a wireless interface.
  • Network interface 104 may include a standard wired interface, a wireless interface (such as a WIFI interface).
  • the memory 105 may be a high speed RAM memory, or may be a non-volatile memory or a nonvolatile memory such as a magnetic disk memory.
  • the memory 105 can also be a storage device located remotely from the aforementioned processor 101.
  • the memory 105 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a distributed database load leveling program.
  • the network interface 104 is mainly used to connect to a server or a terminal, and performs data communication with the server or the terminal; and the user interface 103 is mainly used to receive user instructions, and The user interacts; and the processor 101 can be used to call the distributed database load leveling program stored in the memory 105 and perform the following operations:
  • the servers are sorted according to the load from high to low, and the n servers ranked first are used as high load servers, and the n servers ranked lower are used as low load servers, and n is a positive integer;
  • the data pieces in the i-th high-load server are sorted in descending order of the load ratio, and the data pieces in the reverse i-th low-load server are sorted according to the load ratio from high to low.
  • i is a positive integer, i is less than or equal to n;
  • the data piece with the load ratio of the i-th high-load server in the order is sorted as the i-th source data piece, and the data piece with the load ratio of the i-th low-load server in the reverse order is sorted as the i-th target data.
  • the slice, the i-th target data piece is swapped with the i-th source data piece.
  • the processor 101 calls the distributed database load leveling program stored in the memory 105 to perform the following operations:
  • the data piece of the jth bit of the load ratio of the i-th high-load server is sequentially selected as the i-th source data piece, wherein j is a positive integer, the initial value of j is 1, and j is less than or equal to the i-th order.
  • Pre-judgement if the i-th target data piece is swapped with the i-th source data piece, whether the total load ratio of the i-th low-load server in the reverse order exceeds a predetermined load ratio threshold;
  • the i-th source data piece is updated to the next data piece of the data slice of the j-th order of the load ratio of the high-load server, and pre-determined if the i-th target data piece and the updated part are After the i source data slices are reversed, whether the total load ratio of the i-th low-load server in the reverse order exceeds a predetermined load ratio threshold until the total load ratio of the i-th low-load server in the reverse order is less than or equal to the predetermined load.
  • the ratio threshold is
  • the processor 101 invoking the distributed database load leveling program stored in the memory 105 can also perform the following operations:
  • the step of sorting the data piece of the last bit of the load ratio of the i-th low-load server in the reverse order as the i-th target data piece is performed.
  • the processor 101 invoking the distributed database load leveling program stored in the memory 105 can also perform the following operations:
  • the next statistical period is used as the current statistical period, and the load of all servers is counted in the current statistical period;
  • the processor 101 calls the distributed database load leveling program stored in the memory 105 to perform the following operations:
  • the servers are sorted according to the CPU load from high to low, and the n1 servers ranked first are used as the first group of high-load servers, and the n1 servers ranked lower are used as the first group of low-load servers, and n1 is smaller than a positive integer of n;
  • the first group of high-load servers and the first group of low-load servers are eliminated from each server, and the remaining servers are sorted according to the traffic load amount from high to low, and the top n2 servers are ranked as the second group of high loads.
  • the processor 101 calls the distributed database load leveling program stored in the memory 105 to perform the following operations:
  • the distributed database load leveling device described in FIG. 1 and the distributed database system thereof are arranged according to the load condition of the server, and the high load server and the low load server are separately filtered, and the high load server is selected.
  • the high-load ratio of the data slice and the low-load server in the low-load server are reversed.
  • the load on the high-load server is effectively reduced.
  • a part of the data is sliced due to the low-load server.
  • a part of the load pressure is reduced, and a part of the load space is vacated for the newly loaded data piece, thereby avoiding the situation that the load of the low load server is too large due to the high load server transferring the data piece to the low load server, thereby effectively reducing the entire load.
  • the load of a distributed database system is arranged according to the load condition of the server, and the high load server and the low load server are separately filtered, and the high load server is selected.
  • FIG. 2 is a flowchart of a first embodiment of a method for load leveling of a distributed database according to the present application.
  • the distributed database load leveling method mentioned in this embodiment includes the following steps:
  • step S10 the load of all servers in the distributed database system and the load ratio of each piece of data in each server are counted in one statistical period.
  • the distributed database system of this embodiment includes a plurality of fragmented servers, each of which is loaded with a plurality of pieces of data.
  • the monitoring and reporting program is deployed on each server in advance, and the data request amount of each data piece and the traffic occupied by the data piece are periodically reported to the statistical database in the distributed database system.
  • the system also obtains the load of each server in the current statistical period from the network management server, for example, CPU load and traffic load.
  • the system obtains the load proportion of the data piece in the load of the server according to the data request quantity, the access traffic, and the like of the data piece reported in the statistical period, and the load quantity of the server where the data piece is located, that is, The ratio of the amount of load that the server brings to the server in the total load of the server when processing the access request for the piece of data.
  • a statistical period can be 24 hours a day, or longer. Taking 24 hours as an example, the monitoring and reporting program can report data every 5 minutes, and there are 288 reports in a piece of data within 24 hours a day. In order to facilitate statistics, 288 reported information points can be combined into one long reporting information chain, and then one data piece only corresponds to one reporting information chain.
  • the system can obtain the load of each server from the network management server at a fixed time every day, for example, 1 o'clock every day.
  • each server is sorted according to the load from high to low, and the n servers ranked first are used as high load servers, and the n servers ranked lower are used as low load servers, and n is positive. Integer.
  • this embodiment reverses the data slice in the high load server with the data slice in the low load server.
  • the system can sort the servers according to the statistics of the server load from high to low.
  • the server with the highest capacity is the highest, and the server with the lowest capacity is the lowest.
  • the first n servers are used as high-load servers, and the last n servers are used as low-load servers.
  • Leveling is to perform data slice swapping in these two sets of servers.
  • Step S30 sorting the data pieces in the order i-th high-load server in descending order of load ratio, and comparing each data piece in the i-th low-load server in reverse order according to the load ratio from high to low. Sort sequentially, i is a positive integer, i has an initial value of 1, and i is less than or equal to n.
  • a high-load server can be paired with a low-load server in advance.
  • each high load server is sorted according to the order of the load from high to low
  • each low load server is also sorted according to the order of the load from high to low.
  • the ith high load server in the high load server queue can be paired with the reverse ith low load server in the low load server queue, for example, the high load server with the largest load is paired with the low load server with the minimum load. Pair the second largest load of high load server with the second small load of low load server, and so on.
  • the order i-th high-load server in the high-load server queue may be paired with the order i-th low-load server in the low-load server queue; or randomly allocated. For each set of paired high-load servers and low-load servers, the server's respective data slices are sorted, and the sorting manner is sorted in descending order of load ratio.
  • Step S40 the data piece with the load ratio of the i-th high-load server in the order is sorted as the i-th source data piece, and the data piece of the i-th low-load server in the reverse order is sorted by the data piece as the i-th. Target data piece.
  • step S50 the i-th target data piece is swapped with the i-th source data piece.
  • the data slice in the high-load server can be moved to the low-load server, and in order to avoid the load of the low-load server being excessively loaded due to excessive load to the low-load server, this embodiment It is possible to move only one or several pieces of data with a relatively high load on a high-load server to a low-load server, and also move a piece of data with a low load on the low-load server to a high-load server, and move between the two servers.
  • the number of data slices is equal, achieving high and low load
  • the data slice between servers is reversed. As a result, the load on the high-load server is effectively reduced.
  • the low-load server transfers a portion of the data slice, a part of the load pressure is reduced, and a part of the load space is vacated for the newly loaded data piece. It effectively avoids the situation that the load of the low load server is too large due to the high load server transferring the data slice to the low load server.
  • Step S60 determining whether all high load servers have been leveled, that is, whether the high load server and the low load server have been traversed (for example, determining whether i is equal to n); if yes, then jumping to step S61; if not, Then, i+1, the process returns to step S30.
  • step S61 it is determined that the leveling is completed, that is, it is determined that the high load server and the low load server have been traversed.
  • the source data piece and the target data piece between the paired paired high and low load servers are completed, the source data piece and the target data piece are continuously adjusted to the next pair of matched servers until the source data pieces of all the paired groups are sliced. The matching with the target data piece is completed, and the leveling procedure is ended.
  • the distributed database system of this embodiment sorts the servers according to the load condition of the server, and filters out the high load server and the low load server respectively, and the high load of the high load server and the low load of the low load server.
  • the data slice is reversed, which effectively reduces the load on the high-load server.
  • the low-load server calls up a part of the data slice, it reduces part of the load pressure and vacates the newly loaded data piece. A part of the load space avoids the situation that the load of the low load server is too large due to the high load server transferring the data slice to the low load server, effectively reducing the load of the entire distributed database system.
  • FIG. 3 is a flowchart of a second embodiment of a method for load leveling of a distributed database according to the present application. This embodiment includes the steps of the embodiment shown in FIG. 2, wherein step S40 includes:
  • step S41 the data piece of the last bit of the load ratio of the i-th low-load server in the reverse order is used as the i-th target data piece.
  • the load of the low-load server at the front end is high, and the load of the low-load server at the back end is low, similarly, for high load.
  • Servers, high-load servers on the front end have higher load, and high-load servers on the back end have lower load.
  • the highest load server can be paired with the lowest load server, the second high load server and the second Low-load server pairing, and so on, that is, the order of the i-th high-load server is paired with the reverse-th i-th low-load server.
  • the target data piece is determined. To significantly reduce the load of the high-load server, the data piece with the lowest load ratio among the low-load servers (that is, the data piece of the last bit of the load ratio) is used as the target data piece.
  • Step S42 the data piece in which the load ratio is sorted by the jth bit in the i-th high-load server is sequentially used as the i-th source data piece.
  • the source data piece is determined in the high load server, but the determined source data piece is not directly reversed with the target data piece, but the pre-judgment is made as to whether the selected source data piece is suitable.
  • the data piece of the jth bit of the load ratio is selected as the source data piece, where j is a positive integer, the initial value of j is 1, and j is less than or equal to the number of pieces of data in the high load server. That is, at the initial stage, the data slice with the highest load ratio is selected from the high load server first. If the data slice is not pre-judged, the load pressure of the entire distributed database system cannot be alleviated, and the load ratio is selected second. The high data piece is used as the original data piece, and then pre-judgment is performed.
  • Step S43 pre-determining whether, if the i-th target data piece is swapped with the i-th source data piece, whether the total load ratio of the i-th low-load server in the reverse order exceeds a predetermined load-to-load ratio threshold; if yes, then j +1, returning to step S42; if not, executing step S50.
  • the target data piece is swapped with the source data piece, the total load ratio of the original load in the low-load server is reduced by the load ratio of the target data piece, and the load ratio of the source data piece is relatively new.
  • the calculated total load ratio of the low load server exceeds a predetermined load percentage threshold. If yes, it means that the source data piece selected this time is not suitable. After the adjustment, the load of the low load server will be too high. In this case, the new source data piece needs to be re-selected, and the source data piece is updated to the load of the high load server. Sort the next piece of data and re-predict it.
  • the low load server brings too high load. If so, the new source data piece is reselected and the pre-judgment is re-predicted until the selected source data piece is swapped with the target data piece without causing the low load server to be overloaded. While reducing the load on the high-load server, it also ensures the normal load of the low-load server and ensures the effective operation of the entire distributed database system.
  • FIG. 4 is a flowchart of a third embodiment of a method for load leveling of a distributed database according to the present application.
  • the embodiment includes the steps of the embodiment shown in FIG. 3, and further includes: before step S41:
  • step S44 it is determined whether the load proportion of the data slice in which the first order of the load is ranked in the i-th high-load server is greater than a predetermined load ratio threshold; if yes, step S45 is performed; if not, step S41 is performed. .
  • step S45 the data slice in the i-th high-load server in the order is rejected.
  • the load ratio of the data slice in the high-load server is too high. If the data fragment with too high load ratio is transferred to the low-load server, the load on the low-load server will be too large. The next low-load server will be used as the high-load server in the next leveling, and the load will be re-used. High data slices are recalled, causing duplicate transfer of data slices. At this time, in order to avoid the repeated transfer operation, the high load server including the excessive load ratio data piece is temporarily not processed, and the other measures are taken or the process is switched to the manual process. In addition, for low-load servers paired with unprocessed high-load servers, they can be re-paired with other high-load servers, or they can be reserved for pairing the next time they are leveled.
  • FIG. 5 is a flowchart of a fourth embodiment of a method for load balancing a distributed database according to the present application. This embodiment includes the steps of the embodiment shown in FIG. 2, and after step S61, the method further includes:
  • Step S71 using the next statistical period as the current statistical period, and counting the load of all servers in the current statistical period;
  • Step S72 sorting the servers according to the order of the load from high to low, and using the n servers ranked first as the high load server of the current statistical period;
  • Step S73 determining whether the n high load servers of the current statistical period are the same as the n high load servers of the previous statistical period; if yes, executing step S74; if not, returning to step S10;
  • step S74 the predetermined load ratio threshold is increased, and the process returns to step S10.
  • This embodiment also judges whether the leveling strategy is reasonable, and calculates the load condition of each server during the next cycle, and determines whether the load of each server is improved after the previous leveling. For example, at 1 am on the 7th, statistics on the server load on the 6th from 1 am to 1 am on the 6th, and the first time to level it, the system continues to run, at 1 am on the 8th, the statistics on the 7th The server load situation from 1 am to 1 am in the morning, and analyze whether the result of the first leveling on the 7th is reasonable. If it is reasonable, continue to use the leveling strategy for the second leveling. Otherwise, adjust the leveling. Strategy and adopt a new leveling strategy for the second leveling. In the statistical data, the high load server is still filtered according to the server load.
  • the leveling strategy needs to be adjusted, for example, increasing the predetermined load ratio threshold, and selecting a larger data slice from the high load server as the source data piece, so that more load ratio in the high load server is shifted to lower. In the load server, ensure the effectiveness of the leveling strategy.
  • FIG. 6 is a flowchart of a fifth embodiment of a method for load leveling of a distributed database according to the present application. This embodiment includes the steps of the embodiment shown in FIG. 2, wherein step S20 includes:
  • each server is sorted according to the CPU load from high to low, and the n1 servers ranked first are used as the first group of high load servers, and the n1 servers ranked lower are used as the first group of low load servers.
  • N1 is a positive integer less than n;
  • Step S22 the first group of high-load servers and the first group of low-load servers are eliminated from each server, and the remaining servers are sorted according to the traffic load amount from high to low, and the n2 servers ranked first are used as the second.
  • a group of high-load servers, which ranks the next n2 servers as the second group of low-load servers, n2 is a positive integer less than n, and n1+n2 n.
  • the CPU load amount and the traffic load amount can be sorted in two aspects, and the CPU load amount and the traffic load amount priority can be preset.
  • the CPU load priority is higher than the traffic load priority.
  • the server follows the traffic load from high to low. Sort the order to filter out the second set of high load servers and the second set of low load servers.
  • the first set of high load servers are paired with the first set of low load servers
  • the second set of high load servers are paired with the second set of low load servers one by one.
  • the data piece When the data piece is exchanged, it is also exchanged between the first group of high-load servers and the first group of low-load servers, and between the second group of high-load servers and the second group of low-load servers. Since the embodiment separately filters the servers that need to exchange data slices from the CPU load and the traffic load, respectively, the data slice exchange is more targeted, and the leveling strategy is further more effective, which is beneficial to reducing the entire distributed database system. load.
  • FIG. 7 is a flowchart of a sixth embodiment of a method for load leveling of a distributed database according to the present application. This embodiment includes the steps of the embodiment shown in FIG. 2, wherein step S50 includes:
  • Step S51 obtaining an idle server from the distributed database system
  • Step S52 transferring the i-th source data piece from the sequential i-th high load server to the idle server;
  • Step S53 the i-th target data piece is transferred from the reverse i-th low load server to the sequentially i-th high load server;
  • step S54 the i-th source data piece that has been transferred to the idle server is transferred to the reverse th-th low-load server.
  • the load of the low-load server is high, which affects the data slice transfer efficiency. Therefore, in the distributed database system, a part of idle resources, that is, idle servers, are reserved, and the source data pieces are first transferred from the high-load server to the idle server, and then the target data piece is removed from the low-load server, and then the source is used. The data slice is transferred to the target data piece.
  • the low-load server is already idle, you can directly transfer the source data slice from the high-load server to the low-load server, and then transfer the target data slice from the low-load server to the high-load server. It can be pre-determined whether the low-load server is idle, if it is, it is directly exchanged, and if not, it is transferred through the idle server. In this way, it is beneficial to improve the efficiency of data slice transfer and ensure efficient load leveling.
  • FIG. 8 is a schematic block diagram of a first embodiment of a device for load leveling of a distributed database according to the present application.
  • the distributed database load leveling device proposed in this embodiment includes:
  • the statistics module 10 is configured to count the load of all servers in the distributed database system and the load ratio of each piece of data in each server in a statistical period;
  • the sorting module 20 is configured to sort each server according to the load from high to low, and use the n servers that are ranked first as the high load server, and the n servers that are ranked lower as the low load server, where n is a positive integer. Sorting each piece of data in the i-th high-load server in order from highest to lowest, and sorting each piece of data in the reverse i-th low-load server in descending order of load ratio , i is a positive integer, the initial value of i is 1, and i is less than or equal to n;
  • the adjusting module 30 is configured to sort the data piece with the load ratio of the i-th high-load server in the order as the i-th source data piece, and sort the data pieces of the load ratio of the i-th low-load server in the reverse order.
  • the i-th target data piece As the i-th target data piece, the i-th target data piece is swapped with the i-th source data piece; according to this cycle, all the high-load servers are traversed, that is, all the high-load servers and low-load servers are traversed.
  • the distributed database system of this embodiment includes a plurality of fragmented servers, each of which is loaded with a plurality of pieces of data.
  • the monitoring and reporting program is deployed on each server in advance, and the data request amount of each data piece and the traffic occupied by the data piece are periodically reported to the statistical database in the distributed database system.
  • the system also obtains the load of each server in the current statistical period from the network management server, for example, CPU load and traffic load.
  • the system obtains the load proportion of the data piece in the load of the server according to the data request quantity, the access traffic, and the like of the data piece reported in the statistical period, and the load quantity of the server where the data piece is located, that is, The ratio of the amount of load that the server brings to the server in the total load of the server when processing the access request for the piece of data.
  • a statistical period can be 24 hours a day, or longer. Taking 24 hours as an example, the monitoring and reporting program can report data every 5 minutes, and there are 288 reports in a piece of data within 24 hours a day. In order to facilitate statistics, 288 reported information points can be combined into one long reporting information chain, and then one data piece only corresponds to one reporting information chain.
  • the system can obtain the load of each server from the network management server at a fixed time every day, for example, 1 o'clock every day.
  • this embodiment reverses the data slice in the high load server with the data slice in the low load server.
  • the system can sort the servers according to the statistics of the server load from high to low.
  • the server with the highest capacity is the highest, and the server with the lowest capacity is the lowest.
  • the first n servers are used as high-load servers, and the last n servers are used as low-load servers. Data slice swapping is performed in these two sets of servers.
  • a high-load server can be paired with a low-load server in advance.
  • each high load server is sorted according to the order of the load from high to low
  • each low load server is also sorted according to the order of the load from high to low.
  • the ith high load server in the high load server queue can be paired with the reverse ith low load server in the low load server queue, for example, the high load server with the largest load is paired with the low load server with the minimum load. Pair the second largest load of high load server with the second small load of low load server, and so on.
  • the order i-th high-load server in the high-load server queue may be paired with the order i-th low-load server in the low-load server queue; or randomly allocated. For each set of paired high-load servers and low-load servers, the server's respective data slices are sorted, and the sorting manner is sorted in descending order of load ratio.
  • the data slice in the high-load server can be moved to the low-load server, and in order to avoid the load of the low-load server being excessively loaded due to excessive load to the low-load server, this embodiment It is possible to move only one or several pieces of data with a relatively high load on a high-load server to a low-load server, and also move a piece of data with a low load on the low-load server to a high-load server, and move between the two servers. The number of data slices is equal, and the data slice between the high and low load servers is reversed. As a result, the load on the high-load server is effectively reduced.
  • the low-load server transfers a portion of the data slice, a part of the load pressure is reduced, and a part of the load space is vacated for the newly loaded data piece. It effectively avoids the situation that the load of the low load server is too large due to the high load server transferring the data slice to the low load server.
  • the source data piece and the target data piece between the paired paired high and low load servers are completed, the source data piece and the target data piece are continuously adjusted to the next pair of matched servers until the source data pieces of all the paired groups are sliced. The matching with the target data piece is completed, and the leveling procedure is ended.
  • the fabric database system of this embodiment sorts the servers according to the load condition of the server, and filters out the high load server and the low load server respectively, and the high load ratio data piece in the high load server and the low load in the low load server.
  • the data slice is reversed, which effectively reduces the load on the high-load server.
  • the low-load server calls up a part of the data slice, it reduces part of the load pressure and vacates the newly loaded data piece. Part of the load space, avoiding high negatives
  • the load server transfers the data slice to the low-load server, causing the load of the low-load server to be too large, effectively reducing the load on the entire distributed database system.
  • FIG. 9 is a schematic block diagram of a second embodiment of a device for load leveling of a distributed database according to the present application.
  • the embodiment includes the module of the embodiment shown in FIG. 8, and further includes a determining module 40;
  • the adjustment module 30 is further configured to: sort the data piece of the last bit of the load ratio of the i-th low-load server in the reverse order as the i-th target data piece; sort the load proportion of the i-th high-load server in the order of the jth bit
  • the data slice is the i-th source data piece, wherein j is a positive integer, the initial value of j is 1, and j is less than or equal to the number of data slices in the i-th high-load server;
  • the determining module 40 is configured to: pre-determine, if the i-th target data piece is swapped with the ith source data piece, whether the total load proportion of the i-th low-load server in the reverse order exceeds a predetermined load ratio threshold;
  • the adjusting module 30 is further configured to: when the determining module 40 determines that the total load ratio of the ith low load server in the reverse order exceeds a predetermined load ratio threshold, update the ith source data piece to a load ratio of the high load server. Sorting the next piece of data of the j-th data slice;
  • the determining module 40 is further configured to: pre-judge whether, if the i-th target data piece is swapped with the updated i-th source data piece, whether the total load ratio of the i-th low-load server in the reverse order exceeds a predetermined load ratio Threshold; according to this cycle, until the total load ratio of the i-th low load server in the reverse order is less than or equal to a predetermined load ratio threshold.
  • the load of the low-load server at the front end is high, and the load of the low-load server at the back end is low, similarly, for high load.
  • Servers, high-load servers on the front end have higher load, and high-load servers on the back end have lower load.
  • the highest load server can be paired with the lowest load server, the second high load server is paired with the second low load server, and so on, ie, the order The i high load servers are paired with the reverse ith low load server.
  • the high and low load servers in a paired group in this embodiment, only one data slice in the high load server is swapped with one data slice in the low load server.
  • multiple data can be adjusted, and a pair of data can be adjusted and adjusted.
  • the slice is derived in the same way. Identify the target piece of data in the low load server, In order to significantly reduce the load on the high-load server, the data slice with the lowest load ratio among the low-load servers (that is, the data slice with the last bit of the load ratio) is taken as the target data piece.
  • the source data piece is determined in the high load server, but the determined source data piece is not directly reversed with the target data piece, but the pre-judgment is made as to whether the selected source data piece is suitable.
  • the data piece of the jth bit of the load ratio is selected as the source data piece, where j is a positive integer, the initial value of j is 1, and j is less than or equal to the number of pieces of data in the high load server. That is, at the initial stage, the data slice with the highest load ratio is selected from the high load server first. If the data slice is not pre-judged, the load pressure of the entire distributed database system cannot be alleviated, and the load ratio is selected second. The high data piece is used as the original data piece, and then pre-judgment is performed.
  • the target data piece is swapped with the source data piece, the total load ratio of the original load in the low-load server is reduced by the load ratio of the target data piece, and the load ratio of the source data piece is relatively new.
  • the calculated total load ratio of the low load server exceeds a predetermined load percentage threshold. If yes, it means that the source data piece selected this time is not suitable. After the adjustment, the load of the low load server will be too high. In this case, the new source data piece needs to be re-selected, and the source data piece is updated to the load of the high load server. Sort the next piece of data and re-predict it.
  • the new source data piece is re-selected, and the pre-judgment is performed again.
  • the selected source data piece does not cause low load server load after being swapped with the target data piece.
  • the determining module 40 is further configured to: determine whether the load proportion of the data slice in which the load ratio is ranked first in the i-th high-load server in the order is greater than a predetermined load ratio threshold;
  • the adjustment module 30 is further configured to reject the data slice in the i-th high-load server in the order of replacement;
  • the adjustment module 30 is further configured to sort the data piece of the last bit of the load ratio of the i-th low-load server in the reverse order as the i-th target data piece.
  • the load ratio of the data slice in the high-load server is too high. If the data fragment with too high load ratio is transferred to the low-load server, the load on the low-load server will be too large. The next low-load server will be used as the high-load server in the next leveling, and the load will be re-used. High data slices are recalled, causing duplicate transfer of data slices. At this time, in order to avoid the repeated transfer operation, the high load server including the excessive load ratio data piece is temporarily not processed, and the other measures are taken or the process is switched to the manual process. In addition, for low-load servers paired with unprocessed high-load servers, they can be re-paired with other high-load servers, or they can be reserved for pairing the next time they are leveled.
  • statistic module 10 is further configured to: use the next statistical period as the current statistical period, and count the load of all servers in the current statistical period;
  • the sorting module 20 is further configured to sort each server according to a load from high to low, and use the top n servers to be the high load server of the current statistical period;
  • the determining module 40 is configured to determine whether the n high load servers of the current statistical period are the same as the n high load servers of the previous statistical period;
  • the adjustment module 30 is further configured to increase the predetermined load occupancy threshold and re-level all of the high load servers during the current statistical period. That is, the high load server and the low load server are traversed again, and the corresponding operations are performed.
  • This embodiment also judges whether the leveling strategy is reasonable, and calculates the load condition of each server during the next cycle, and determines whether the load of each server is improved after the previous leveling. For example, at 1 am on the 7th, statistics on the server load on the 6th from 1 am to 1 am on the 6th, and the first time to level it, the system continues to run, at 1 am on the 8th, the statistics on the 7th The server load situation from 1 am to 1 am in the morning, and analyze whether the result of the first leveling on the 7th is reasonable. If it is reasonable, continue to use the leveling strategy for the second leveling. Otherwise, adjust the leveling. Strategy and adopt a new leveling strategy for the second leveling. In the statistical data, the high load server is still filtered according to the server load.
  • the leveling strategy is invalid. At this point, you need to adjust the leveling strategy, such as increasing the predetermined load percentage threshold, and selecting negative from the high load server.
  • the larger data piece is used as the source data piece, so that more load ratio in the high-load server is transferred to the low-load server, ensuring the effectiveness of the leveling strategy.
  • the sorting module 20 is configured to:
  • the servers are sorted according to the CPU load from high to low, and the n1 servers ranked first are used as the first group of high-load servers, and the n1 servers ranked lower are used as the first group of low-load servers, and n1 is smaller than a positive integer of n;
  • the first group of high-load servers and the first group of low-load servers are eliminated from each server, and the remaining servers are sorted according to the traffic load amount from high to low, and the top n2 servers are ranked as the second group of high loads.
  • the CPU load amount and the traffic load amount can be sorted in two aspects, and the CPU load amount and the traffic load amount priority can be preset.
  • the CPU load priority is higher than the traffic load priority.
  • the servers are sorted in order of high and low traffic load, filtering out the second set of high load servers and the second set of low load servers.
  • the first set of high load servers are paired with the first set of low load servers
  • the second set of high load servers are paired with the second set of low load servers one by one.
  • the data piece When the data piece is exchanged, it is also exchanged between the first group of high-load servers and the first group of low-load servers, and between the second group of high-load servers and the second group of low-load servers. Since the embodiment separately filters the servers that need to exchange data slices from the CPU load and the traffic load, respectively, the data slice exchange is more targeted, and the leveling strategy is further more effective, which is beneficial to reducing the entire distributed database system. load.
  • the adjustment module 30 is configured to:
  • the load of the low-load server is high, which affects the data slice transfer efficiency. Therefore, in the distributed database system, a part of idle resources, that is, idle servers, are reserved, and the source data pieces are first transferred from the high-load server to the idle server, and then the target data piece is removed from the low-load server, and then the source is used. The data slice is transferred to the target data piece.
  • the low-load server is already idle, you can directly transfer the source data slice from the high-load server to the low-load server, and then transfer the target data slice from the low-load server to the high-load server. It can be pre-determined whether the low-load server is idle, if it is, it is directly exchanged, and if not, it is transferred through the idle server. In this way, it is beneficial to improve the efficiency of data slice transfer and ensure efficient load leveling.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better.
  • Implementation Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer And Data Communications (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请公开了一种分布式数据库负载调平的方法,包括:统计分布式数据库系统中所有服务器的负载量和每一个服务器中每一个数据片的负载占比;将负载量排序排序靠前的n个服务器作为高负载服务器,将负载量排序排序靠后的n个服务器作为低负载服务器;将高负载服务器中负载占比排序在前的数据片作为源数据片,将低负载服务器中负载占比排序在后的数据片作为目标数据片,将目标数据片与源数据片对调。本申请还公开了一种分布式数据库负载调平的装置。

Description

分布式数据库负载调平的方法和装置
本申请要求于2015年7月29日提交中国专利局、申请号为201510456585.2、发明名称为“分布式数据库负载调平的方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及到互联网技术领域,特别涉及到分布式数据库负载调平的方法和装置。
背景技术
近年来,随着数据量的高速增长,分布式数据库技术也得到了快速的发展。分布式数据库将原来集中式数据库中的数据分割成大量数据片,分散存储到多个独立的数据存储节点上,利用网络将物理上分散的多个数据存储单元连接起来,组成一个逻辑上统一的数据库。它采用可扩展的系统结构,利用多台服务器分担存储负荷,不但提高了系统的可靠性、可用性和存取效率,还易于扩展。为了维护数据片的均衡分布,当一台服务器上的数据片数量在整个分布式数据库系统中的分布达到移动阈值(Migration Thresholds)时,就需要将数目最多的服务器上的数据片移动到数目比较少的服务器上。例如,数据集合在服务器A上有100个数据片,在服务器B上有50个数据片,就需将服务器A上的数据片移动到服务器B上,直至数据集合在两台服务器上的数据片数量接近或相等。
发明内容
本申请实施例提供一种分布式数据库负载调平的方法和装置,有效降低整个分布式数据库系统的负荷。
本申请实施例提出一种分布式数据库负载调平的方法,包括步骤:
在一个统计周期内统计分布式数据库系统中服务器的负载量和每一个所述服务器中的每一个数据片的负载占比;
将各服务器按照负载量从高到低的顺序排序,将排序靠前的n个服务器作为高负载服务器,将排序靠后的n个服务器作为低负载服务器,n为正整数;
遍历所述高负载服务器和所述低负载服务器,执行相应的操作,包括:
将顺序第i个高负载服务器中的各数据片按照负载占比从高到低的顺序排序,将倒序第i个低负载服务器中的各数据片按照负载占比从高到低的顺序排序,i为正整数,i小于等于n;
将顺序第i个所述高负载服务器中负载占比排序在前的数据片作为第i个源数据片,将倒序第i个所述低负载服务器中负载占比排序在后的数据片作为第i个目标数据片,将第i个所述目标数据片与第i个所述源数据片对调。
本申请实施例还提出一种分布式数据库负载调平的装置,其包括处理器和存储器,所述存储器中存储有可被所述处理器执行的指令,所述指令用于执行以下操作:
在一个统计周期内统计系统中服务器的负载量和每一个所述服务器中的每一个数据片的负载占比;
将各服务器按照负载量从高到低的顺序排序,将排序靠前的n个服务器作为高负载服务器,将排序靠后的n个服务器作为低负载服务器,n为正整数;
遍历所述高负载服务器和所述低负载服务器,执行相应的操作,包括:
将顺序第i个高负载服务器中的各数据片按照负载占比从高到低的顺序排序,将倒序第i个低负载服务器中的各数据片按照负载占比从高到低的顺序排序,i为正整数,i小于等于n;
将顺序第i个所述高负载服务器中负载占比排序在前的数据片作为第i个源数据片,将倒序第i个所述低负载服务器中负载占比排序在后的数据片作为第i个目标数据片,将第i个所述目标数据片与第i个所述源数据片对调。
本申请实施例还提出一种非易失性存储介质,存储有计算机指令,该计算机指令由处理器执行时执行以下步骤:
在一个统计周期内统计分布式数据库系统中所有服务器的负载量和每一个 所述服务器中的每一个数据片的负载占比;
将各服务器按照负载量从高到低的顺序排序,将排序靠前的n个服务器作为高负载服务器,将排序靠后的n个服务器作为低负载服务器,n为正整数;
遍历所述高负载服务器和所述低负载服务器,执行相应的操作,包括:
将顺序第i个高负载服务器中的各数据片按照负载占比从高到低的顺序排序,将倒序第i个低负载服务器中的各数据片按照负载占比从高到低的顺序排序,i为正整数,i小于等于n;
将顺序第i个所述高负载服务器中负载占比排序在前的数据片作为第i个源数据片,将倒序第i个所述低负载服务器中负载占比排序在后的数据片作为第i个目标数据片,将第i个所述目标数据片与第i个所述源数据片对调。
本申请实施例的分布式数据库系统根据服务器的负载情况对服务器排序,分别筛选出高负载服务器和低负载服务器,并将高负载服务器中的高负载占比的数据片与低负载服务器中的低负载占比的数据片对调,一方面有效降低了高负载服务器中的负载量,另一方面,由于低负载服务器将一部分数据片调出,减少了一部分负载压力,为新调入的数据片空出了一部分的负载空间,避免了因高负载服务器将数据片调入低负载服务器造成低负载服务器负荷过大的情况,有效降低整个分布式数据库系统的负荷。
附图简要说明
图1为本申请实施例中分布式数据库负载调平的装置所在系统的总线图;
图2为本申请分布式数据库负载调平的方法的第一实施例的流程图;
图3为本申请分布式数据库负载调平的方法的第二实施例的流程图;
图4为本申请分布式数据库负载调平的方法的第三实施例的流程图;
图5为本申请分布式数据库负载调平的方法的第四实施例的流程图;
图6为本申请分布式数据库负载调平的方法的第五实施例的流程图;
图7为本申请分布式数据库负载调平的方法的第六实施例的流程图;
图8为本申请分布式数据库负载调平的装置的第一实施例的模块示意图;
图9为本申请分布式数据库负载调平的装置的第二实施例的模块示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
实施本发明的方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
现有的使数据片均衡分布的方式只考虑到数据片的容量大小,没有考虑数据片占用的负载。而如果被移动的数据片占用负载过高,当将它移动到其他服务器后,会造成其他服务器的负荷过大,仍然会影响到整个分布式数据库系统的总体效率。
参照图1,图1为本申请实施例中分布式数据库负载调平的装置所在系统的总线图。该系统可以包括:处理器101,例如CPU,网络接口104,用户接口103,存储器105,通信总线102。其中,通信总线102用于实现这些组件之间的连接通信。其中,用户接口103可以包括显示屏(Display)、键盘(Keyboard),还可以包括标准的有线接口、无线接口。网络接口104可以包括标准的有线接口、无线接口(如WIFI接口)。存储器105可以是高速RAM存储器,也可以是非不稳定的存储器(non-volatile memory)或非易失性存储器,例如磁盘存储器。存储器105还可以是位于远离前述处理器101的存储装置。作为一种计算机存储介质的存储器105中可以包括操作系统、网络通信模块、用户接口模块以及分布式数据库负载调平程序。
在图1所示的分布式数据库负载调平的装置所在系统中,网络接口104主要用于连接服务器或终端,与服务器或终端进行数据通信;而用户接口103主要用于接收用户指令,并与用户进行交互;而处理器101可以用于调用存储器105中存储的分布式数据库负载调平程序,并执行以下操作:
在一个统计周期内统计分布式数据库系统中所有服务器的负载量和每一个服务器中的每一个数据片的负载占比;
将各服务器按照负载量从高到低的顺序排序,将排序靠前的n个服务器作为高负载服务器,将排序靠后的n个服务器作为低负载服务器,n为正整数;
遍历所述高负载服务器和所述低负载服务器,执行相应的操作,包括:
将顺序第i个高负载服务器中的各数据片按照负载占比从高到低的顺序排序,将倒序第i个低负载服务器中的各数据片按照负载占比从高到低的顺序排序,i为正整数,i小于等于n;
将顺序第i个高负载服务器中负载占比排序在前的数据片作为第i个源数据片,将倒序第i个低负载服务器中负载占比排序在后的数据片作为第i个目标数据片,将第i个目标数据片与第i个源数据片对调。
在一个实施例中,处理器101调用存储器105中存储的分布式数据库负载调平程序可以执行以下操作:
将倒序第i个低负载服务器中负载占比排序最后一位的数据片作为第i个目标数据片;
将顺序第i个高负载服务器中负载占比排序第j位的数据片作为第i个源数据片,其中,j为正整数,j的初始值为1,j小于等于顺序第i个所述高负载服务器中的数据片的个数;
预判断如果将第i个目标数据片与第i个源数据片对调后,倒序第i个低负载服务器的总的负载占比是否超过预定的负载占比阈值;
如果是,则将第i个源数据片更新为高负载服务器中负载占比排序第j位的数据片的下一位数据片,并预判断如果将第i个目标数据片与更新后的第i个源数据片对调后,倒序第i个低负载服务器的总的负载占比是否超过预定的负载占比阈值,直至倒序第i个低负载服务器的总的负载占比小于或等于预定的负载占比阈值。
在一个实施例中,处理器101调用存储器105中存储的分布式数据库负载调平程序还可以执行以下操作:
判断顺序第i个高负载服务器中负载占比排序第一位的数据片的负载占比是否超过预定的负载占比阈值;
如果是,则拒绝调换顺序第i个高负载服务器中的数据片;
如果否,则执行将倒序第i个低负载服务器中负载占比排序最后一位的数据片作为第i个目标数据片的步骤。
在一个实施例中,处理器101调用存储器105中存储的分布式数据库负载调平程序还可以执行以下操作:
将下一个统计周期作为当前统计周期,在当前统计周期内统计所有服务器的负载量;
将各服务器按照负载量从高到低的顺序排序,将排序靠前的n个服务器作为当前统计周期的高负载服务器;
判断当前统计周期的n个高负载服务器是否与前一个统计周期的n个高负载服务器相同;
如果是,则增大预定的负载占比阈值,在当前统计周期内,重新调平所有高负载服务器。即,重新遍历所述高负载服务器和所述低负载服务器,执行所述相应的操作。
在一个实施例中,处理器101调用存储器105中存储的分布式数据库负载调平程序可以执行以下操作:
将各服务器按照CPU负载量从高到低的顺序排序,将排序靠前的n1个服务器作为第一组高负载服务器,将排序靠后的n1个服务器作为第一组低负载服务器,n1为小于n的正整数;
在各服务器中剔除第一组高负载服务器和第一组低负载服务器,将剩下的服务器按照流量负载量从高到低的顺序排序,将排序靠前的n2个服务器作为第二组高负载服务器,将排序靠后的n2个服务器作为第二组低负载服务器,n2为小于n的正整数,且n1+n2=n。
在一个实施例中,处理器101调用存储器105中存储的分布式数据库负载调平程序可以执行以下操作:
从分布式数据库系统中获取空闲服务器;
将第i个源数据片从顺序第i个高负载服务器转移到空闲服务器中;
将第i个目标数据片从倒序第i个低负载服务器转移到顺序第i个高负载服务器中;
将已转移到空闲服务器上的第i个源数据片转移到倒序第i个低负载服务器中。
本实施例图1所描述的分布式数据库负载调平的装置及其所在的分布式数据库系统,根据服务器的负载情况对服务器排序,分别筛选出高负载服务器和低负载服务器,并将高负载服务器中的高负载占比的数据片与低负载服务器中的低负载占比的数据片对调,一方面有效降低了高负载服务器中的负载量,另一方面,由于低负载服务器将一部分数据片调出,减少了一部分负载压力,为新调入的数据片空出了一部分的负载空间,避免了因高负载服务器将数据片调入低负载服务器造成低负载服务器负荷过大的情况,有效降低整个分布式数据库系统的负荷。
如图2所示,图2为本申请分布式数据库负载调平的方法的第一实施例的流程图。本实施例提到的分布式数据库负载调平的方法,包括步骤:
步骤S10,在一个统计周期内统计分布式数据库系统中所有服务器的负载量和每一个服务器中的每一个数据片的负载占比。
本实施例的分布式数据库系统中包括多个分片的服务器,每个服务器上加载有多个数据片。预先在每个服务器上部署监控上报程序,定时将每个数据片的数据请求量、数据片访问时所占的流量等信息上报到分布式数据库系统中的统计库中。同时,系统还从网管服务器获得当前统计周期内各服务器的负载量,例如,CPU负载量和流量负载量。系统根据当统计周期内上报的某一个数据片的数据请求量、访问流量等信息,以及该数据片所在的服务器的负载量,获得该数据片在该服务器的负载量中的负载占比,即服务器处理该数据片的访问请求时为服务器带来的负载量在该服务器的总的负载量中的比例。一个统计周期可以是一天24小时,或更长时间段。以24小时为例,监控上报程序可每隔5分钟上报一次数据,则一天24小时内一个数据片就有288个上报信息。为了便于统计,可将288个上报信息点合成一个长的上报信息链,那么一个数据片就只对应一个上报信息链。同时,系统可在每一天的固定时刻从网管服务器获得各服务器的负载量,例如每天的凌晨1点钟。
步骤S20,将各服务器按照负载量从高到低的顺序排序,将排序靠前的n个服务器作为高负载服务器,将排序靠后的n个服务器作为低负载服务器,n为正 整数。
为了实现负载调平,本实施例将高负载服务器中的数据片与低负载服务器中的数据片对调。系统可根据统计的服务器负载量从高到低的顺序对各服务器依次排序,排在最前端的服务器负载量最高,排在最后端的服务器负载量最低。将前n个服务器作为高负载服务器,后n个服务器作为低负载服务器,调平就是在这两组服务器中进行数据片对调。
步骤S30,将顺序第i个高负载服务器中的各数据片按照负载占比从高到低的顺序排序,将倒序第i个低负载服务器中的各数据片按照负载占比从高到低的顺序排序,i为正整数,i的初始值为1,i小于等于n。
可预先将一个高负载服务器与一个低负载服务器配对成一组。本实施例中,各高负载服务器按照负载量从高到低的顺序排序,各低负载服务器也按照负载量从高到低的顺序排序。可将高负载服务器队列中顺序第i个高负载服务器与低负载服务器队列中倒序第i个低负载服务器配对成一组,例如将最大负载量的高负载服务器与最小负载量的低负载服务器配对,将第二大负载量的高负载服务器与第二小负载量的低负载服务器配对,以此类推。或者可将高负载服务器队列中顺序第i个高负载服务器与低负载服务器队列中顺序第i个低负载服务器配对成一组;或者随机分配。对于每一组配对的高负载服务器与低负载服务器,都对服务器各自的数据片进行排序,排序方式按照负载占比从高到低的顺序排序。
步骤S40,将顺序第i个高负载服务器中负载占比排序在前的数据片作为第i个源数据片,将倒序第i个低负载服务器中负载占比排序在后的数据片作为第i个目标数据片。
步骤S50,将第i个目标数据片与第i个源数据片对调。
为了降低高负载服务器的负载量,可将高负载服务器中的数据片移动到低负载服务器中,而为了避免因过多负荷加载到低负载服务器造成低负载服务器的负载量过大,本实施例可只将高负载服务器中负载占比较高的一个或几个数据片移动到低负载服务器中,同时还将低负载服务器中负载占比较低的数据片移动到高负载服务器中,两个服务器中移动的数据片个数相等,实现高低负载 服务器之间的数据片对调。如此一来,高负载服务器中的负载量得到了有效降低,同时,由于低负载服务器将一部分数据片调出,减少了一部分负载压力,为新调入的数据片空出了一部分的负载空间,有效避免了因高负载服务器将数据片调入低负载服务器造成低负载服务器负荷过大的情况。
步骤S60,判断是否已调平所有高负载服务器,即是否已遍历所述高负载服务器和所述低负载服务器(例如,判断i是否等于n);如果是,则跳转步骤S61;如果否,则i+1,返回步骤S30。
步骤S61,判定调平完成,即判定已遍历所述高负载服务器和所述低负载服务器。
在完成一组配对的高低负载服务器之间的源数据片和目标数据片对调后,再继续对下一组配对的服务器进行源数据片和目标数据片对调,直至将所有配对组的源数据片和目标数据片对调完成,结束本次调平程序。
本实施例的分布式数据库系统根据服务器的负载情况对服务器排序,分别筛选出高负载服务器和低负载服务器,并将高负载服务器中的高负载占比的数据片与低负载服务器中的低负载占比的数据片对调,一方面有效降低了高负载服务器中的负载量,另一方面,由于低负载服务器将一部分数据片调出,减少了一部分负载压力,为新调入的数据片空出了一部分的负载空间,避免了因高负载服务器将数据片调入低负载服务器造成低负载服务器负荷过大的情况,有效降低整个分布式数据库系统的负荷。
如图3所示,图3为本申请分布式数据库负载调平的方法的第二实施例的流程图。本实施例包括图2所示实施例的步骤,其中的步骤S40包括:
步骤S41,将倒序第i个低负载服务器中负载占比排序最后一位的数据片作为第i个目标数据片。
本实施例中,对于根据负载量从高到底排序的低负载服务器,排在前端的低负载服务器的负载量较高,排在后端的低负载服务器的负载量较低,同理,对于高负载服务器,排在前端的高负载服务器的负载量较高,排在后端的高负载服务器的负载量较低。为了让分布式数据库系统的负载获得最有效的调平,可将最高负载的服务器与最低负载的服务器配对,第二高负载的服务器与第二 低负载的服务器配对,以此类推,即顺序第i个高负载服务器与倒序第i个低负载服务器配对成一组。
对于一配对组中的高低负载服务器,本实施例中只将高负载服务器中的一个数据片与低负载服务器中的一个数据片对调,当然,也可以对调多个,可采用与对调一对数据片相同的方式推导实现。在低负载服务器中确定目标数据片,为显著降低高负载服务器的负载,将低负载服务器中负载占比最低的数据片(即负载占比排序最后一位的数据片)作为目标数据片。
步骤S42,将顺序第i个高负载服务器中负载占比排序第j位的数据片作为第i个源数据片。
在高负载服务器中确定源数据片,但并不直接将确定的源数据片与目标数据片对调,而是要先对选择的源数据片是否合适进行预判断。在确定源数据片时,选择负载占比排序第j位的数据片作为源数据片,其中,j为正整数,j的初始值为1,j小于等于高负载服务器中数据片的个数,即在初始时,首先从高负载服务器中负载占比最高的数据片开始选择,如果经过预判断,该数据片在对调后不能缓解整个分布式数据库系统的负载压力,则选择负载占比第二高的数据片作为原数据片,再进行预判断。
步骤S43,预判断如果将第i个目标数据片与第i个源数据片对调后,倒序第i个低负载服务器的总的负载占比是否超过预定的负载占比阈值;如果是,则j+1,返回步骤S42;如果否,则执行步骤S50。
在预判断时,假设将目标数据片与源数据片对调,低负载服务器中原有的总的负载占比减去目标数据片的负载占比,再加上源数据片的负载占比,比较新计算的低负载服务器的总的负载占比是否超过预定的负载占比阈值。如果是,则说明本次选择的源数据片不合适,对调后会造成低负载服务器的负载过高,此时需重新选择新的源数据片,将源数据片更新为高负载服务器中负载占比排序下一位的数据片,并重新进行预判断。依此循环,直至低负载服务器的总的负载占比小于或等于预定的负载占比阈值,说明当前选择的源数据片是合理的,将目标数据片与源数据片对调后,不会造成低负载服务器的负载过高。
本实施例在对调高低负载服务器中的数据片前,预先判断对调后是否会对 低负载服务器带来过高的负载,如果是,则重新选择新的源数据片,并重新进行预判断,直至选择的源数据片在与目标数据片对调后不会造成低负载服务器负载过高,在降低高负载服务器负载的同时,也保证了低负载服务器的正常负载,确保整个分布式数据库系统的有效运行。
如图4所示,图4为本申请分布式数据库负载调平的方法的第三实施例的流程图。本实施例包括图3所示实施例的步骤,在步骤S41之前还包括:
步骤S44,判断顺序第i个高负载服务器中负载占比排序第一位的数据片的负载占比是否超过预定的负载占比阈值;如果是,则执行步骤S45;如果否,则执行步骤S41。
步骤S45,拒绝调换顺序第i个高负载服务器中的数据片。
本实施例在进行预判断和数据片调平前,还判断高负载服务器中数据片的负载占比是否过高。如果将负载占比过高的数据片转移到低负载服务器中,会造成低负载服务器的负载过大,在下次调平时会将原来的低负载服务器作为高负载服务器,重新将该负载占比过高的数据片调出,造成重复转移数据片。此时,为了避免重复转移操作,暂时不对包括有过高负载占比数据片的高负载服务器进行处理,而采用其他措施或转至手动处理的方式进行处理。此外,对于与未处理的高负载服务器配对的低负载服务器,可以将其与其他的高负载服务器重新配对,也可以对其保留,在下次调平时再进行配对。
如图5所示,图5为本申请分布式数据库负载调平的方法的第四实施例的流程图。本实施例包括图2所示实施例的步骤,步骤S61之后还包括:
步骤S71,将下一个统计周期作为当前统计周期,在当前统计周期内统计所有服务器的负载量;
步骤S72,将各服务器按照负载量从高到低的顺序排序,将排序靠前的n个服务器作为当前统计周期的高负载服务器;
步骤S73,判断当前统计周期的n个高负载服务器是否与前一个统计周期的n个高负载服务器相同;如果是,则执行步骤S74;如果否,则返回步骤S10;
步骤S74,增大预定的负载占比阈值,并返回步骤S10。
本实施例还对调平策略是否合理进行判断,统计下一个周期内各服务器运行时的负载情况,判断前一次调平后各服务器的负载量是否有所改善。例如,在7号凌晨1点,统计6号凌晨1点至7号凌晨1点各服务器负载情况,并对其进行第一次调平,系统继续运行,在8号凌晨1点,统计7号凌晨1点至8号凌晨1点各服务器负载情况,并分析7号第一次调平的结果是否合理,如果合理,则继续采用该调平策略进行第二次调平,否则,调整调平策略,并采用新的调平策略进行第二次调平。在统计的数据中,仍然根据服务器负载量筛选出高负载服务器。如果调平后再运行一个统计周期后筛选的高负载服务器与调平前的高负载服务器一样,则说明之前的高负载服务器的负载压力并未得到缓解,调平策略无效。此时需调整调平策略,例如增大预定的负载占比阈值,从高负载服务器选择负载占比较大的数据片作为源数据片,使高负载服务器中有更多的负载占比转移到低负载服务器中,确保调平策略的有效性。
如图6所示,图6为本申请分布式数据库负载调平的方法的第五实施例的流程图。本实施例包括图2所示实施例的步骤,其中的步骤S20包括:
步骤S21,将各服务器按照CPU负载量从高到低的顺序排序,将排序靠前的n1个服务器作为第一组高负载服务器,将排序靠后的n1个服务器作为第一组低负载服务器,n1为小于n的正整数;
步骤S22,在各服务器中剔除第一组高负载服务器和第一组低负载服务器,将剩下的服务器按照流量负载量从高到低的顺序排序,将排序靠前的n2个服务器作为第二组高负载服务器,将排序靠后的n2个服务器作为第二组低负载服务器,n2为小于n的正整数,且n1+n2=n。
本实施例在筛选高低负载服务器时,可从CPU负载量和流量负载量两方面进行排序,CPU负载量和流量负载量的优先级可预先设置。本实施例以CPU负载量优先级高于流量负载量优先级为例。先将系统中的服务器按照CPU负载量从高到低的顺序排序,筛选出第一组高负载服务器和第一组低负载服务器,再对剩下的服务器进行第二次筛选,将剩下的服务器按照流量负载量从高到低的顺 序排序,筛选出第二组高负载服务器和第二组低负载服务器。在配对时,第一组高负载服务器与第一组低负载服务器一一配对,第二组高负载服务器与第二组低负载服务器一一配对。调换数据片时,也是分别在第一组高负载服务器与第一组低负载服务器之间、第二组高负载服务器与第二组低负载服务器之间进行调换。由于本实施例分别从CPU负载量和流量负载量两方面分别筛选需调换数据片的服务器,使数据片调换更加有针对性,进一步使调平策略更加有效,有利于降低整个分布式数据库系统的负荷。
如图7所示,图7为本申请分布式数据库负载调平的方法的第六实施例的流程图。本实施例包括图2所示实施例的步骤,其中的步骤S50包括:
步骤S51,从分布式数据库系统中获取空闲服务器;
步骤S52,将第i个源数据片从顺序第i个高负载服务器转移到空闲服务器中;
步骤S53,将第i个目标数据片从倒序第i个低负载服务器转移到顺序第i个高负载服务器中;
步骤S54,将已转移到空闲服务器上的第i个源数据片转移到倒序第i个低负载服务器中。
本实施例为了避免在低负载服务器没有空闲时,如果源数据片直接转移到低负载服务器,会造成低负载服务器负载较高,影响数据片转移效率。因此在分布式数据库系统中会预留一部分空闲资源,即空闲的服务器,将源数据片先从高负载服务器转移到空闲服务器中,等目标数据片从低负载服务器中挪出后,再将源数据片转移到目标数据片。当然,如果低负载服务器上原本就有空闲,可直接将源数据片从高负载服务器转移到低负载服务器,再将目标数据片从低负载服务器转移到高负载服务器中。可预先判断低负载服务器是否有空闲,如果是则直接调换,如果否,再通过空闲服务器进行中转。如此一来,有利于提高数据片转移的效率,确保负载调平的高效进行。
如图8所示,图8为本申请分布式数据库负载调平的装置的第一实施例的模块示意图。本实施例提出的分布式数据库负载调平的装置,包括:
统计模块10,用于在一个统计周期内统计分布式数据库系统中所有服务器的负载量和每一个服务器中的每一个数据片的负载占比;
排序模块20,用于将各服务器按照负载量从高到低的顺序排序,将排序靠前的n个服务器作为高负载服务器,将排序靠后的n个服务器作为低负载服务器,n为正整数;将顺序第i个高负载服务器中的各数据片按照负载占比从高到低的顺序排序,将倒序第i个低负载服务器中的各数据片按照负载占比从高到低的顺序排序,i为正整数,i的初始值为1,i小于等于n;
调整模块30,用于将顺序第i个高负载服务器中负载占比排序在前的数据片作为第i个源数据片,将倒序第i个低负载服务器中负载占比排序在后的数据片作为第i个目标数据片,将第i个目标数据片与第i个源数据片对调;依此循环,直至调平所有高负载服务器,即遍历所有的高负载服务器和低负载服务器。
本实施例的分布式数据库系统中包括多个分片的服务器,每个服务器上加载有多个数据片。预先在每个服务器上部署监控上报程序,定时将每个数据片的数据请求量、数据片访问时所占的流量等信息上报到分布式数据库系统中的统计库中。同时,系统还从网管服务器获得当前统计周期内各服务器的负载量,例如,CPU负载量和流量负载量。系统根据当统计周期内上报的某一个数据片的数据请求量、访问流量等信息,以及该数据片所在的服务器的负载量,获得该数据片在该服务器的负载量中的负载占比,即服务器处理该数据片的访问请求时为服务器带来的负载量在该服务器的总的负载量中的比例。一个统计周期可以是一天24小时,或更长时间段。以24小时为例,监控上报程序可每隔5分钟上报一次数据,则一天24小时内一个数据片就有288个上报信息。为了便于统计,可将288个上报信息点合成一个长的上报信息链,那么一个数据片就只对应一个上报信息链。同时,系统可在每一天的固定时刻从网管服务器获得各服务器的负载量,例如每天的凌晨1点钟。
为了实现负载调平,本实施例将高负载服务器中的数据片与低负载服务器中的数据片对调。系统可根据统计的服务器负载量从高到低的顺序对各服务器依次排序,排在最前端的服务器负载量最高,排在最后端的服务器负载量最低。将前n个服务器作为高负载服务器,后n个服务器作为低负载服务器,调平就是 在这两组服务器中进行数据片对调。
可预先将一个高负载服务器与一个低负载服务器配对成一组。本实施例中,各高负载服务器按照负载量从高到低的顺序排序,各低负载服务器也按照负载量从高到低的顺序排序。可将高负载服务器队列中顺序第i个高负载服务器与低负载服务器队列中倒序第i个低负载服务器配对成一组,例如将最大负载量的高负载服务器与最小负载量的低负载服务器配对,将第二大负载量的高负载服务器与第二小负载量的低负载服务器配对,以此类推。或者可将高负载服务器队列中顺序第i个高负载服务器与低负载服务器队列中顺序第i个低负载服务器配对成一组;或者随机分配。对于每一组配对的高负载服务器与低负载服务器,都对服务器各自的数据片进行排序,排序方式按照负载占比从高到低的顺序排序。
为了降低高负载服务器的负载量,可将高负载服务器中的数据片移动到低负载服务器中,而为了避免因过多负荷加载到低负载服务器造成低负载服务器的负载量过大,本实施例可只将高负载服务器中负载占比较高的一个或几个数据片移动到低负载服务器中,同时还将低负载服务器中负载占比较低的数据片移动到高负载服务器中,两个服务器中移动的数据片个数相等,实现高低负载服务器之间的数据片对调。如此一来,高负载服务器中的负载量得到了有效降低,同时,由于低负载服务器将一部分数据片调出,减少了一部分负载压力,为新调入的数据片空出了一部分的负载空间,有效避免了因高负载服务器将数据片调入低负载服务器造成低负载服务器负荷过大的情况。
在完成一组配对的高低负载服务器之间的源数据片和目标数据片对调后,再继续对下一组配对的服务器进行源数据片和目标数据片对调,直至将所有配对组的源数据片和目标数据片对调完成,结束本次调平程序。
本实施例的布式数据库系统根据服务器的负载情况对服务器排序,分别筛选出高负载服务器和低负载服务器,并将高负载服务器中的高负载占比的数据片与低负载服务器中的低负载占比的数据片对调,一方面有效降低了高负载服务器中的负载量,另一方面,由于低负载服务器将一部分数据片调出,减少了一部分负载压力,为新调入的数据片空出了一部分的负载空间,避免了因高负 载服务器将数据片调入低负载服务器造成低负载服务器负荷过大的情况,有效降低整个分布式数据库系统的负荷。
如图9所示,图9为本申请分布式数据库负载调平的装置的第二实施例的模块示意图。本实施例包括图8所示实施例的模块,还包括判断模块40;
调整模块30还用于,将倒序第i个低负载服务器中负载占比排序最后一位的数据片作为第i个目标数据片;将顺序第i个高负载服务器中负载占比排序第j位的数据片作为第i个源数据片,其中,j为正整数,j的初始值为1,j小于等于顺序第i个所述高负载服务器中的数据片的个数;
判断模块40用于,预判断如果将第i个目标数据片与第i个源数据片对调后,倒序第i个低负载服务器的总的负载占比是否超过预定的负载占比阈值;
调整模块30还用于,当判断模块40判定倒序第i个低负载服务器的总的负载占比超过预定的负载占比阈值时,将第i个源数据片更新为高负载服务器中负载占比排序第j位的数据片的下一位数据片;
判断模块40还用于,预判断如果将第i个目标数据片与更新后的第i个源数据片对调后,倒序第i个低负载服务器的总的负载占比是否超过预定的负载占比阈值;依此循环,直至倒序第i个低负载服务器的总的负载占比小于或等于预定的负载占比阈值。
本实施例中,对于根据负载量从高到底排序的低负载服务器,排在前端的低负载服务器的负载量较高,排在后端的低负载服务器的负载量较低,同理,对于高负载服务器,排在前端的高负载服务器的负载量较高,排在后端的高负载服务器的负载量较低。为了让分布式数据库系统的负载获得最有效的调平,可将最高负载的服务器与最低负载的服务器配对,第二高负载的服务器与第二低负载的服务器配对,以此类推,即顺序第i个高负载服务器与倒序第i个低负载服务器配对成一组。
对于一配对组中的高低负载服务器,本实施例中只将高负载服务器中的一个数据片与低负载服务器中的一个数据片对调,当然,也可以对调多个,可采用与对调一对数据片相同的方式推导实现。在低负载服务器中确定目标数据片, 为显著降低高负载服务器的负载,将低负载服务器中负载占比最低的数据片(即负载占比排序最后一位的数据片)作为目标数据片。
在高负载服务器中确定源数据片,但并不直接将确定的源数据片与目标数据片对调,而是要先对选择的源数据片是否合适进行预判断。在确定源数据片时,选择负载占比排序第j位的数据片作为源数据片,其中,j为正整数,j的初始值为1,j小于等于高负载服务器中数据片的个数,即在初始时,首先从高负载服务器中负载占比最高的数据片开始选择,如果经过预判断,该数据片在对调后不能缓解整个分布式数据库系统的负载压力,则选择负载占比第二高的数据片作为原数据片,再进行预判断。
在预判断时,假设将目标数据片与源数据片对调,低负载服务器中原有的总的负载占比减去目标数据片的负载占比,再加上源数据片的负载占比,比较新计算的低负载服务器的总的负载占比是否超过预定的负载占比阈值。如果是,则说明本次选择的源数据片不合适,对调后会造成低负载服务器的负载过高,此时需重新选择新的源数据片,将源数据片更新为高负载服务器中负载占比排序下一位的数据片,并重新进行预判断。依此循环,直至低负载服务器的总的负载占比小于或等于预定的负载占比阈值,说明当前选择的源数据片是合理的,将目标数据片与源数据片对调后,不会造成低负载服务器的负载过高。
本实施例在对调高低负载服务器中的数据片前,预先判断对调后是否会对低负载服务器带来过高的负载,如果是,则重新选择新的源数据片,并重新进行预判断,直至选择的源数据片在与目标数据片对调后不会造成低负载服务器负载过高,在降低高负载服务器负载的同时,也保证了低负载服务器的正常负载,确保整个分布式数据库系统的有效运行。
进一步的,判断模块40还用于,判断顺序第i个高负载服务器中负载占比排序第一位的数据片的负载占比是否超过预定的负载占比阈值;
如果是,则调整模块30还用于拒绝调换顺序第i个高负载服务器中的数据片;
如果否,则调整模块30还用于将倒序第i个低负载服务器中负载占比排序最后一位的数据片作为第i个目标数据片。
本实施例在进行预判断和数据片调平前,还判断高负载服务器中数据片的负载占比是否过高。如果将负载占比过高的数据片转移到低负载服务器中,会造成低负载服务器的负载过大,在下次调平时会将原来的低负载服务器作为高负载服务器,重新将该负载占比过高的数据片调出,造成重复转移数据片。此时,为了避免重复转移操作,暂时不对包括有过高负载占比数据片的高负载服务器进行处理,而采用其他措施或转至手动处理的方式进行处理。此外,对于与未处理的高负载服务器配对的低负载服务器,可以将其与其他的高负载服务器重新配对,也可以对其保留,在下次调平时再进行配对。
进一步的,统计模块10还用于,将下一个统计周期作为当前统计周期,在当前统计周期内统计所有服务器的负载量;
排序模块20还用于,将各服务器按照负载量从高到低的顺序排序,将排序靠前的n个服务器作为当前统计周期的高负载服务器;
判断模块40用于,判断当前统计周期的n个高负载服务器是否与前一个统计周期的n个高负载服务器相同;
如果是,则调整模块30还用于增大预定的负载占比阈值,在当前统计周期内,重新调平所有高负载服务器。即,重新遍历所述高负载服务器和所述低负载服务器,执行相应的操作。
本实施例还对调平策略是否合理进行判断,统计下一个周期内各服务器运行时的负载情况,判断前一次调平后各服务器的负载量是否有所改善。例如,在7号凌晨1点,统计6号凌晨1点至7号凌晨1点各服务器负载情况,并对其进行第一次调平,系统继续运行,在8号凌晨1点,统计7号凌晨1点至8号凌晨1点各服务器负载情况,并分析7号第一次调平的结果是否合理,如果合理,则继续采用该调平策略进行第二次调平,否则,调整调平策略,并采用新的调平策略进行第二次调平。在统计的数据中,仍然根据服务器负载量筛选出高负载服务器。如果调平后再运行一个统计周期后筛选的高负载服务器与调平前的高负载服务器一样,则说明之前的高负载服务器的负载压力并未得到缓解,调平策略无效。此时需调整调平策略,例如增大预定的负载占比阈值,从高负载服务器选择负 载占比较大的数据片作为源数据片,使高负载服务器中有更多的负载占比转移到低负载服务器中,确保调平策略的有效性。
进一步的,排序模块20用于:
将各服务器按照CPU负载量从高到低的顺序排序,将排序靠前的n1个服务器作为第一组高负载服务器,将排序靠后的n1个服务器作为第一组低负载服务器,n1为小于n的正整数;
在各服务器中剔除第一组高负载服务器和第一组低负载服务器,将剩下的服务器按照流量负载量从高到低的顺序排序,将排序靠前的n2个服务器作为第二组高负载服务器,将排序靠后的n2个服务器作为第二组低负载服务器,n2为小于n的正整数,且n1+n2=n。
本实施例在筛选高低负载服务器时,可从CPU负载量和流量负载量两方面进行排序,CPU负载量和流量负载量的优先级可预先设置。本实施例以CPU负载量优先级高于流量负载量优先级为例。先将系统中的服务器按照CPU负载量从高到低的顺序排序,筛选出第一组高负载服务器和第一组低负载服务器,再对剩下的服务器进行第二次筛选,将剩下的服务器按照流量负载量从高到低的顺序排序,筛选出第二组高负载服务器和第二组低负载服务器。在配对时,第一组高负载服务器与第一组低负载服务器一一配对,第二组高负载服务器与第二组低负载服务器一一配对。调换数据片时,也是分别在第一组高负载服务器与第一组低负载服务器之间、第二组高负载服务器与第二组低负载服务器之间进行调换。由于本实施例分别从CPU负载量和流量负载量两方面分别筛选需调换数据片的服务器,使数据片调换更加有针对性,进一步使调平策略更加有效,有利于降低整个分布式数据库系统的负荷。
进一步的,调整模块30用于:
从分布式数据库系统中获取空闲服务器;
将第i个源数据片从顺序第i个高负载服务器转移到空闲服务器中;
将第i个目标数据片从倒序第i个低负载服务器转移到顺序第i个高负载服务 器中;
将已转移到空闲服务器上的第i个源数据片转移到倒序第i个低负载服务器中。
本实施例为了避免在低负载服务器没有空闲时,如果源数据片直接转移到低负载服务器,会造成低负载服务器负载较高,影响数据片转移效率。因此在分布式数据库系统中会预留一部分空闲资源,即空闲的服务器,将源数据片先从高负载服务器转移到空闲服务器中,等目标数据片从低负载服务器中挪出后,再将源数据片转移到目标数据片。当然,如果低负载服务器上原本就有空闲,可直接将源数据片从高负载服务器转移到低负载服务器,再将目标数据片从低负载服务器转移到高负载服务器中。可预先判断低负载服务器是否有空闲,如果是则直接调换,如果否,再通过空闲服务器进行中转。如此一来,有利于提高数据片转移的效率,确保负载调平的高效进行。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个......”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣和对实施例的限制。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。
以上所述仅为本申请的实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (18)

  1. 一种分布式数据库负载调平的方法,其特征在于,包括步骤:
    在一个统计周期内统计分布式数据库系统中所有服务器的负载量和每一个所述服务器中的每一个数据片的负载占比;
    将各服务器按照负载量从高到低的顺序排序,将排序靠前的n个服务器作为高负载服务器,将排序靠后的n个服务器作为低负载服务器,n为正整数;
    遍历所述高负载服务器和所述低负载服务器,执行相应的操作,包括:
    将顺序第i个高负载服务器中的各数据片按照负载占比从高到低的顺序排序,将倒序第i个低负载服务器中的各数据片按照负载占比从高到低的顺序排序,i为正整数,i小于等于n;
    将顺序第i个所述高负载服务器中负载占比排序在前的数据片作为第i个源数据片,将倒序第i个所述低负载服务器中负载占比排序在后的数据片作为第i个目标数据片,将第i个所述目标数据片与第i个所述源数据片对调。
  2. 如权利要求1所述的分布式数据库负载调平的方法,其特征在于,所述将顺序第i个所述高负载服务器中负载占比排序在前的数据片作为第i个源数据片,将倒序第i个所述低负载服务器中负载占比排序在后的数据片作为第i个目标数据片的步骤包括:
    将倒序第i个所述低负载服务器中负载占比排序最后一位的数据片作为第i个目标数据片;
    将顺序第i个所述高负载服务器中负载占比排序第j位的数据片作为第i个源数据片,其中,j为正整数,j的初始值为1,j小于等于顺序第i个所述高负载服务器中的数据片的个数;
    预判断如果将第i个所述目标数据片与第i个所述源数据片对调后,倒序第i个所述低负载服务器的总的负载占比是否超过预定的负载占比阈值;
    如果是,则将第i个所述源数据片更新为所述高负载服务器中负载占比排序第j位的数据片的下一位数据片,并预判断如果将第i个所述目标数据片与更新后的第i个所述源数据片对调后,倒序第i个所述低负载服务器的总的负载占比是否超过所述预定的负载占比阈值,直至倒序第i个所述低负载服务器的总的负载占比小于或等于所述预定的负载占比阈值。
  3. 如权利要求2所述的分布式数据库负载调平的方法,其特征在于,所述将倒序第i个所述低负载服务器中负载占比排序最后一位的数据片作为第i个目标数据片的步骤之前还包括:
    判断顺序第i个所述高负载服务器中负载占比排序第一位的数据片的负载占比是否超过所述预定的负载占比阈值;
    如果是,则拒绝调换顺序第i个所述高负载服务器中的数据片;
    如果否,则执行将倒序第i个所述低负载服务器中负载占比排序最后一位的数据片作为第i个目标数据片的步骤。
  4. 如权利要求2或3所述的分布式数据库负载调平的方法,其特征在于,所述遍历所述高负载服务器和所述低负载服务器,执行相应的操作的步骤之后还包括:
    将下一个统计周期作为当前统计周期,在当前统计周期内统计所有服务器的负载量;
    将各服务器按照负载量从高到低的顺序排序,将排序靠前的n个所述服务器作为当前统计周期的高负载服务器;
    判断当前统计周期的n个高负载服务器是否与前一个统计周期的n个高负载服务器相同;
    如果是,则增大所述预定的负载占比阈值,在当前统计周期内,遍历所述高负载服务器和所述低负载服务器,执行所述相应的操作。
  5. 如权利要求1至3任一项所述的分布式数据库负载调平的方法,其特征在于,所述将各服务器按照负载量从高到低的顺序排序,将排序靠前的n个服务器作为高负载服务器,将排序靠后的n个服务器作为低负载服务器的步骤包括:
    将各服务器按照CPU负载量从高到低的顺序排序,将排序靠前的n1个服务器作为第一组高负载服务器,将排序靠后的n1个服务器作为第一组低负载服务器,n1为小于n的正整数;
    在各服务器中剔除第一组高负载服务器和第一组低负载服务器,将剩下的 服务器按照流量负载量从高到低的顺序排序,将排序靠前的n2个所述服务器作为第二组高负载服务器,将排序靠后的n2个所述服务器作为第二组低负载服务器,n2为小于n的正整数,且n1+n2=n。
  6. 如权利要求1至3任一项所述的分布式数据库负载调平的方法,其特征在于,所述将第i个所述目标数据片与第i个所述源数据片对调的步骤包括:
    从所述分布式数据库系统中获取空闲服务器;
    将第i个源数据片从顺序第i个所述高负载服务器转移到所述空闲服务器中;
    将第i个目标数据片从倒序第i个所述低负载服务器转移到顺序第i个所述高负载服务器中;
    将已转移到所述空闲服务器上的第i个源数据片转移到倒序第i个所述低负载服务器中。
  7. 一种分布式数据库负载调平的装置,其特征在于,其包括处理器和存储器,所述存储器中存储有可被所述处理器执行的指令,所述指令用于执行以下操作:
    在一个统计周期内统计分布式数据库系统中所有服务器的负载量和每一个所述服务器中的每一个数据片的负载占比;
    将各服务器按照负载量从高到低的顺序排序,将排序靠前的n个服务器作为高负载服务器,将排序靠后的n个服务器作为低负载服务器,n为正整数;
    遍历所述高负载服务器和所述低负载服务器,执行相应的操作,包括:
    将顺序第i个高负载服务器中的各数据片按照负载占比从高到低的顺序排序,将倒序第i个低负载服务器中的各数据片按照负载占比从高到低的顺序排序,i为正整数,i小于等于n;
    将顺序第i个所述高负载服务器中负载占比排序在前的数据片作为第i个源数据片,将倒序第i个所述低负载服务器中负载占比排序在后的数据片作为第i个目标数据片,将第i个所述目标数据片与第i个所述源数据片对调。
  8. 如权利要求7所述的分布式数据库负载调平的装置,其特征在于,所述 将顺序第i个所述高负载服务器中负载占比排序在前的数据片作为第i个源数据片,将倒序第i个所述低负载服务器中负载占比排序在后的数据片作为第i个目标数据片的操作包括:
    将倒序第i个所述低负载服务器中负载占比排序最后一位的数据片作为第i个目标数据片;
    将顺序第i个所述高负载服务器中负载占比排序第j位的数据片作为第i个源数据片,其中j为正整数,j的初始值为1,j小于等于顺序第i个所述高负载服务器中的数据片的个数;
    预判断如果将第i个所述目标数据片与第i个所述源数据片对调后,倒序第i个所述低负载服务器的总的负载占比是否超过预定的负载占比阈值;
    当所述判断模块判定倒序第i个所述低负载服务器的总的负载占比超过预定的负载占比阈值时,将第i个所述源数据片更新为所述高负载服务器中负载占比排序第j位的数据片的下一位数据片,并预判断如果将第i个所述目标数据片与更新后的第i个所述源数据片对调后,倒序第i个所述低负载服务器的总的负载占比是否超过所述预定的负载占比阈值,直至倒序第i个所述低负载服务器的总的负载占比小于或等于所述预定的负载占比阈值。
  9. 如权利要求8所述的分布式数据库负载调平的装置,其特征在于,所述将倒序第i个所述低负载服务器中负载占比排序最后一位的数据片作为第i个目标数据片的操作之前还包括:
    判断顺序第i个所述高负载服务器中负载占比排序第一位的数据片的负载占比是否超过所述预定的负载占比阈值;
    如果是,则拒绝调换顺序第i个所述高负载服务器中的数据片;
    如果否,则将倒序第i个所述低负载服务器中负载占比排序最后一位的数据片作为第i个目标数据片。
  10. 如权利要求8或9所述的分布式数据库负载调平的装置,其特征在于,所述遍历所述高负载服务器和所述低负载服务器,执行相应的操作的步骤之后还包括:
    将下一个统计周期作为当前统计周期,在当前统计周期内统计所有服务器 的负载量;
    将各服务器按照负载量从高到低的顺序排序,将排序靠前的n个所述服务器作为当前统计周期的高负载服务器;
    判断当前统计周期的n个高负载服务器是否与前一个统计周期的n个高负载服务器相同;
    如果是,则所述调整模块还用于增大所述预定的负载占比阈值,在当前统计周期内,遍历所述高负载服务器和所述低负载服务器,执行所述相应的操作。
  11. 如权利要求7至9任一项所述的分布式数据库负载调平的装置,其特征在于,所述将各服务器按照负载量从高到低的顺序排序,将排序靠前的n个服务器作为高负载服务器,将排序靠后的n个服务器作为低负载服务器的操作包括:
    将各服务器按照CPU负载量从高到低的顺序排序,将排序靠前的n1个服务器作为第一组高负载服务器,将排序靠后的n1个服务器作为第一组低负载服务器,n1为小于n的正整数;
    在各服务器中剔除第一组高负载服务器和第一组低负载服务器,将剩下的服务器按照流量负载量从高到低的顺序排序,将排序靠前的n2个所述服务器作为第二组高负载服务器,将排序靠后的n2个所述服务器作为第二组低负载服务器,n2为小于n的正整数,且n1+n2=n。
  12. 如权利要求7至9任一项所述的分布式数据库负载调平的装置,其特征在于,所述将第i个所述目标数据片与第i个所述源数据片对调的操作包括:
    从所述系统中获取空闲服务器;
    将第i个源数据片从顺序第i个所述高负载服务器转移到所述空闲服务器中;
    将第i个目标数据片从倒序第i个所述低负载服务器转移到顺序第i个所述高负载服务器中;
    将已转移到所述空闲服务器上的第i个源数据片转移到倒序第i个所述低负载服务器中。
  13. 一种非易失性存储介质,其特征在于,其存储有计算机指令,所述计算机指令由处理器执行时执行以下步骤:
    在一个统计周期内统计分布式数据库系统中所有服务器的负载量和每一个所述服务器中的每一个数据片的负载占比;
    将各服务器按照负载量从高到低的顺序排序,将排序靠前的n个服务器作为高负载服务器,将排序靠后的n个服务器作为低负载服务器,n为正整数;
    遍历所述高负载服务器和所述低负载服务器,执行相应的操作,包括:
    将顺序第i个高负载服务器中的各数据片按照负载占比从高到低的顺序排序,将倒序第i个低负载服务器中的各数据片按照负载占比从高到低的顺序排序,i为正整数,i小于等于n;
    将顺序第i个所述高负载服务器中负载占比排序在前的数据片作为第i个源数据片,将倒序第i个所述低负载服务器中负载占比排序在后的数据片作为第i个目标数据片,将第i个所述目标数据片与第i个所述源数据片对调。
  14. 如权利要求13所述的非易失性存储介质,其特征在于,所述将顺序第i个所述高负载服务器中负载占比排序在前的数据片作为第i个源数据片,将倒序第i个所述低负载服务器中负载占比排序在后的数据片作为第i个目标数据片的步骤包括:
    将倒序第i个所述低负载服务器中负载占比排序最后一位的数据片作为第i个目标数据片;
    将顺序第i个所述高负载服务器中负载占比排序第j位的数据片作为第i个源数据片,其中,j为正整数,j的初始值为1,j小于等于顺序第i个所述高负载服务器中的数据片的个数;
    预判断如果将第i个所述目标数据片与第i个所述源数据片对调后,倒序第i个所述低负载服务器的总的负载占比是否超过预定的负载占比阈值;
    如果是,则将第i个所述源数据片更新为所述高负载服务器中负载占比排序第j位的数据片的下一位数据片,并预判断如果将第i个所述目标数据片与更新后的第i个所述源数据片对调后,倒序第i个所述低负载服务器的总的负载占比是否超过所述预定的负载占比阈值,直至倒序第i个所述低负载服务器的总的负载占比小于或等于所述预定的负载占比阈值。
  15. 如权利要求14所述的非易失性存储介质,其特征在于,所述将倒序第i个所述低负载服务器中负载占比排序最后一位的数据片作为第i个目标数据片的步骤之前还包括:
    判断顺序第i个所述高负载服务器中负载占比排序第一位的数据片的负载占比是否超过所述预定的负载占比阈值;
    如果是,则拒绝调换顺序第i个所述高负载服务器中的数据片;
    如果否,则执行将倒序第i个所述低负载服务器中负载占比排序最后一位的数据片作为第i个目标数据片的步骤。
  16. 如权利要求14或15所述的非易失性存储介质,其特征在于,所述遍历所述高负载服务器和所述低负载服务器,执行相应的操作的步骤之后还包括:
    将下一个统计周期作为当前统计周期,在当前统计周期内统计所有服务器的负载量;
    将各服务器按照负载量从高到低的顺序排序,将排序靠前的n个所述服务器作为当前统计周期的高负载服务器;
    判断当前统计周期的n个高负载服务器是否与前一个统计周期的n个高负载服务器相同;
    如果是,则增大所述预定的负载占比阈值,在当前统计周期内,遍历所述高负载服务器和所述低负载服务器,执行所述相应的操作。
  17. 如权利要求13至15任一项所述的非易失性存储介质,其特征在于,所述将各服务器按照负载量从高到低的顺序排序,将排序靠前的n个服务器作为高负载服务器,将排序靠后的n个服务器作为低负载服务器的步骤包括:
    将各服务器按照CPU负载量从高到低的顺序排序,将排序靠前的n1个服务器作为第一组高负载服务器,将排序靠后的n1个服务器作为第一组低负载服务器,n1为小于n的正整数;
    在各服务器中剔除第一组高负载服务器和第一组低负载服务器,将剩下的服务器按照流量负载量从高到低的顺序排序,将排序靠前的n2个所述服务器作为第二组高负载服务器,将排序靠后的n2个所述服务器作为第二组低负载服务 器,n2为小于n的正整数,且n1+n2=n。
  18. 如权利要求13至15任一项所述的非易失性存储介质,其特征在于,所述将第i个所述目标数据片与第i个所述源数据片对调的步骤包括:
    从所述分布式数据库系统中获取空闲服务器;
    将第i个源数据片从顺序第i个所述高负载服务器转移到所述空闲服务器中;
    将第i个目标数据片从倒序第i个所述低负载服务器转移到顺序第i个所述高负载服务器中;
    将已转移到所述空闲服务器上的第i个源数据片转移到倒序第i个所述低负载服务器中。
PCT/CN2016/092005 2015-07-29 2016-07-28 分布式数据库负载调平的方法和装置 WO2017016499A1 (zh)

Priority Applications (6)

Application Number Priority Date Filing Date Title
KR1020187000181A KR102047900B1 (ko) 2015-07-29 2016-07-28 분산 데이터베이스의 부하를 레벨링하는 방법 및 장치
AU2016299084A AU2016299084A1 (en) 2015-07-29 2016-07-28 Method and device for leveling load of distributed database
JP2018522846A JP6615342B2 (ja) 2015-07-29 2016-07-28 分散データベースの負荷を平準化するための方法および装置
CA2990753A CA2990753A1 (en) 2015-07-29 2016-07-28 Method and apparatus for leveling loads of distributed databases
EP16829864.4A EP3331218B1 (en) 2015-07-29 2016-07-28 Method and device for leveling load of distributed database
US15/833,147 US10554737B2 (en) 2015-07-29 2017-12-06 Method and apparatus for leveling loads of distributed databases

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510456585.2A CN106713377B (zh) 2015-07-29 2015-07-29 分布式数据库负载调平的方法和装置
CN201510456585.2 2015-07-29

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/833,147 Continuation US10554737B2 (en) 2015-07-29 2017-12-06 Method and apparatus for leveling loads of distributed databases

Publications (1)

Publication Number Publication Date
WO2017016499A1 true WO2017016499A1 (zh) 2017-02-02

Family

ID=57884113

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/092005 WO2017016499A1 (zh) 2015-07-29 2016-07-28 分布式数据库负载调平的方法和装置

Country Status (8)

Country Link
US (1) US10554737B2 (zh)
EP (1) EP3331218B1 (zh)
JP (1) JP6615342B2 (zh)
KR (1) KR102047900B1 (zh)
CN (1) CN106713377B (zh)
AU (1) AU2016299084A1 (zh)
CA (1) CA2990753A1 (zh)
WO (1) WO2017016499A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110933701A (zh) * 2019-12-12 2020-03-27 新华三大数据技术有限公司 网络负载状态检测方法及装置

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107408359B (zh) 2015-02-04 2020-06-05 富士胶片株式会社 图像显示装置
CN107360067B (zh) * 2017-06-29 2021-08-10 青岛恒金源电子科技有限公司 一种智能家居系统中的网络负载均衡方法
US10324662B2 (en) * 2017-08-28 2019-06-18 International Business Machines Corporation Rebalancing of the first extents of logical volumes among a plurality of ranks
CN108600341A (zh) * 2018-04-09 2018-09-28 广州悦世界信息科技有限公司 一种业务节点分配方法、决策节点及服务器集群
CN111193788A (zh) * 2019-12-24 2020-05-22 视联动力信息技术股份有限公司 一种音视频流负载均衡方法和装置
CN117271138B (zh) * 2023-10-27 2024-03-01 山东三木众合信息科技股份有限公司 一种基于数据中心的数据处理方法及系统

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62235646A (ja) * 1986-04-04 1987-10-15 Nec Corp 資源管理方式
CN103095804A (zh) * 2011-12-13 2013-05-08 微软公司 集群存储系统中的负载平衡
CN103327094A (zh) * 2013-06-19 2013-09-25 成都市欧冠信息技术有限责任公司 数据分布式存储方法与系统

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6965651B1 (en) * 2001-05-11 2005-11-15 Micrel, Inc. Method and apparatus for delay adjustment and channel reordering in baseband communication receiving system
JP2005209055A (ja) * 2004-01-26 2005-08-04 Hitachi Ltd ストレージの負荷分散方法
US7457930B2 (en) * 2004-11-19 2008-11-25 International Business Machines Corporation Method for application transparent autonomic data replication improving access performance for a storage area network aware file system
US7281106B1 (en) * 2005-03-23 2007-10-09 Emc Corporation Method and apparatus for selective volume swapping in a data storage device based on merging multiple sets of candidate storage devices
US7281105B1 (en) * 2005-03-23 2007-10-09 Emc Corporation Method and apparatus for selecting data storage devices for participating in logical volume exchange process based on aggregated workload statistics
US8706914B2 (en) * 2007-04-23 2014-04-22 David D. Duchesneau Computing infrastructure
US8375180B2 (en) * 2010-02-05 2013-02-12 International Business Machines Corporation Storage application performance matching
US9606867B2 (en) * 2014-06-05 2017-03-28 International Business Machines Corporation Maintaining data storage in accordance with an access metric
US8874868B2 (en) * 2010-05-19 2014-10-28 Cleversafe, Inc. Memory utilization balancing in a dispersed storage network
US9164841B2 (en) * 2012-06-05 2015-10-20 Cleversafe, Inc. Resolution of a storage error in a dispersed storage network
US8930746B1 (en) * 2012-06-30 2015-01-06 Emc Corporation System and method for LUN adjustment
US8949483B1 (en) * 2012-12-28 2015-02-03 Emc Corporation Techniques using I/O classifications in connection with determining data movements
JP2014186364A (ja) * 2013-03-21 2014-10-02 Kddi Corp 分散システム
JP6209863B2 (ja) * 2013-05-27 2017-10-11 富士通株式会社 ストレージ制御装置、ストレージ制御方法およびストレージ制御プログラム

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62235646A (ja) * 1986-04-04 1987-10-15 Nec Corp 資源管理方式
CN103095804A (zh) * 2011-12-13 2013-05-08 微软公司 集群存储系统中的负载平衡
CN103327094A (zh) * 2013-06-19 2013-09-25 成都市欧冠信息技术有限责任公司 数据分布式存储方法与系统

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110933701A (zh) * 2019-12-12 2020-03-27 新华三大数据技术有限公司 网络负载状态检测方法及装置
CN110933701B (zh) * 2019-12-12 2022-07-26 新华三大数据技术有限公司 网络负载状态检测方法及装置

Also Published As

Publication number Publication date
EP3331218A1 (en) 2018-06-06
US20180097875A1 (en) 2018-04-05
AU2016299084A1 (en) 2018-01-18
KR20180016479A (ko) 2018-02-14
CN106713377B (zh) 2019-09-13
KR102047900B1 (ko) 2019-12-04
CN106713377A (zh) 2017-05-24
EP3331218A4 (en) 2018-07-04
CA2990753A1 (en) 2017-02-02
JP2018521439A (ja) 2018-08-02
US10554737B2 (en) 2020-02-04
JP6615342B2 (ja) 2019-12-04
EP3331218B1 (en) 2022-04-20

Similar Documents

Publication Publication Date Title
WO2017016499A1 (zh) 分布式数据库负载调平的方法和装置
US10862957B2 (en) Dissemination of node metrics in server clusters
US11238041B2 (en) Facilitating query executions via dynamic data block routing
CN104969213A (zh) 用于低延迟数据存取的数据流分割
CN112162865A (zh) 服务器的调度方法、装置和服务器
US9594801B2 (en) Systems and methods for allocating work for various types of services among nodes in a distributed computing system
WO2015196686A1 (zh) 一种数据存储方法以及一种数据存储管理服务器
CN104994156A (zh) 一种集群的负载均衡方法及系统
CN101937474A (zh) 海量数据查询方法及设备
CN109800204B (zh) 数据分配方法及相关产品
WO2006133630A1 (fr) Procede de selection d'un noeud de prise en charge selon un etat de charge
CN103957280A (zh) 一种物联网中的传感网络连接分配和调度方法
CN104038525A (zh) 服务器系统的负载均衡方法及装置
CN113132437B (zh) Cdn调度方法、系统、设备和存储介质
CN103258389B (zh) 自助终端上传文件的方法、系统和自助终端
CN107172193A (zh) 一种基于集群的负载均衡方法及其装置
WO2020094064A1 (zh) 性能优化方法、装置、设备及计算机可读存储介质
CN106603631A (zh) 分布式消息系统及扩容方法
CN106793093A (zh) 一种业务处理方法及装置
CN109918366B (zh) 一种基于大数据的数据安全处理方法
CN108255825A (zh) 用于动态分配数据库连接的方法和装置
CN107480229B (zh) 用于对象检索的分布式计算机数据库系统及其检索方法
CN113391891B (zh) 基于Rete和字符串模式匹配算法的负载均衡资源调度方法
WO2023123367A1 (zh) 基于业务统计互补特征的数据中心多虚拟网络联合映射方法
CN111382196B (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: 16829864

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2990753

Country of ref document: CA

ENP Entry into the national phase

Ref document number: 20187000181

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2016299084

Country of ref document: AU

Date of ref document: 20160728

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2018522846

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2016829864

Country of ref document: EP