CN116781707A - Load balancing method and device, electronic equipment and storage medium - Google Patents

Load balancing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116781707A
CN116781707A CN202211633020.3A CN202211633020A CN116781707A CN 116781707 A CN116781707 A CN 116781707A CN 202211633020 A CN202211633020 A CN 202211633020A CN 116781707 A CN116781707 A CN 116781707A
Authority
CN
China
Prior art keywords
cluster
percentage
overload
storage
data volume
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202211633020.3A
Other languages
Chinese (zh)
Inventor
胡振宇
鲁桃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
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 China Mobile Communications Group Co Ltd, China Mobile Suzhou Software Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202211633020.3A priority Critical patent/CN116781707A/en
Publication of CN116781707A publication Critical patent/CN116781707A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The application discloses a load balancing method, a load balancing device, electronic equipment and a storage medium, wherein the method comprises the following steps: analyzing the load state of the first cluster to obtain an analysis result; under the condition that the analysis result represents that the first cluster has a capacity overload trend, a first setting model is called to adjust the super-percentage of the first cluster from a first super-percentage to a second super-percentage; the second percentage is less than the first percentage; and under the condition that the analysis result represents that the first cluster is overloaded in performance, performing current limiting processing on the first PG of the first cluster and/or a first virtual machine accessing the first cluster.

Description

Load balancing method and device, electronic equipment and storage medium
Technical Field
The application belongs to the technical field of cloud computing, and particularly relates to a load balancing method, a load balancing device, electronic equipment and a storage medium.
Background
In the cloud computing field, the available storage resources in the cloud resource pool are generally different from the storage resources actually used by clients, and a cloud resource pool operator can bear more clients as much as possible in a super-selling mode, but the super-selling of the storage resources sometimes causes overload of a storage cluster of the cloud resource pool, so that the processing effect of the prior art on the overload problem of the storage cluster is poor.
Disclosure of Invention
In view of the above, embodiments of the present application provide a load balancing method, apparatus, electronic device, and storage medium, so as to at least solve the problem of poor processing effect of the overload problem of the storage cluster in the prior art.
The technical scheme of the embodiment of the application is realized as follows:
the embodiment of the application provides a load balancing method, which comprises the following steps:
analyzing the load state of the first cluster to obtain an analysis result;
under the condition that the analysis result represents that the first cluster has a capacity overload trend, a first setting model is called to adjust the super-percentage of the first cluster from a first super-percentage to a second super-percentage; the second percentage is less than the first percentage;
and carrying out current limiting processing on a first collocation Group (PG) of the first cluster and/or a first virtual machine accessing the first cluster under the condition that the analysis result represents that the first cluster is overloaded in performance.
In the above solution, the analyzing the load state of the first cluster to obtain an analysis result includes:
acquiring the actual usage amount and/or the residual usage amount of the first cluster storage resources at intervals of set time;
judging that the first cluster has a capacity overload trend under the condition that the tangential slope of the first curve is larger than a first set threshold value and/or the first time is smaller than a second set threshold value; wherein,,
The first curve is obtained based on the obtained actual usage of the first cluster storage resources in a fitting mode; the first time characterizes a time available for use of a remaining usage of the first cluster.
In the above scheme, the method further comprises:
calculating to obtain the second percentage based on the ratio of the residual usage of the storage resources of the first cluster in the total capacity of the storage resources, the ratio of the number of users borne by the first cluster in the maximum number of users capable of bearing the load, and a reference bearing capacity value; wherein,,
the reference bearing capacity value is determined based on at least one of an object storage process (OSD, object Storage Daemon) node number and a hard disk performance parameter of the first cluster.
In the above scheme, the method further comprises:
invoking a second setting model to predict the actual usage of the ordered next data volume by the first type of user;
based on the prediction result of the second setting model, calling a third setting model to determine the optimal cluster for bearing the next data volume ordered by the first type user;
wherein the second setting model is obtained based on the actual usage amount of each data volume ordered by the first type user and the user information training of the first type user; the user information of the first type user comprises at least one of the number of data volumes subscribed by the first type user, the level of the first type user, the online time length of the first type user and the total subscription capacity of the data volumes of the first type user.
In the above scheme, the method further comprises:
selecting a first PG for current limiting treatment from at least one second PG; the second PG represents PG corresponding to a first data volume of the first cluster; and/or the number of the groups of groups,
selecting a virtual machine corresponding to a first data volume of the first cluster as a first virtual machine for current limiting; wherein,,
the first data volume represents a data volume with the total flow being greater than a third set threshold value, or represents the first N data volumes with the maximum total flow in the first cluster; and N is greater than or equal to 1.
In the above scheme, selecting the first PG performing the current limiting process from the at least one second PG includes:
calculating a first weight value of each second PG based on the flow change condition of the second PG in the first time period, the flow overload baseline of the first cluster and the total PG number of the first cluster; wherein the first time period characterizes a time period between when traffic of the first cluster reaches a traffic overload baseline threshold of the first cluster to when performance overload of the first cluster occurs;
calculating a second weight value of each second PG based on the duty ratio of the current number of times of reading and writing operations (IOPS, input/Output Operations Per Second) value of the second PG to the current total IOPS value of the first cluster;
Calculating a third weight value of each second PG based on the first weight value and the second weight value corresponding to each second PG;
selecting the first M PGs with the largest third weight value in the second PGs as the first PG; and M is greater than or equal to 1.
In the above solution, the performing the current limiting process on the first PG of the first cluster includes:
setting the current read-write speed of the first PG as the upper limit of the read-write speed of the first PG and/or setting the current IOPS value of the first PG as the upper limit of the IOPS value of the first PG;
when the first PG receives a first data read-write request, the first PG is controlled to buffer the first data read-write request and delay the set time for processing.
In the above solution, the performing the current limiting processing on the first virtual machine accessing the first cluster includes:
and setting the current average read-write speed of the virtual machines corresponding to all the data volumes in the first cluster as the read-write speed of the first virtual machine.
The embodiment of the application also provides a load balancing device, which comprises:
the analysis module is used for analyzing the load state of the first cluster to obtain an analysis result;
the adjustment module is used for calling a first setting model to adjust the super-percentage of the first cluster from a first super-percentage to a second super-percentage under the condition that the analysis result represents that the first cluster has a capacity overload trend; the second percentage is less than the first percentage;
The current limiting module is used for carrying out current limiting processing on the first PG of the first cluster and/or the first virtual machine accessing the first cluster under the condition that the analysis result represents that the first cluster is overloaded in performance.
The embodiment of the application also provides electronic equipment, which comprises: a processor and a communication interface; wherein,,
the processor is configured to:
analyzing the load state of the first cluster to obtain an analysis result;
under the condition that the analysis result represents that the first cluster has a capacity overload trend, a first setting model is called to adjust the super-percentage of the first cluster from a first super-percentage to a second super-percentage; the second percentage is less than the first percentage;
and under the condition that the analysis result represents that the first cluster is overloaded in performance, performing current limiting processing on the first PG of the first cluster and/or a first virtual machine accessing the first cluster.
The embodiment of the application also provides electronic equipment, which comprises: a processor and a memory for storing a computer program capable of running on the processor,
the processor is configured to execute the steps of any one of the load balancing methods when running the computer program.
The embodiment of the application also provides a storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of any of the load balancing methods described above.
In the scheme of the embodiment of the application, the load state of the first cluster is analyzed to obtain an analysis result; under the condition that the analysis result represents that the first cluster has a capacity overload trend, the set model is used for adjusting the super-percentage of the first cluster from the first super-percentage to the second super-percentage; the second percentage is less than the first percentage; and under the condition that the analysis result represents that the first cluster is overloaded in performance, performing current limiting processing on the first PG of the first cluster and/or the first virtual machine accessing the first cluster. According to the scheme provided by the embodiment of the application, the super-ratio of the cluster is reduced under the condition that the cluster has a capacity overload trend, the problem of cluster capacity overload caused by sudden increase of the resource utilization rate of users and insufficient cluster resource quantity is effectively solved, and the problem of cluster performance overload caused by sudden maximum read-write storage flow of users is effectively solved by carrying out current limiting processing on PG of the cluster and/or virtual machines accessing the cluster under the condition that the cluster has performance overload.
Drawings
Fig. 1 is a schematic flow chart of a load balancing method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an overload-resistant system of a cloud resource pool storage cluster based on ceph provided by an application embodiment of the present application;
FIG. 3 is a schematic diagram of overload resistance of a storage cluster according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a portion of overload-discovery resistance for storage cluster performance provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of a portion of overload-flow control for storage cluster performance provided by an embodiment of the present application;
FIG. 6 is a schematic diagram of a portion of overload-storage migration resistance for storage cluster performance provided by an embodiment of the present application;
fig. 7 is a schematic structural diagram of a load balancing device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In the cloud computing field, the available storage resources in the cloud resource pool are generally different from the actual used resources of the clients, and the cloud resource pool operators can use the means of overstocking to bear more clients as much as possible. However, overstock of storage resources sometimes causes insufficient storage cluster resources due to sudden increase of resource utilization rate of part of users, so that capacity overload problem occurs in the storage cluster, and sometimes causes slow cluster response due to sudden maximum storage flow of part of users, so that performance overload problem occurs in the storage cluster.
Based on the method and the device, the electronic equipment and the storage medium are provided. According to the scheme provided by the embodiment of the application, the super-ratio of the cluster is reduced under the condition that the cluster has a capacity overload trend, the problem of cluster capacity overload caused by sudden increase of the resource utilization rate of users and insufficient cluster resource quantity is effectively solved, and the problem of cluster performance overload caused by sudden maximum read-write storage flow of users is effectively solved by carrying out current limiting processing on PG of the cluster and/or virtual machines accessing the cluster under the condition that the cluster has performance overload.
The application will be described in further detail with reference to the accompanying drawings and specific examples.
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
The embodiment of the application provides a load balancing method, as shown in fig. 1, comprising the following steps:
Step 101: and analyzing the load state of the first cluster to obtain an analysis result.
Here, the first cluster may be a storage cluster based on ceph, which is a distributed storage system. The load status of the first cluster may include the actual usage of the storage resources of the first cluster and the operational status of the first cluster (e.g., IO bandwidth, IO access latency, number of access requests, etc.).
Here, the storage resources of the first cluster are in the form of data volumes.
In an embodiment, the analyzing the load status of the first cluster to obtain an analysis result includes:
acquiring the actual usage amount and/or the residual usage amount of the first cluster storage resources at intervals of set time;
judging that the first cluster has a capacity overload trend under the condition that the tangential slope of the first curve is larger than a first set threshold value and/or the first time is smaller than a second set threshold value; wherein,,
the first curve is obtained based on the obtained actual usage of the first cluster storage resources in a fitting mode; the first time characterizes a time available for use of a remaining usage of the first cluster.
And analyzing the trend of the utilization rate of the first cluster storage resources, and judging that the first cluster has a capacity overload trend when the trend of the utilization rate of the first cluster storage resources increases faster.
In practical application, the first curve can be obtained by fitting based on an S-curve fitting algorithm, and the main fitting formula is as follows:
wherein x is a time value, y is an actual usage amount of the first cluster storage resource, α, β, γ are coefficients to be determined, and the coefficients need to be obtained by continuous fitting of samples, and preferably, the actual usage amount of the first cluster storage resource obtained by sampling every 5 minutes can be used as a sample.
Preferably, when the tangential slope of the first curve is greater than 0.5 and the available time of the remaining usage of the first cluster is less than 6 hours, it is determined that the first cluster has a capacity overload tendency.
Step 102: and under the condition that the analysis result represents that the first cluster has a capacity overload trend, a first setting model is called to adjust the super-percentage of the first cluster from a first super-percentage to a second super-percentage.
Wherein the second percentage is less than the first percentage.
Here, when there is a capacity overload trend of the first cluster, the super-percentage of the first cluster is reduced. If the creation requirement of the storage resource is found in the following process, the storage resource is created on the first cluster with smaller probability, so that the problem of cluster capacity overload caused by sudden increase of the resource utilization rate of the user and insufficient cluster resource amount can be effectively solved.
In an embodiment, the method further comprises:
calculating to obtain the second percentage based on the ratio of the residual usage of the storage resources of the first cluster in the total capacity of the storage resources, the ratio of the number of users borne by the first cluster in the maximum number of users capable of bearing the load, and a reference bearing capacity value; wherein,,
the reference bearing capacity value is determined based on at least one of a number of OSD nodes of an object storage process of the first cluster and a hard disk performance parameter.
In practical applications, the second percentage may be calculated according to the following formula:
wherein R is a second percentage, n is the actual usage of the storage resources of the first cluster, m is the total capacity of the storage resources of the first cluster, l is the number of users already borne by the first cluster, l m And the base is a reference bearing capacity value of the first cluster for the maximum number of the loadable users of the first cluster.
In an embodiment, when the first cluster has a capacity overload trend, the data volume with a larger actual usage amount in the first cluster may be migrated to another storage cluster with a lower storage resource usage rate. The determination criteria for the actual usage amount of the data volume and the determination criteria for the usage rate of the storage resource may be set by themselves. Preferably, the migration of the data volumes may be performed by adopting a thermal migration manner, which is simply to create an empty data volume on a storage cluster with low storage resource usage, and copy the data volume with a larger actual usage amount in the first cluster to the empty data volume. Therefore, the storage resource utilization rate of each storage cluster can be dynamically balanced, and the problem of cluster capacity overload caused by sudden increase of the resource utilization rate of users and insufficient cluster resource amount is effectively solved.
In an embodiment, the method further comprises:
invoking a second setting model to predict the actual usage of the ordered next data volume by the first type of user;
based on the prediction result of the second setting model, calling a third setting model to determine the optimal cluster for bearing the next data volume ordered by the first type user;
wherein the second setting model is obtained based on the actual usage amount of each data volume ordered by the first type user and the user information training of the first type user; the user information of the first type user comprises at least one of the number of data volumes subscribed by the first type user, the level of the first type user, the online time length of the first type user and the total subscription capacity of the data volumes of the first type user.
Here, the users are classified according to the number of data volumes ordered by different users, the number of data volumes ordered by each user is the same, and each user has a corresponding second setting model. The storage resources are in the form of data volumes, each of which may vary in capacity.
Preferably, the prediction is performed on users who subscribe to more storage resources, and the judgment standard of how much to subscribe to the storage resources can be set by themselves.
In practical application, the third setting model can be understood as an evaluation algorithm, and the evaluated dimension can include the actual usage of the data volume, the selling condition of storage resources of different storage clusters and the percentages of different storage clusters.
In practical applications, the second setting model may be preferably a Back Propagation (BP) neural network model, through which the actual usage of the next data volume ordered by the user is predicted. The estimation method comprises the following steps:
(1) The users are classified according to the data volumes ordered by different numbers, and the number of the data volumes ordered by each type of users is the same. The actual usage of each data volume ordered by the user and the user information are collected as model samples.
(2) And establishing a 3-layer neural network model by using a BP neural network algorithm. For different types of users, the data (including the actual usage amount of each data volume ordered by the user and the user information) of the corresponding type of users are used for training after modeling.
(3) For an input layer in the BP neural network model, user data such as the number of data volumes ordered by a user, the grade of the user (such as the grade of a VIP (VIP, very Important Person)), the online time of the user, the total ordering capacity of the data volumes of the user, the actual usage amount of each data volume ordered by the user for history and the like are used as input, and the node number n of the input layer is determined according to the following formula:
n=m+4
Where m is the number of data volumes ordered by the user.
(4) The model total samples are divided into training samples and verification samples, and the samples are expressed as follows:
(m,V i ,L,volume sum ,volume 1 ,volume 2 ...volume i )
wherein V is i For the VIP level of the user, L is the online time length of the user, volume sum Volume for the total subscription capacity of a user's data volume i Is the actual usage of the ith data volume.
(5) For the hidden layer in the BP neural network model, the value interval of the initial hidden node number f (x) should satisfy the following relationship:
where m is the number of data volumes ordered by the user, s is the average number of ordered data volumes for all types of users, and k is the number of training samples.
(6) The initial number interval of the hidden nodes is recorded as [ a, b ], 3 BP neural network models are respectively constructed by using a, b, (a+b/2), model training is carried out by using training samples, model performance verification is carried out by using verification samples, and error value E is recorded. If the model error value established using the a, (a+b/2) parameters is smaller than the model error value established using the b, (a+b/2) parameters, the optimal node number should be in the [ a, (a+b/2) ] interval, otherwise in the [ (a+b/2), b ]. And narrowing the hidden node number interval through continuous training, and finally finding the optimal hidden node number.
(7) For the output layer in the BP neural network model, the actual usage of the next data volume ordered by the user is predicted by taking the model into consideration, and the model is designed to be 1 node.
(8) The initial weight in BP neural network model is selected as random number between [ -2.4/n,2.4/n ], where n is the number of nodes in input layer.
(9) BP neural network activation function selects Sigmoid function, i.e
(10) The back propagation error function is selected as follows:
wherein t is i For desired output, o i And (3) calculating and outputting the BP neural network model, wherein i is the ith training.
(11) And training is continuously carried out through the normalized sample, so that an optimal BP neural network model aiming at different types of users is obtained. When the user orders the next data volume, a predicted result of the actual usage amount of the ordered next data volume by the user is obtained through a pre-trained BP neural network model of the user.
And then, according to the prediction result of the actual usage amount of the next data volume ordered by the user, combining the storage resource selling conditions of different storage clusters, the super-percentages of different storage clusters and the like, determining an optimal cluster for carrying the next data volume ordered by the user, and creating the next data volume ordered by the user on the optimal cluster. Therefore, the probability of the condition that the storage resources of the storage cluster are insufficient can be reduced from the source, and the overload of the capacity of the storage cluster can be effectively prevented.
Step 103: and under the condition that the analysis result represents that the first cluster is overloaded in performance, performing current limiting processing on the first PG of the first cluster and/or a first virtual machine accessing the first cluster.
In the embodiment of the application, the problem of cluster performance overload caused by sudden maximum read-write storage flow of a user is effectively solved through the current limiting processing.
In one embodiment, analyzing the load status of the first cluster includes:
analyzing the real-time running state of the first cluster, summarizing overload baselines corresponding to all performance items (including dimensions such as IO bandwidth, IO access delay, access request quantity and the like), setting overload baseline threshold values corresponding to all the performance items, wherein the overload baselines can be used as judgment basis for cluster overload, and judging that the cluster is overloaded when one of the performance values of the cluster reaches the corresponding overload baselines.
And monitoring the state of the cluster in real time, carrying out trend analysis on different performance values of the cluster, and judging that the performance overload trend exists in the cluster when one of the performance values reaches a corresponding overload baseline threshold value and has further deterioration trend. Specifically, trend analysis can be performed on different performance values of the clusters based on an S-curve fitting algorithm, and the main fitting formula is as follows:
Wherein x is a time value, y is a performance value of each cluster, alpha, beta and gamma are coefficients to be determined, the coefficients are required to be obtained through continuous fitting of samples, and preferably, each performance value of each cluster obtained by sampling every 2 minutes can be used as a sample.
Illustratively, a flow overload baseline threshold of the cluster is set to 80% of the flow overload baseline value, when the cluster flow value reaches 80% of the cluster flow overload baseline value, the cluster is judged to have a performance overload trend, and when the cluster flow value reaches the cluster flow overload baseline value, the cluster is judged to have performance overload.
In an embodiment, the method further comprises:
selecting a first PG for current limiting treatment from at least one second PG; the second PG represents PG corresponding to a first data volume of the first cluster; and/or the number of the groups of groups,
selecting a virtual machine corresponding to a first data volume of the first cluster as a first virtual machine for current limiting; wherein,,
the first data volume represents a data volume with the total flow being greater than a third set threshold value, or represents the first N data volumes with the maximum total flow in the first cluster; and N is greater than or equal to 1.
Here, the third setting threshold or the value of N may be set by itself as needed.
In the embodiment of the present application, the first cluster takes a 3-copy ceph storage cluster as an example, and for each data volume, the data volume is segmented into a plurality of objects according to a fixed size, each object is mapped to a PG independently, each PG is copied and stored into 3 OSD nodes, one OSD node is a master OSD node, the remaining two OSD nodes are slave OSD nodes, and the master OSD node is responsible for traffic statistics and reporting to a Monitor (Monitor) node.
In practical application, a traffic statistics mechanism is added to each OSD service of the first cluster, and the manner of calculating the total traffic of the data volume is as follows:
taking a data volume as an example, the main OSD nodes where all PGs corresponding to the data volume (i.e., PGs where objects split by the data volume) are located count the flow of the data volume object in the PG on the node, report the Mon node, and calculate the total flow of the data volume.
The first volume is referred to herein as a high-traffic volume. Under the condition that the first cluster is overloaded in performance, PG is selected from PG corresponding to the large-flow data volume to carry out current limiting processing, and/or virtual machines corresponding to the large-flow data volume are subjected to current limiting processing, so that the problem of overload in cluster performance caused by sudden extremely large read-write storage flow of a user is effectively solved.
In one embodiment, selecting a first PG for current limiting processing among at least one second PG includes:
calculating a first weight value of each second PG based on the flow change condition of the second PG in the first time period, the flow overload baseline of the first cluster and the total PG number of the first cluster; wherein the first time period characterizes a time period between when traffic of the first cluster reaches a traffic overload baseline threshold of the first cluster to when performance overload of the first cluster occurs;
calculating a second weight value of each second PG based on the duty ratio of the current number of read-write operations per second IOPS value of the second PG to the current total IOPS value of the first cluster;
calculating a third weight value of each second PG based on the first weight value and the second weight value corresponding to each second PG;
selecting the first M PGs with the largest third weight value in the second PGs as the first PG; and M is greater than or equal to 1.
Here, the first cluster total PG number is set by itself when creating the first cluster.
In practical applications, the first weight value of PG (i.e., the flow weight value) may be calculated by the following formula:
wherein t is 1 T, at the point in time when the traffic of the first cluster reaches the traffic overload baseline threshold 2 At the point in time when the performance overload occurs for the first cluster,at t 1 Sampling the flow value of PG, +.>At t 2 Sampling the flow value bw of PG c Pg being the traffic overload baseline of the first cluster max And a is an amplification coefficient for the total PG number of the first cluster, and when the value of a is larger, the influence of the flow on the performance overload of the first cluster is considered to be larger.
The second weight value of PG (i.e., IOPS weight value) may be calculated by the following formula:
wherein iops pg IOPS value, IOPS, of PG currently (i.e. when performance overload occurs in the first cluster) obtained by sampling c And b is an amplification coefficient for the current total IOPS value of the first cluster obtained by sampling, and when the value b is larger, the effect of the IOPS value on the performance overload of the first cluster is considered to be larger.
In practical application, when the flow of the first cluster reaches the flow overload baseline threshold of the first cluster (i.e. when the first cluster has a performance overload trend), the total flow of each data volume in the first cluster is obtained, a large-flow data volume in the first cluster is determined, then overload trend analysis is performed on PG corresponding to the large-flow data volume, and the flow value and the IOPS value of PG corresponding to the large-flow data volume are continuously sampled.
The third weight value of PG (i.e., the composite weight value) may be calculated by the following formula:
W=W 1 +W 2
The value of M can be determined by the following formula:
wherein volume is d For the actual size of all high-traffic volumes in the first cluster, obj is the volumeThe size of the object being segmented, x is time, pg max Is the total PG number of the first cluster.
In the embodiment of the application, the comprehensive weight value of the PG corresponding to all the large-flow data volumes is calculated, and the first M PGs (namely the first PG) with the largest comprehensive weight value in the PG corresponding to all the large-flow data volumes are subjected to current limiting treatment. In practical applications, the PGs stored in different OSD nodes may be different, and for each OSD node, there may be no first PG on the OSD node, and some or all of the first PG may also be present. The Mon node in the first cluster informs each OSD node to perform adaptive current limiting, and each OSD node performs current limiting processing on the first PG on the node.
In an embodiment, the performing the current limiting processing on the first PG of the first cluster includes:
setting the current read-write speed of the first PG as the upper limit of the read-write speed of the first PG and/or setting the current IOPS value of the first PG as the upper limit of the IOPS value of the first PG;
when the first PG receives a first data read-write request, the first PG is controlled to buffer the first data read-write request and delay the set time for processing.
In the embodiment of the application, the read-write speed of the first PG obtained by sampling when the performance of the first cluster is overloaded is set as the upper limit of the read-write speed of the first PG, and/or the IOPS value of the first PG obtained by sampling when the performance of the first cluster is overloaded is set as the upper limit of the IOPS value of the first PG.
Here, the first data read-write request may be understood as a data read-write request that would cause the read-write speed or IOPS value of the first PG to exceed an upper limit.
In the embodiment of the application, the PG in each OSD node can be protected from being washed down by large-flow data by carrying out read-write speed limiting and delay processing on the PG to possibly generate an excessive-flow data read-write request, and meanwhile, the whole flow of the cluster can not be increased, so that the cluster can not have further performance overload.
In an embodiment, the performing the current limiting processing on the first virtual machine accessing the first cluster includes:
and setting the current average read-write speed of the virtual machines corresponding to all the data volumes in the first cluster as the read-write speed of the first virtual machine.
Here, the average speed of reading and writing of the virtual machines corresponding to all the data volumes in the first cluster when the performance overload occurs in the first cluster is set as the speed of reading and writing of the first virtual machine.
In the embodiment of the application, the read-write speed of the virtual machine corresponding to the large-flow data volume is exponentially reduced, and only the virtual machine corresponding to the large-flow data volume is allowed to read and write the storage cluster at the average speed, so that the flow access of the virtual machine to the storage cluster is reduced from the source, and the further performance overload of the storage cluster is prevented.
In an embodiment, after exponentially reducing the read-write speed of the virtual machine corresponding to the large-flow data volume, if the first cluster is still in the performance overload state, the speed limit may be continuously performed on the first virtual machine in a linear manner, specifically, the read-write speed of the first virtual machine may be reduced by a set step length each time until the first cluster is no longer in the performance overload state, where the step length may be set according to experience of a developer. Thus, the flow access of the virtual machine to the storage cluster is reduced from the source, and the storage cluster is prevented from further performance overload.
In an embodiment, the large-traffic volume in the first cluster may be migrated to another storage cluster with smaller traffic, so as to thoroughly reduce the traffic pressure of the first cluster. The determination criteria for the traffic of the storage cluster may be set by itself.
In an embodiment, the traffic of the data volume subscribed by the user may be analyzed, the large-traffic users are marked, and the large-traffic users carried by each storage cluster are counted. It should be noted that, the criterion for determining whether the user is a high-traffic user or not and how many high-traffic users the storage cluster carries may be set by itself.
As shown in fig. 2, an embodiment of the present application provides a ceph-based cloud resource pool storage cluster overload protection system, where the system includes:
the operation and maintenance analysis platform is in charge of user resource use condition analysis, user resource actual use amount estimation, overload baseline configuration, overload trend monitoring analysis and large-flow data volume discovery;
the operation and maintenance management platform is responsible for dynamic hyper-percentage configuration of a storage cluster, dynamic storage balancing, dynamic current limiting at the front end and cloud resource pool management interface calling;
the back-end storage cluster is responsible for actually storing user data and executing self-adaptive current limiting work;
and the cloud resource pool computing node is responsible for bearing the user virtual machine and reading and writing the back-end storage cluster.
The system uses means such as user resource use condition analysis, user resource actual use amount estimation, dynamic super-percentage configuration, dynamic storage equalization and the like to realize overload resistance of the storage cluster capacity; overload baseline configuration, overload trend monitoring analysis, large-flow data volume discovery, cluster self-adaptive current limiting, front-end dynamic current limiting and other means are used for realizing overload resistance of the storage cluster.
1. Storage cluster capacity overload resistance
The capacity overload of the storage cluster, namely for a super-sold storage cluster, when the actual usage amount of the storage resources of the user is large, the total capacity of the storage resources of the storage cluster is insufficient. The following describes a method for overload resistance of the storage cluster capacity, see fig. 3:
1.1 estimation of actual usage of user resources
The operation and maintenance analysis platform analyzes the utilization rate of the storage resources aiming at the users ordering more storage resources, estimates the utilization condition of the storage resources of the users through analyzing the historical utilization condition of the resources of the users, and estimates the actual utilization amount of the ordered storage resources through the BP neural network model when the users order the storage resources again. The estimation method is detailed in the foregoing embodiments, and will not be described herein.
And according to the actual usage prediction result of the data volume, combining the resource selling conditions of different storage clusters to obtain an optimal bearing cluster, and notifying an operation and maintenance management platform to create the storage resources. And after receiving the resource creation request, the operation and maintenance management platform forwards the request to a cloud resource pool control console (cloud resource pool computing node) for actual resource creation.
1.2 dynamic superstrate configuration
The operation and maintenance analysis platform analyzes the trend of the utilization rate of the storage cluster resources (see 1.3 user resource utilization condition analysis) aiming at each storage cluster, and when the trend of the utilization rate of the storage cluster resources increases faster, the operation and maintenance management platform is notified. And after receiving the message, the operation and maintenance management platform dynamically reduces the over-percentage configuration of the storage resource pool. Subsequent storage resource requirements will be created with less probability on low-superstrate storage clusters. The formula of the excess ratio is detailed in the previous embodiment, and will not be described here again.
1.3 user resource usage analysis
The operation and maintenance analysis platform analyzes the use trend of the storage resources of the user, and when the storage cluster has the capacity overload trend, the operation and maintenance management platform is informed in time. The trend analysis method is detailed in the foregoing embodiments, and will not be described herein.
1.4 storage dynamic equalization
And when the overload trend of the storage clusters occurs, the operation and maintenance management platform calls the cloud resource pool interface according to the analysis result of the operation and maintenance analysis platform, and transfers larger data volumes in the storage clusters which are possibly overloaded, wherein the transfer target is the storage clusters with lower resource utilization rate.
2. Storage cluster performance overload resistance
And the performance of the storage cluster is overloaded, namely IO delay, blocking and the like of the storage cluster are caused by overlarge read-write storage flow of a user. The following describes a method for overload resistance of storage cluster performance:
2.1 overload discovery
For performance overload, the remedy is performed after the overload is found in advance and prevented, and the overload finding means is as follows, see fig. 4:
1. overload baseline configuration: the actual running state of the cloud resource pool storage cluster is acquired in real time through a testing environment pressure measurement and operation and maintenance analysis platform, and an overload baseline is analyzed and summarized, wherein the dimensions including IO bandwidth, IO access delay, access request quantity and the like are used as judgment basis of cluster overload and are configured into the operation and maintenance analysis platform.
2. Overload trend monitoring analysis: and monitoring the cluster state in real time through an operation and maintenance analysis platform, carrying out trend analysis, and setting an overload baseline threshold value. When the performance item reaches an overload baseline threshold value and has further deterioration trend, the cluster is considered to be possible to be overloaded, and an overload alarm is generated to inform the operation and maintenance management platform. The trend analysis method is detailed in the foregoing embodiments, and will not be described herein. Different storage clusters, different performance values may be different.
3. High-traffic data volume discovery:
(1) And carrying out customized development aiming at the open source version ceph to finish a data volume flow size query interface in the storage cluster: in each OSD service of the storage cluster, a flow statistics mechanism is added, taking a 3-copy ceph storage cluster as an example, for each data volume, the flow of the PG is counted by the OSD of all main PGs of the data volume, and a Mon node is reported, the Mon node calculates the total flow of the complete data volume according to the reported flow of all PGs contained in the data volume, and after the flow calculation of all the data volumes is completed, the data volumes are ordered according to the flow.
(2) When the cluster overload trend occurs, the operation and maintenance analysis platform calls the customized interface to acquire the current flow of each data volume for the next processing.
2.2 flow control
When overload trend occurs, cluster overload resistance can be realized through current limiting and migration means. In the current limiting scheme, the method is divided into two parts, namely adaptive current limiting and front-end dynamic current limiting of a storage cluster, see fig. 5:
1. cluster adaptive current limiting
The self-adaptive current limiting function of the storage cluster is customized and developed in the open source version ceph, and the self-adaptive current limiting logic is as follows:
(1) When the cluster overload condition does not occur, the read-write speed of each main PG is set to be the upper limit of the network card bandwidth of the OSD node, namely, the network card bandwidth is not limited.
(2) And when the cluster traffic is greater than the traffic overload baseline threshold, carrying out overload trend analysis on each PG in all the large-traffic data volumes, and respectively sampling the traffic and the IOPS of each PG.
(3) When the cluster is about to overload, the operation and maintenance management platform informs the Mon node of the ceph cluster to trigger the cluster self-adaptive current limiting, and the details are described in the previous embodiment, and the description is omitted here.
2. Front-end dynamic current limiting
According to overload trend monitoring analysis and large-flow data volume discovery of the consignment and maintenance analysis platform, when overload condition occurs, the operation and maintenance management platform obtains the large-flow data volume in the current storage cluster, and invokes the current limiting interface of the cloud host bottom virtualization software libvirt, and a linear-exponential reduction method is adopted, which is detailed in the previous embodiment and is not repeated here.
2.3 storage migration and resource isolation
After the current limiting means is used to control the cluster load, the means of migrating large-flow volumes, isolating storage resources and the like are also needed to solve the overload problem, see fig. 6:
1. storage migration: when the operation and maintenance management platform receives the overload information, the cluster can be prevented from being further overloaded by using a current limiting means, but the flow pressure of the storage cluster is thoroughly reduced by a large-flow data volume migration mode. And the operation and maintenance management platform requests to acquire the large-flow data volume from the operation and maintenance analysis platform, calls a cloud resource pool storage migration interface and migrates the large-flow data volume to a storage cluster with lower flow.
2. Storage resource isolation: the operation and maintenance analysis platform performs statistics and analysis on the flow of the user data volume, marks the large-flow users, counts the large-flow users borne by each cluster, and then informs the operation and maintenance management platform. The operation and maintenance management platform stores the information of the large-flow users, when the large-flow users subscribe the data volumes again, the operation and maintenance analysis platform notifies the operation and maintenance management platform, the operation and maintenance management platform calls the cloud resource pool interface, the data volumes are created in the storage clusters bearing less large-flow users, and storage resource isolation among the large-flow users is achieved.
In order to implement the method of the embodiment of the present application, the embodiment of the present application further provides a load balancing device, as shown in fig. 7, where the load balancing device 700 includes:
the analysis module 701 is configured to analyze a load state of the first cluster to obtain an analysis result;
the adjusting module 702 is configured to, when the analysis result indicates that the first cluster has a capacity overload trend, invoke a first setting model to adjust the super-percentage of the first cluster from a first super-percentage to a second super-percentage; the second percentage is less than the first percentage;
and the current limiting module 703 is configured to perform a current limiting process on the first PG of the first cluster and/or the first virtual machine accessing the first cluster if the analysis result indicates that the first cluster is overloaded.
In an embodiment, the analysis module 701 is configured to:
acquiring the actual usage amount and/or the residual usage amount of the first cluster storage resources at intervals of set time;
judging that the first cluster has a capacity overload trend under the condition that the tangential slope of the first curve is larger than a first set threshold value and/or the first time is smaller than a second set threshold value; wherein,,
the first curve is obtained based on the obtained actual usage of the first cluster storage resources in a fitting mode; the first time characterizes a time available for use of a remaining usage of the first cluster.
In an embodiment, the device further comprises:
the first calculation module is used for calculating the second percentage based on the ratio of the residual usage of the storage resources of the first cluster in the total capacity of the storage resources, the ratio of the number of users borne by the first cluster in the maximum number of users borne by the first cluster, and a reference bearing capacity value; wherein,,
the reference bearing capacity value is determined based on at least one of a number of OSD nodes of an object storage process of the first cluster and a hard disk performance parameter.
In an embodiment, the device further comprises:
the prediction module is used for calling a second setting model to predict the actual usage of the ordered next data volume by the first type user;
the determining module is used for calling a third setting model to determine the optimal cluster for bearing the next data volume ordered by the first type user based on the prediction result of the second setting model;
wherein the second setting model is obtained based on the actual usage amount of each data volume ordered by the first type user and the user information training of the first type user; the user information of the first type user comprises at least one of the number of data volumes subscribed by the first type user, the level of the first type user, the online time length of the first type user and the total subscription capacity of the data volumes of the first type user.
In an embodiment, the device further comprises:
the selecting module is used for selecting a first PG for carrying out current limiting treatment from at least one second PG; the second PG represents PG corresponding to a first data volume of the first cluster; and/or the number of the groups of groups,
selecting a virtual machine corresponding to a first data volume of the first cluster as a first virtual machine for current limiting; wherein,,
the first data volume represents a data volume with the total flow being greater than a third set threshold value, or represents the first N data volumes with the maximum total flow in the first cluster; and N is greater than or equal to 1.
In an embodiment, when the selection module selects a first PG for performing the current limiting process from at least one second PG, the selection module is configured to:
calculating a first weight value of each second PG based on the flow change condition of the second PG in the first time period, the flow overload baseline of the first cluster and the total PG number of the first cluster; wherein the first time period characterizes a time period between when traffic of the first cluster reaches a traffic overload baseline threshold of the first cluster to when performance overload of the first cluster occurs;
calculating a second weight value of each second PG based on the duty ratio of the current number of read-write operations per second IOPS value of the second PG to the current total IOPS value of the first cluster;
Calculating a third weight value of each second PG based on the first weight value and the second weight value corresponding to each second PG;
selecting the first M PGs with the largest third weight value in the second PGs as the first PG; and M is greater than or equal to 1.
In one embodiment, the current limiting module 703 is configured to, when performing a current limiting process on the first PG of the first cluster:
setting the current read-write speed of the first PG as the upper limit of the read-write speed of the first PG and/or setting the current IOPS value of the first PG as the upper limit of the IOPS value of the first PG;
when the first PG receives a first data read-write request, the first PG is controlled to buffer the first data read-write request and delay the set time for processing.
In one embodiment, the current limiting module 703 is configured to, when performing a current limiting process on a first virtual machine accessing the first cluster:
and setting the current average read-write speed of the virtual machines corresponding to all the data volumes in the first cluster as the read-write speed of the first virtual machine.
In practice, the modules included in the apparatus may be implemented by a processor in the apparatus, such as a central processing unit (CPU, central Processing Unit), a digital signal processor (DSP, digital Signal Processor), a micro control unit (MCU, microcontroller Unit), or a programmable gate array (FPGA, field-Programmable Gate Array), or by a combination of the processor and a communication interface.
It should be noted that: in the apparatus provided in the above embodiment, only the division of each program module is used for illustration when load balancing is performed, and in practical application, the processing allocation may be performed by different program modules according to needs, that is, the internal structure of the apparatus is divided into different program modules, so as to complete all or part of the processing described above. In addition, the device provided in the above embodiment and the load balancing method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which is not described herein again.
Based on the hardware implementation of the program modules, and in order to implement the method of the embodiment of the present application, the embodiment of the present application further provides an electronic device. Fig. 8 is a schematic diagram of a hardware composition structure of an electronic device according to an embodiment of the present application, where, as shown in fig. 8, the electronic device includes:
a communication interface 1 capable of information interaction with other devices such as network devices and the like;
and the processor 2 is connected with the communication interface 1 to realize information interaction with other equipment, and is used for executing the method provided by one or more technical schemes on the electronic equipment side when running the computer program. And the computer program is stored on the memory 3.
Specifically, in an embodiment, the processor 2 is configured to:
analyzing the load state of the first cluster to obtain an analysis result;
under the condition that the analysis result represents that the first cluster has a capacity overload trend, a first setting model is called to adjust the super-percentage of the first cluster from a first super-percentage to a second super-percentage; the second percentage is less than the first percentage;
and under the condition that the analysis result represents that the first cluster is overloaded in performance, performing current limiting processing on the first PG of the first cluster and/or a first virtual machine accessing the first cluster.
In an embodiment, the processor 2 is configured to, when analyzing the load status of the first cluster to obtain an analysis result:
acquiring the actual usage amount and/or the residual usage amount of the first cluster storage resources at intervals of set time;
judging that the first cluster has a capacity overload trend under the condition that the tangential slope of the first curve is larger than a first set threshold value and/or the first time is smaller than a second set threshold value; wherein,,
the first curve is obtained based on the obtained actual usage of the first cluster storage resources in a fitting mode; the first time characterizes a time available for use of a remaining usage of the first cluster.
In an embodiment, the processor 2 is configured to:
calculating to obtain the second percentage based on the ratio of the residual usage of the storage resources of the first cluster in the total capacity of the storage resources, the ratio of the number of users borne by the first cluster in the maximum number of users capable of bearing the load, and a reference bearing capacity value; wherein,,
the reference bearing capacity value is determined based on at least one of a number of OSD nodes of an object storage process of the first cluster and a hard disk performance parameter.
In an embodiment, the processor 2 is configured to:
invoking a second setting model to predict the actual usage of the ordered next data volume by the first type of user;
based on the prediction result of the second setting model, calling a third setting model to determine the optimal cluster for bearing the next data volume ordered by the first type user;
wherein the second setting model is obtained based on the actual usage amount of each data volume ordered by the first type user and the user information training of the first type user; the user information of the first type user comprises at least one of the number of data volumes subscribed by the first type user, the level of the first type user, the online time length of the first type user and the total subscription capacity of the data volumes of the first type user.
In an embodiment, the processor 2 is configured to:
selecting a first PG for current limiting treatment from at least one second PG; the second PG represents PG corresponding to a first data volume of the first cluster; and/or the number of the groups of groups,
selecting a virtual machine corresponding to a first data volume of the first cluster as a first virtual machine for current limiting; wherein,,
the first data volume represents a data volume with the total flow being greater than a third set threshold value, or represents the first N data volumes with the maximum total flow in the first cluster; and N is greater than or equal to 1.
In an embodiment, when the processor 2 selects the first PG for the current limiting process from the at least one second PG, the processor is configured to:
calculating a first weight value of each second PG based on the flow change condition of the second PG in the first time period, the flow overload baseline of the first cluster and the total PG number of the first cluster; wherein the first time period characterizes a time period between when traffic of the first cluster reaches a traffic overload baseline threshold of the first cluster to when performance overload of the first cluster occurs;
calculating a second weight value of each second PG based on the duty ratio of the current number of read-write operations per second IOPS value of the second PG to the current total IOPS value of the first cluster;
Calculating a third weight value of each second PG based on the first weight value and the second weight value corresponding to each second PG;
selecting the first M PGs with the largest third weight value in the second PGs as the first PG; and M is greater than or equal to 1.
In one embodiment, the processor 2 is configured to, when performing the current limiting processing on the first PG of the first cluster:
setting the current read-write speed of the first PG as the upper limit of the read-write speed of the first PG and/or setting the current IOPS value of the first PG as the upper limit of the IOPS value of the first PG;
when the first PG receives a first data read-write request, the first PG is controlled to buffer the first data read-write request and delay the set time for processing.
In an embodiment, the processor 2 is configured to, when performing the current limiting processing on the first virtual machine accessing the first cluster:
and setting the current average read-write speed of the virtual machines corresponding to all the data volumes in the first cluster as the read-write speed of the first virtual machine.
It should be noted that: the specific processing of the processor 2 and the communication interface 1 can be understood with reference to the above-described method.
Of course, in practice, the various components in the electronic device are coupled together by a bus system 4. It will be appreciated that the bus system 4 is used to enable connected communications between these components. The bus system 4 comprises, in addition to a data bus, a power bus, a control bus and a status signal bus. But for clarity of illustration the various buses are labeled as bus system 4 in fig. 8.
The memory 3 in the embodiment of the present application is used to store various types of data to support the operation of the electronic device. Examples of such data include: any computer program for operating on an electronic device.
It will be appreciated that the memory 3 may be either volatile memory or nonvolatile memory, and may include both volatile and nonvolatile memory. Wherein the nonvolatile Memory may be Read Only Memory (ROM), programmable Read Only Memory (PROM, programmable Read-Only Memory), erasable programmable Read Only Memory (EPROM, erasable Programmable Read-Only Memory), electrically erasable programmable Read Only Memory (EEPROM, electrically Erasable Programmable Read-Only Memory), magnetic random access Memory (FRAM, ferromagnetic random access Memory), flash Memory (Flash Memory), magnetic surface Memory, optical disk, or compact disk Read Only Memory (CD-ROM, compact Disc Read-Only Memory); the magnetic surface memory may be a disk memory or a tape memory. The volatile memory may be random access memory (RAM, random Access Memory), which acts as external cache memory. By way of example, and not limitation, many forms of RAM are available, such as static random access memory (SRAM, static Random Access Memory), synchronous static random access memory (SSRAM, synchronous Static Random Access Memory), dynamic random access memory (DRAM, dynamic Random Access Memory), synchronous dynamic random access memory (SDRAM, synchronous Dynamic Random Access Memory), double data rate synchronous dynamic random access memory (ddr SDRAM, double Data Rate Synchronous Dynamic Random Access Memory), enhanced synchronous dynamic random access memory (ESDRAM, enhanced Synchronous Dynamic Random Access Memory), synchronous link dynamic random access memory (SLDRAM, syncLink Dynamic Random Access Memory), direct memory bus random access memory (DRRAM, direct Rambus Random Access Memory). The memory 3 described in the embodiments of the present application is intended to comprise, without being limited to, these and any other suitable types of memory.
The method disclosed in the above embodiment of the present application may be applied to the processor 2 or implemented by the processor 2. The processor 2 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in the processor 2 or by instructions in the form of software. The processor 2 described above may be a general purpose processor, DSP, or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. The processor 2 may implement or perform the methods, steps and logic blocks disclosed in embodiments of the present application. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiment of the application can be directly embodied in the hardware of the decoding processor or can be implemented by combining hardware and software modules in the decoding processor. The software modules may be located in a storage medium in the memory 3 and the processor 2 reads the program in the memory 3 to perform the steps of the method described above in connection with its hardware.
Optionally, when the processor 2 executes the program, a corresponding flow implemented by the first gateway device in each method of the embodiment of the present application is implemented, and for brevity, will not be described herein again.
In an exemplary embodiment, the application also provides a storage medium, i.e. a computer storage medium, in particular a computer readable storage medium, for example comprising a memory 3 storing a computer program executable by the processor 2 of the electronic device for performing the steps of the method described above. The computer readable storage medium may be FRAM, ROM, PROM, EPROM, EEPROM, flash Memory, magnetic surface Memory, optical disk, or CD-ROM.
In several embodiments provided in the present application, it should be understood that the disclosed apparatus, first gateway device and method may be implemented in other manners. The above described device embodiments are only illustrative, e.g. the division of the units is only one logical function division, and there may be other divisions in practice, such as: multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. In addition, the various components shown or discussed may be coupled or directly coupled or communicatively coupled to each other via some interface, whether indirectly coupled or communicatively coupled to devices or units, whether electrically, mechanically, or otherwise.
The units described as separate units may or may not be physically separate, and units displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units; some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may be separately used as one unit, or two or more units may be integrated in one unit; the integrated units may be implemented in hardware or in hardware plus software functional units.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware associated with program instructions, where the foregoing program may be stored in a computer readable storage medium, and when executed, the program performs steps including the above method embodiments; and the aforementioned storage medium includes: a removable storage device, ROM, RAM, magnetic or optical disk, or other medium capable of storing program code.
Alternatively, the above-described integrated units of the present application may be stored in a computer-readable storage medium if implemented in the form of software functional modules and sold or used as separate products. Based on such understanding, the technical solutions of the embodiments of the present application may be embodied in essence or a part contributing to the prior art in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a removable storage device, ROM, RAM, magnetic or optical disk, or other medium capable of storing program code.
The technical schemes described in the embodiments of the present application may be arbitrarily combined without any collision.
In addition, in the embodiments of the present application, "first", "second", etc. are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (12)

1. A method of load balancing, the method comprising:
analyzing the load state of the first cluster to obtain an analysis result;
under the condition that the analysis result represents that the first cluster has a capacity overload trend, a first setting model is called to adjust the super-percentage of the first cluster from a first super-percentage to a second super-percentage; the second percentage is less than the first percentage;
and under the condition that the analysis result represents that the first cluster is overloaded in performance, performing current limiting processing on a first collocation group PG of the first cluster and/or a first virtual machine accessing the first cluster.
2. The method of claim 1, wherein analyzing the load status of the first cluster to obtain the analysis result comprises:
acquiring the actual usage amount and/or the residual usage amount of the first cluster storage resources at intervals of set time;
judging that the first cluster has a capacity overload trend under the condition that the tangential slope of the first curve is larger than a first set threshold value and/or the first time is smaller than a second set threshold value; wherein,,
the first curve is obtained based on the obtained actual usage of the first cluster storage resources in a fitting mode; the first time characterizes a time available for use of a remaining usage of the first cluster.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
calculating to obtain the second percentage based on the ratio of the residual usage of the storage resources of the first cluster in the total capacity of the storage resources, the ratio of the number of users borne by the first cluster in the maximum number of users capable of bearing the load, and a reference bearing capacity value; wherein,,
the reference bearing capacity value is determined based on at least one of a number of OSD nodes of an object storage process of the first cluster and a hard disk performance parameter.
4. The method according to claim 1, wherein the method further comprises:
invoking a second setting model to predict the actual usage of the ordered next data volume by the first type of user;
based on the prediction result of the second setting model, calling a third setting model to determine the optimal cluster for bearing the next data volume ordered by the first type user;
wherein the second setting model is obtained based on the actual usage amount of each data volume ordered by the first type user and the user information training of the first type user; the user information of the first type user comprises at least one of the number of data volumes subscribed by the first type user, the level of the first type user, the online time length of the first type user and the total subscription capacity of the data volumes of the first type user.
5. The method according to claim 1, wherein the method further comprises:
selecting a first PG for current limiting treatment from at least one second PG; the second PG represents PG corresponding to a first data volume of the first cluster; and/or the number of the groups of groups,
selecting a virtual machine corresponding to a first data volume of the first cluster as a first virtual machine for current limiting; wherein,,
the first data volume represents a data volume with the total flow being greater than a third set threshold value, or represents the first N data volumes with the maximum total flow in the first cluster; and N is greater than or equal to 1.
6. The method of claim 5, wherein selecting a first PG for current limiting among the at least one second PG comprises:
calculating a first weight value of each second PG based on the flow change condition of the second PG in the first time period, the flow overload baseline of the first cluster and the total PG number of the first cluster; wherein the first time period characterizes a time period between when traffic of the first cluster reaches a traffic overload baseline threshold of the first cluster to when performance overload of the first cluster occurs;
calculating a second weight value of each second PG based on the duty ratio of the current number of read-write operations per second IOPS value of the second PG to the current total IOPS value of the first cluster;
Calculating a third weight value of each second PG based on the first weight value and the second weight value corresponding to each second PG;
selecting the first M PGs with the largest third weight value in the second PGs as the first PG; and M is greater than or equal to 1.
7. The method of claim 6, wherein the current limiting the first PG of the first cluster comprises:
setting the current read-write speed of the first PG as the upper limit of the read-write speed of the first PG and/or setting the current IOPS value of the first PG as the upper limit of the IOPS value of the first PG;
when the first PG receives a first data read-write request, the first PG is controlled to buffer the first data read-write request and delay the set time for processing.
8. The method of claim 1, wherein the throttling the first virtual machine accessing the first cluster comprises:
and setting the current average read-write speed of the virtual machines corresponding to all the data volumes in the first cluster as the read-write speed of the first virtual machine.
9. A load balancing apparatus, the apparatus comprising:
the analysis module is used for analyzing the load state of the first cluster to obtain an analysis result;
The adjustment module is used for calling a first setting model to adjust the super-percentage of the first cluster from a first super-percentage to a second super-percentage under the condition that the analysis result represents that the first cluster has a capacity overload trend; the second percentage is less than the first percentage;
the current limiting module is used for carrying out current limiting processing on the first PG of the first cluster and/or the first virtual machine accessing the first cluster under the condition that the analysis result represents that the first cluster is overloaded in performance.
10. An electronic device, comprising: a processor and a communication interface; wherein,,
the processor is configured to:
analyzing the load state of the first cluster to obtain an analysis result;
under the condition that the analysis result represents that the first cluster has a capacity overload trend, a first setting model is called to adjust the super-percentage of the first cluster from a first super-percentage to a second super-percentage; the second percentage is less than the first percentage;
and under the condition that the analysis result represents that the first cluster is overloaded in performance, performing current limiting processing on the first PG of the first cluster and/or a first virtual machine accessing the first cluster.
11. An electronic device, comprising: a processor and a memory for storing a computer program capable of running on the processor,
wherein the processor is adapted to perform the steps of the method of any of claims 1 to 8 when the computer program is run.
12. A storage medium having stored thereon a computer program, which when executed by a processor performs the steps of the method according to any of claims 1 to 8.
CN202211633020.3A 2022-12-19 2022-12-19 Load balancing method and device, electronic equipment and storage medium Pending CN116781707A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211633020.3A CN116781707A (en) 2022-12-19 2022-12-19 Load balancing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211633020.3A CN116781707A (en) 2022-12-19 2022-12-19 Load balancing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116781707A true CN116781707A (en) 2023-09-19

Family

ID=88006940

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211633020.3A Pending CN116781707A (en) 2022-12-19 2022-12-19 Load balancing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116781707A (en)

Similar Documents

Publication Publication Date Title
US8521986B2 (en) Allocating storage memory based on future file size or use estimates
US20050154576A1 (en) Policy simulator for analyzing autonomic system management policy of a computer system
CN108089921B (en) Server for cloud big data operation architecture and operation resource optimization method thereof
EP3857381B1 (en) Collecting samples hierarchically in a datacenter
US7734768B2 (en) System and method for adaptively collecting performance and event information
US7401198B2 (en) Maximizing storage system throughput by measuring system performance metrics
US20170019465A1 (en) Saturation detection and admission control for storage devices
US8601213B2 (en) System, method, and computer-readable medium for spool cache management
US11003359B2 (en) Method and device for managing disk pool
US7817562B1 (en) Methods and systems for back end characterization using I/O sampling
US20150199281A1 (en) Apparatus and method for meeting performance metrics for users in file systems
US20120221730A1 (en) Resource control system and resource control method
CN108595254B (en) Query scheduling method
CN108874324B (en) Access request processing method, device, equipment and readable storage medium
EP1190552A2 (en) Load balancing apparatus and method
US20220398021A1 (en) Workload management using a trained model
CN113254256B (en) Data reconstruction method, storage device and storage medium
CN116781707A (en) Load balancing method and device, electronic equipment and storage medium
CN106201711A (en) A kind of task processing method and server
US10452553B1 (en) Systems and methods for distributing cache space
CN115499513A (en) Data request processing method and device, computer equipment and storage medium
CN114020218B (en) Hybrid de-duplication scheduling method and system
CN115993932A (en) Data processing method, device, storage medium and electronic equipment
US10965739B2 (en) Time-based congestion discounting for I/O fairness control
JP2001184175A (en) Storage management system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination