A Cluster System with Guaranteed Response Time and Its Scaling Method
Through the load detection module, the scale of the cluster system is dynamically adjusted, and the problem of rapid accuracy of cluster system scale adjustment is solved, and service quality and energy efficiency are improved.
Patent Information
- Application Number
- CN202310574528.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-22
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2043-05-22
AI Technical Summary
The prior art is difficult to quickly and accurately match load requirements in the adjustment of cluster system scale, resulting in difficult to maintain service quality and energy efficiency levels at a good level, and the ultimate mathematical model is prone to large deviations and increases the system burden.
The load detection module continuously monitors load characteristics, generates a threshold decision tree, and dynamically adjusts the cluster size based on the degree of correlation between load characteristics and service quality. The circular queue records and calculates the task bring rate, task arrival interval variation coefficient, average response time and task service rate and other features are used to achieve rapid adjustment.
Dynamic adjustment of cluster system scale is achieved, ensuring that service quality is within the expected range, reducing system resource waste, improving energy efficiency and reducing adjustment costs.
Smart Images

Figure CN116599858B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer system structure, and in particular to a response time guaranteed cluster system and a scale adjustment method thereof. Background Art
[0002] Cluster systems are widely used in various cloud and fog computing applications. Due to their highly variable loads, clusters are typically designed for scalability to ensure system energy efficiency. However, when adjusting cluster sizing, energy efficiency should not be the sole objective while ignoring system quality of service (QoS). The cluster size should match the QoS requirements of the current load. Otherwise, too small a scale may not guarantee QoS, while too large a scale may waste service resources and reduce system energy efficiency. Loads are often constantly changing, requiring rapid and accurate cluster sizing. Traditional reactive cluster sizing methods fail to assess the optimal cluster size to match load requirements. Therefore, when actual QoS deviates from the desired standard, the cluster size can only be adjusted incrementally, such as by increasing or decreasing the number of cluster worker nodes one at a time. However, these incremental adjustments delay the timing of adjustments and make it difficult to maintain optimal system QoS and energy efficiency. To compensate for this shortcoming, recent methods, in order to achieve accuracy, will consider a large number of parameters to determine the model to evaluate the optimal cluster size. However, since the actual load not only continues to change in intensity, but also in resource requirements such as space requirements and computing requirements, the determined model may be relatively accurate in the short term, but as the load changes, it may no longer be suitable for subsequent load conditions.
[0003] Therefore, it is crucial to dynamically and continuously adjust the cluster size to the appropriate level based on actual load conditions. However, if the cluster size cannot be adjusted to the appropriate level in a timely manner, then if it is too small, the system service quality will be severely impacted, while if it is too large, the system energy efficiency will be difficult to maintain. Therefore, accurately assessing the system size requirements imposed by the current load is crucial. While achieving a completely accurate assessment is practically impossible, the closer the assessment result is to the actual demand, the lower the cost of fine-tuning will be, and the greater the guarantee of system service quality and energy efficiency. Many existing technologies pursue sophisticated mathematical models to assess demand. However, due to the numerous operational design factors in actual systems, which are difficult to fully capture, the more sophisticated mathematical models are often prone to significant deviations under common load conditions (where resource usage patterns vary). Furthermore, the resource overhead associated with collecting the data required by these sophisticated mathematical models adds additional burden to the system. Summary of the Invention
[0004] In view of the deficiencies in the above-mentioned prior art, the present invention provides a response time guaranteed cluster system and a scale adjustment method thereof, which can efficiently monitor the load status and dynamically and continuously determine the cluster scale and adjust the system cluster scale to an appropriate size.
[0005] A response time guaranteed cluster system and a scale adjustment method thereof, the response time guaranteed cluster scale adjustment method comprising: S1, continuously monitoring the load situation through a load detection module, and using a circular queue to record and calculate the task bringing rate R in the load within a preset time ar , the coefficient of variation CoV of the task arrival interval ar , the average response time T of completed load tasks rt , coefficient of variation CoV of task service time st and the average task service rate R of the cluster working nodes sr Sampling values of the five characteristics of the above; S2, the average response time T of the completed load tasks within the preset time is calculated through the service quality monitoring module rt Compared with its preset response time standard E rt Make comparisons and evaluate the service quality of the cluster system; S3, continuously analyze the sampling values of various characteristics of the load through the threshold setting adjustment module R ar , CoV ar 、T rt , CoV st 、R srThe degree of correlation between the load characteristics and the service quality of the cluster system is determined, and then the initial thresholds of the load characteristics are set in descending order according to the degree of correlation; S4, adjusting the scale of the cluster system through the scale adjustment module, specifically including S41, the scale adjustment module obtains the current cluster system service quality from the service quality monitoring module; S42, if the cluster system service quality level is within the expected range, the threshold setting adjustment module obtains the sampling values of the current load characteristics and the current cluster size value and collects and records them as a sample. After accumulating quantitative samples, the load characteristic with the greatest correlation with the cluster system service quality in the sample is used as the basis for division, the optimal division value is determined based on the principle of maximizing information gain, the initial threshold is adjusted, and a threshold decision tree is generated; S43. If the service quality level is not within the expected range, the threshold decision tree generated by the threshold setting adjustment module is used to compare the characteristic sampling values of the current load with the adjusted initial thresholds one by one to determine the optimal cluster size suitable for the current load situation, and the cluster service node states in the working state and the idle state are switched by state switching to adjust the cluster working nodes to the corresponding number; S5. The load is received through the task distribution module, and according to the task service rate of each cluster working node obtained by the load detection module, the cluster working node with the highest task service rate is selected each time in a first-come, first-served manner, and the tasks are distributed one by one. The cluster working node processes the received tasks and returns a response to the user terminal according to actual needs after processing.
[0006] Preferably, in step S1, the circular queue adopts overwriting storage record, and the load detection module monitors R ar With CoV ar When the task arrives, the circular queue A is used to record the arrival time of the task in chronological order, and the R is calculated based on the records in the circular queue A at the preset statistical time. ar With CoV ar ; In monitoring CoV st With R sr When using the circular queue B and recording the service time of the completed tasks in chronological order, and according to the preset statistical time, B Calculate CoV from the records in st With R sr .
[0007] Preferably, the specific steps of step S2 are as follows: S21, setting a circular queue C for each cluster working node through the service quality monitoring module; S22, when each cluster working node completes a task, recording the response time of the task into the circular sequence of the corresponding cluster working node; S23, traversing all circular queue records after a preset time and calculating the average response time T of the completed load tasksrt , T rt Compare with the preset response time standard to evaluate the service quality of the cluster system.
[0008] Preferably, in step S3, R ar , CoV ar 、T rt , CoV st 、R sr The determination of the correlation degree between the change of the service quality of the cluster system is specifically as follows: S31, the threshold setting adjustment module obtains the sampling values of the load characteristics in the continuous time period before the latest sample, specifically including R ar , CoV ar 、T rt , CoV st 、R sr S32, the sampling value of the load characteristics of each time period as analysis statistics, respectively, calculate the relative rate of service quality P rq and P rq With R ar Correlation coefficient P rq With CoV ar Correlation coefficient P rq With T rt Correlation coefficient P rq With CoV st Correlation coefficient and P rq With R sr Correlation coefficient etc., among which, Where E rt is the preset response time standard; S33, correlation coefficient value and The size of corresponds to the degree of correlation between the various characteristics of the load and the service quality of the cluster system.
[0009] Preferably, the service quality level in step S43 is not within the expected range, which includes two situations: one is the average response time T rt Greater than the preset response time standard E rt , the service quality of the cluster system cannot be guaranteed; one is the average response time T rt Much shorter than the preset response time standard E rt The cluster system service quality is too good.
[0010] The present invention also provides a response time guaranteed cluster system, comprising a cluster manager and a cluster service node, wherein the cluster manager comprises a load detection module, a service quality monitoring module, a threshold setting adjustment module, a scale adjustment module and a task distribution module; the cluster service node comprises a cluster working node in a working state and a cluster idle node in an idle state; wherein the load detection module is used to continuously monitor the load situation, and uses a circular queue to record and calculate the task bringing rate R in the load within a preset time. ar , the coefficient of variation CoV of the task arrival interval ar , the average response time T of completed load tasks rt , coefficient of variation CoV of task service time st and the average task service rate R of the cluster working nodes sr The service quality monitoring module is used to calculate the average response time T of the completed load tasks within the preset time. rt Compared with its preset response time standard E rt Make comparisons to evaluate the service quality of the cluster system; the threshold setting adjustment module is used to continuously analyze the sampling values of various characteristics of the load R ar , CoV ar 、T rt , CoV st 、R sr The degree of correlation between the load characteristics and the service quality of the cluster system is determined, and then the initial thresholds of the load characteristics are set in order from large to small according to the degree of correlation; the scale adjustment module is used to obtain the current cluster system service quality from the service quality monitoring module. If the cluster system service quality level is within the expected range, the threshold setting adjustment module obtains the sampling values of the current load characteristics and the current cluster scale value and collects and records them as a sample. After accumulating quantitative samples, the load characteristic with the greatest correlation with the change in the cluster system service quality in the sample is used as the basis for division, and the optimal division value is determined based on the principle of maximizing information gain, the initial threshold is adjusted, and a threshold decision tree is generated; if the service quality level is not ... If the load is within the expected range, the threshold decision tree is used to compare the characteristic sampling values of the current load with the adjusted initial thresholds one by one to determine the optimal cluster size suitable for the current load situation, and switch the service node states in the working state and the idle state by state switching, and adjust the cluster working nodes to the corresponding number; the task distribution module is used to receive the load, and according to the task service rate of each cluster working node obtained by the load detection module, the cluster working node with the highest task service rate is selected each time in a first-come, first-served manner, and the tasks are distributed one by one. The cluster working node processes the received tasks and returns a response to the user terminal according to actual needs after the processing is completed.
[0011] Furthermore, the circular queue uses an overwriting storage record, the load detection module uses the circular queue A and records the arrival time of the incoming tasks in chronological order, and calculates R according to the records in the circular queue A at the preset statistical time. ar With CoV ar At the same time, circular queue B is used to record the service time of completed tasks in chronological order, and CoV is calculated based on the records in the circular queue B at the preset statistical time. st With R sr .
[0012] Furthermore, the service quality monitoring module evaluates the service quality of the cluster system in the following manner: a circular queue C is set for each cluster working node; when each cluster working node completes a task, the response time of the task is recorded in the circular sequence C of the corresponding cluster working node; after a preset time, all the circular queue C records are traversed and the average response time T of the completed load tasks is calculated. rt , T rt Compare with the preset response time standard to evaluate the service quality of the cluster system.
[0013] Furthermore, the threshold setting adjustment module determines R ar , CoV ar 、T rt , CoV st 、R sr The specific method for determining the degree of correlation between the change in the service quality of the cluster system is to obtain the sampling values of the load characteristics in the continuous time period before the latest sample, including R ar , CoV ar 、T rt , CoV st 、R sr ; Take the sampling values of the characteristics of the load in each time period as analysis statistics, and calculate the relative rate of service quality P respectively rq and P rq With R ar Correlation coefficient P rq With CoV ar Correlation coefficient P rq With T rt Correlation coefficient P rq With CoV st Correlation coefficient and P rq With R sr Correlation coefficient etc., among which, Where Ert is the preset response time standard; the obtained correlation coefficient value and The size of corresponds to the degree of correlation between the various characteristics of the load and the service quality of the cluster system.
[0014] The beneficial effects of the present invention are as follows: the present invention provides a response time guaranteed cluster system and its scale adjustment method, which accurately reflects the situation of the cluster by using a circular queue covering statistical record and calculating the sampling values of the five characteristics of the load within a preset time, and at the same time evaluates the service quality of the cluster system based on the average response time, and uses the specific load characteristic values and the actual provided values of the cluster scale when the service quality level of the cluster system is within the expected range as samples, and uses the degree of correlation between the various characteristics of the load and the service quality of the cluster system as an important basis for determining the characteristics, and generates a threshold decision tree, so that the generated threshold decision tree can better reflect the connection between the load and the system service quality, thereby realizing the rapid determination of the cluster scale that matches the current load characteristic values, and timely adjusting the system cluster scale to an appropriate size. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 This is a workflow diagram of a response time guaranteed cluster size adjustment method provided by the present invention;
[0016] Figure 2 This is a schematic diagram of the structure of a response time guaranteed cluster system according to the present invention;
[0017] Figure 3 This is a timing flow chart of a response time guaranteed cluster size adjustment method provided by the present invention;
[0018] Figure 4 It is a schematic diagram of a threshold decision tree example structure of an embodiment of the present invention.
[0019] Figure ID
[0020] 1. Cluster manager; 11. Load detection module; 12. Service quality monitoring module; 13. Threshold setting and adjustment module; 14. Scale adjustment module; 15. Task distribution module; 2. Cluster service node; 21. Cluster working node; 22. Cluster idle node. DETAILED DESCRIPTION
[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0022] like Figure 1 and Figure 2 As shown, the present invention provides a response time guaranteed cluster system and a scale adjustment method thereof.
[0023] Specifically, a response time-guaranteed cluster system includes a cluster manager 1 and cluster service nodes 2. The cluster manager includes a load detection module 11, a service quality monitoring module 12, a threshold setting and adjustment module 13, a scale adjustment module 14, and a task distribution module 15. The cluster service nodes 2 include active cluster working nodes 21 and idle cluster idle nodes 22. Active cluster working nodes 21 are capable of providing normal services, while idle cluster service nodes 22 are in standby, dormant, or shutdown states and do not provide any services. A greater number of idle cluster service nodes 22 provides lower system energy consumption. Users of the cluster system can be either intranet or extranet users, and they issue work tasks, or user loads, via the corresponding networks. After receiving the user loads, the cluster manager 1 selects the least loaded cluster working node 21 to provide service. Furthermore, the manager 1 is responsible for coordinating system resources and monitoring system status, ensuring that the manager 1 maintains normal operating conditions over the long term. When the user load decreases, some cluster working nodes 21 are marked by the manager 1 and enter the idle state after their original load is completed. When the user load increases, the manager 1 wakes up some idle cluster idle nodes 22 to increase the number of cluster working nodes 21 for providing services.
[0024] The load detection module 11 is used to continuously monitor the load situation and use a circular queue to record and calculate the task load rate R in the preset time. ar , the coefficient of variation CoV of the task arrival interval ar , the average response time T of completed load tasks rt , coefficient of variation CoV of task service time st and the average task service rate R of the cluster working nodes sr The sampling values of the five features are as follows.
[0025] The load detection module 11 uses a circular queue A and records the arrival time of incoming tasks in chronological order, and calculates R based on the records in the circular queue A at a preset statistical time. ar With CoV ar At the same time, circular queue B is used to record the service time of completed tasks in chronological order, and CoV is calculated based on the records in the circular queue B at the preset statistical time. st With R sr .
[0026] The service quality monitoring module 12 is used to calculate the average response time T of the completed load tasks within a preset time. rt Compared with its preset response time standard E rt Make comparisons and evaluate the service quality of the cluster system.
[0027] The service quality monitoring module 12 evaluates the service quality of the cluster system in the following manner: a circular queue C is set for each cluster working node 21; when each cluster working node 21 completes a task, the response time of the task is recorded in the circular sequence C of the corresponding cluster working node 21; after a preset time, all the circular queue C records are traversed and the average response time T of the completed load tasks is calculated. rt , T rt Compare with the preset response time standard to evaluate the service quality of the cluster system.
[0028] The threshold setting adjustment module 13 is used to continuously analyze the sampling values R of various characteristics of the load. ar , CoV ar 、T rt , CoV st 、R sr The correlation degree between the load characteristics and the service quality of the cluster system is determined, and then the initial thresholds of various load characteristics are set in descending order according to the correlation degree.
[0029] The threshold setting adjustment module 13 determines R ar , CoV ar 、T rt , CoV st 、R sr The specific method for determining the degree of correlation between the change in the service quality of the cluster system is to obtain the sampling values of the load characteristics in the continuous time period before the latest sample, including R ar , CoV ar 、T rt , CoV st 、R sr; Take the sampling values of the characteristics of the load in each time period as analysis statistics, and calculate the relative rate of service quality P respectively rq and P rq With R ar Correlation coefficient P rq With CoV ar Correlation coefficient P rq With T rt Correlation coefficient P rq With CoV st Correlation coefficient and P rq With R sr Correlation coefficient etc., among which, Where E rt is the preset response time standard; the obtained correlation coefficient value and The size of corresponds to the degree of correlation between the various characteristics of the load and the service quality of the cluster system.
[0030] The scale adjustment module 14 is used to obtain the current cluster system service quality from the service quality monitoring module 112. If the cluster system service quality level is within the expected range, the threshold setting adjustment module 13 obtains the sampled values of various current load characteristics and the current cluster size value and records them as a sample. After accumulating a certain number of samples, the load characteristics with the highest correlation with changes in the cluster system service quality are used as the basis for division. The optimal division value is determined based on the principle of maximizing information gain, and the initial threshold is adjusted to generate a threshold decision tree. If the service quality level is not within the expected range, the threshold decision tree is used to compare the sampled values of various current load characteristics with the adjusted initial thresholds one by one to determine the optimal cluster size suitable for the current load situation. The state of the service node 2 in the working state and the idle state are switched through state switching, and the number of cluster working nodes 21 is adjusted to the corresponding number.
[0031] The task distribution module 15 is used to receive the load and, based on the task service rate of each cluster working node 21 obtained by the load detection module 11, select the cluster working node 21 with the highest task service rate each time on a first-come, first-served basis and distribute the tasks one by one. The cluster working node 21 processes the received tasks and returns a response to the user terminal according to actual needs after the processing is completed.
[0032] refer to Figure 1 and Figure 3 As shown, the response time guaranteed cluster size adjustment method includes steps S1 to S6.
[0033] Specifically, S1, the load detection module 11 continuously monitors the load situation, and uses a circular queue to record and calculate the task bringing rate R in the load within a preset time. ar , the coefficient of variation CoV of the task arrival interval ar , the average response time T of completed load tasks rt , coefficient of variation CoV of task service time st and the average task service rate R of the cluster working nodes sr The sampling values of the five features are selected. ar , CoV ar 、T rt , CoV st 、R sr The five load characteristics can fully reflect the intensity and variability of the load and the status of the cluster system, and effectively and accurately reflect the status of the cluster system.
[0034] Among them, in step S1, the circular queue adopts overwriting storage record, and the load detection module 11 monitors R ar With CoV ar When the task arrives, the circular queue A is used to record the arrival time of the task in chronological order, and the R is calculated based on the records in the circular queue A at the preset statistical time. ar With CoV ar ; In monitoring CoV st With R sr When the service time of the completed tasks is recorded in chronological order using the circular queue B, the CoV is calculated based on the records in the circular queue B at the preset statistical time. st With R sr .
[0035] S2, the service quality monitoring module 12 calculates the average response time T of the completed load tasks within the preset time. rt Compared with its preset response time standard E rt Make comparisons and evaluate the service quality of the cluster system.
[0036] Among them, the specific steps of step S2 are:
[0037] S21, setting a circular queue C for each cluster working node 21 through the service quality monitoring module 12;
[0038] S22, when each cluster working node 21 completes a task, the response time of the task is recorded in the loop sequence of the corresponding cluster working node 21;
[0039] S23, after a preset time, traverse all the circular queue records and calculate the average response time T of the completed load tasks rt , T rt Compare with the preset response time standard to evaluate the service quality of the cluster system.
[0040] When the average response time T rt Far less than or greater than the preset response time standard E rt , it means that the service quality level of the cluster system is not within the expected range; when the average response time T rt Slightly less than or equal to the preset response time standard E rt , it means that the service quality level of the cluster system is within the expected range.
[0041] S3, continuously analyzing the sampling values R of various characteristics of the load through the threshold setting adjustment module 13 ar , CoV ar 、T rt , CoV st 、R sr The correlation degree between the load characteristics and the service quality of the cluster system is determined, and then the initial thresholds of various load characteristics are set in descending order according to the correlation degree.
[0042] Wherein, in step S3, R ar , CoV ar 、T rt , CoV st 、R sr The degree of correlation with changes in cluster system service quality is determined as follows:
[0043] S31, the threshold setting adjustment module 13 obtains the sampling values of each load feature in the continuous time period before the latest sample, specifically including R ar , CoV ar 、T rt , CoV st 、R sr .
[0044] S32, taking the sampling values of the characteristics of the load in each time period as analysis statistics, respectively calculate the relative rate of service quality P rq and P rq With R ar Correlation coefficient P rq With CoV ar Correlation coefficient P rq With T rt Correlation coefficient P rq With CoV stCorrelation coefficient and P rq With R sr Correlation coefficient etc., among which, Where E rt The preset response time standard.
[0045] S33, correlation coefficient value and The size of corresponds to the degree of correlation between the various characteristics of the load and the service quality of the cluster system.
[0046] S4, adjust the scale of the cluster system through the scale adjustment module 14, the specific steps include:
[0047] S41, the scale adjustment module 14 obtains the current cluster system service quality status from the service quality monitoring module 12;
[0048] S42. If the service quality level of the cluster system is within the expected range, the threshold setting adjustment module 13 obtains the sampling values of each characteristic of the current load and the current cluster size value and collects and records them as a sample. After accumulating quantitative samples, the load characteristic with the greatest correlation with the service quality of the cluster system in the sample is used as the basis for division, and the optimal division value is determined based on the principle of maximizing information gain. The initial threshold is gradually adjusted in the division of multiple load characteristics one by one to generate a threshold decision tree.
[0049] Among them, information gain x represents a load feature used as the basis for division, S represents the sample to be divided (|S| represents the number of samples it contains), S i is the i-th sample subset after partitioning (|S i | is the number of samples it contains), v represents the subset S after division i The number of |y| represents the number of types contained in the sample S (for example, if the cluster sizes involved in the sample are 10%, 50%, and 70%, then the possible values of y are these three, and the value of |y| is 3), p k It represents the proportion of samples belonging to the kth type (i.e., samples with the same specific y value) to the total number of samples. After each division is completed, all steps are recursively performed on each subset of samples until all samples are divided.
[0050] S43. If the service quality level is not within the expected range, the threshold decision tree generated by the threshold setting adjustment module 13 is used to compare the characteristic sampling values of the current load with the adjusted initial thresholds one by one to determine the optimal cluster size suitable for the current load situation, and the cluster service node 2 is adjusted to the corresponding number of cluster working nodes 21 through state switching.
[0051] The scale adjustment module 14 is responsible for adjusting the cluster working nodes 21 to the corresponding number according to the determined cluster scale value, thereby providing the cluster system with a number of cluster working nodes 21 that matches the load. In the early stage when the decision tree is not generated, when the service quality level of the cluster system is not within the expected range, the sampling values of the various characteristics of the current load are compared one by one with the initial thresholds set by the threshold setting adjustment module 13, and the number of cluster working nodes 21 is increased or decreased one at a time to gradually adjust the cluster scale. After the threshold decision tree is generated, when the service quality level of the current cluster system is not within the expected range, the scale adjustment module 14 uses the sampling values of the various characteristics of the current load to start from the root of the threshold decision tree, and then go down according to each partition value until it reaches the leaf node. Finally, the cluster scale is adjusted to the scale recorded by the leaf node, and the cluster service node 2 is adjusted to the corresponding number of cluster working nodes 21 by state switching.
[0052] Among them, in step S43, the service quality level is not within the expected range, which includes two situations: one is that the average response time T rt Greater than the preset response time standard E rt , the service quality of the cluster system cannot be guaranteed; one is the average response time T rt Much shorter than the preset response time standard E rt The cluster system service quality is too good.
[0053] S5. The load is received through the task distribution module 15. Based on the task service rate of each cluster working node 21 obtained by the load detection module 11, the cluster working node 21 with the highest task service rate is selected each time on a first-come, first-served basis, and the tasks are distributed one by one. The working node 21 processes the received tasks and returns a response to the user terminal according to actual needs after processing.
[0054] refer to Figure 4 , Figure 4 This is a schematic diagram of a threshold decision tree example structure of this embodiment, which is constructed by the above step S42, wherein the sampling values R of the five characteristics of the load ar 、T rt 、R sr , CoV st , CoV ar They are: 135, 183ms, 110, 30, 22, after, Figure 4 The threshold decision tree shown can finally determine that the cluster size needs to be adjusted to 70%.
[0055] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be considered as equivalent replacement methods and are included in the scope of protection of the present invention.
Claims
1. A response time guaranteed cluster size adjustment method, characterized in that: The following steps are involved: S1, continuously monitor the load situation through the load detection module, and use the circular queue to record and calculate the task bringing rate R in the load within the preset time ar , the coefficient of variation CoV of the task arrival interval ar , the average response time T of completed load tasks rt , coefficient of variation CoV of task service time st and the average task service rate R of the cluster working nodes sr Sampling values of the five features; S2, the average response time T of the completed load tasks within the preset time is calculated through the service quality monitoring module. rt Compared with its preset response time standard E rt Make comparisons and evaluate the service quality of the cluster system; S3, through the threshold setting adjustment module to continuously analyze the sampling value R of various characteristics of the load ar , CoV ar 、T rt , CoV st 、R sr The correlation degree between the load characteristics and the service quality of the cluster system is determined, and then the initial thresholds of various load characteristics are set in descending order of correlation degree. S4. Adjust the scale of the cluster system through the scale adjustment module. The specific steps include: S41, the scale adjustment module obtains the current cluster system service quality status from the service quality monitoring module; S42. If the cluster system service quality level is within the expected range, the threshold setting adjustment module obtains the sampled values of each current load characteristic and the current cluster size value and records them as a sample. After accumulating the quantitative samples, the load characteristic with the greatest correlation with the change in cluster system service quality in the sample is used as the basis for division. The optimal division value is determined based on the principle of maximizing information gain, and the initial threshold is adjusted to generate a threshold decision tree. S43. If the service quality level is not within the expected range, the threshold decision tree generated in step S43 is used to compare the characteristic sampling values of the current load with the adjusted initial thresholds one by one to determine the optimal cluster size suitable for the current load situation. The state of the cluster service nodes in the working state and the idle state are switched by state switching, and the number of cluster working nodes is adjusted to the corresponding number. S5. The load is received through the task distribution module. Based on the task service rate of each cluster working node obtained by the load detection module, the cluster working node with the highest task service rate is selected each time on a first-come, first-served basis, and the tasks are distributed one by one. The cluster working node processes the received tasks and returns a response to the user terminal according to actual needs after processing.
2. A response time guaranteed cluster size adjustment method according to claim 1, characterized in that: In step S1, the circular queue uses overwriting storage to record, and the load detection module monitors R ar With CoV ar When the task arrives, the circular queue A is used to record the arrival time of the task in chronological order, and the R is calculated based on the records in the circular queue A at the preset statistical time. ar With CoV ar ; In monitoring CoV st With R sr When the service time of the completed tasks is recorded in chronological order using the circular queue B, the CoV is calculated based on the records in the circular queue B at the preset statistical time. st With R sr .
3. The response time guaranteed cluster size adjustment method according to claim 1, characterized in that: The specific steps of step S2 are: S21, setting a circular queue C for each cluster working node through the service quality monitoring module; S22. When each cluster working node completes a task, the response time of the task is recorded in the cyclic sequence C of the corresponding cluster working node; S23, after a preset time, traverse all the records in the circular queue C and calculate the average response time T of the completed load tasks rt , T rt Compare with the preset response time standard to evaluate the service quality of the cluster system.
4. A response time guaranteed cluster size adjustment method according to claim 1, characterized in that: In step S3, R ar , CoV ar 、T rt , CoV st 、R sr The specific steps for determining the degree of correlation with changes in cluster system service quality are as follows: S31, the threshold setting adjustment module obtains the sampling values of each load feature in the continuous time period before the latest sample, specifically including R ar , CoV ar 、T rt , CoV st 、R sr ; S32, taking the sampling values of the characteristics of the load in each time period as analysis statistics, respectively calculate the relative rate of service quality P rq and P rq With R ar Correlation coefficient P rq With CoV ar Correlation coefficient P rq With T rt Correlation coefficient P rq With CoV st Correlation coefficient and P rq With R sr Correlation coefficient ,in, Where E rt is the preset response time standard; S33, correlation coefficient value and The size of corresponds to the degree of correlation between the various characteristics of the load and the service quality of the cluster system.
5. The response time guaranteed cluster size adjustment method according to claim 1, characterized in that: In step S43, the service quality level is not within the expected range, which includes two situations. One is that the average response time T rt Greater than the preset response time standard E rt , the service quality of the cluster system cannot be guaranteed; one is the average response time T rt Much shorter than the preset response time standard E rt The cluster system service quality is too good.
6. A response time guaranteed cluster system, comprising a cluster manager and a cluster service node, characterized in that: The cluster manager includes a load detection module, a service quality monitoring module, a threshold setting adjustment module, a scale adjustment module and a task distribution module; the cluster service node includes a cluster working node in a working state and a cluster idle node in an idle state; The load detection module is used to continuously monitor the load situation and use a circular queue to record and calculate the task load rate R in the preset time. ar , the coefficient of variation CoV of the task arrival interval ar , the average response time T of completed load tasks rt , coefficient of variation CoV of task service time st and the average task service rate R of the cluster working nodes sr Sampling values of the five features; The service quality monitoring module is used to calculate the average response time T of the completed load tasks within the preset time. rt Compared with its preset response time standard E rt Make comparisons and evaluate the service quality of the cluster system; The threshold setting adjustment module is used to continuously analyze the sampling values R of various characteristics of the load. ar , CoV ar 、T rt , CoV st 、R sr The correlation degree between the load characteristics and the service quality of the cluster system is determined, and then the initial thresholds of various load characteristics are set in descending order of correlation degree. The scale adjustment module is used to obtain the current cluster system service quality status from the service quality monitoring module. If the cluster system service quality level is within the expected range, the threshold setting adjustment module obtains the sampling values of each feature of the current load and the current cluster size value and collects and records them as a sample. After accumulating quantitative samples, the load feature with the greatest correlation with the change in the cluster system service quality in the sample is used as the basis for division, the optimal division value is determined based on the principle of maximizing information gain, the initial threshold is adjusted, and a threshold decision tree is generated; if the service quality level is not within the expected range, the threshold decision tree is used to compare the sampling values of each feature of the current load with each adjusted initial threshold one by one to determine the optimal cluster size suitable for the current load situation, and the cluster service node states in the working state and the idle state are switched by state switching, and the cluster working nodes are adjusted to the corresponding number; The task distribution module is used to receive the load and, based on the task service rate of each cluster working node obtained by the load detection module, select the cluster working node with the highest task service rate each time in a first-come, first-served manner and distribute the tasks one by one. The cluster working node processes the received tasks and returns a response to the user terminal according to actual needs after processing.
7. The response time guaranteed cluster system according to claim 6, characterized in that: The circular queue uses an overwriting storage record. The load detection module uses the circular queue A and records the arrival time of the incoming tasks in chronological order, and calculates R based on the records in the circular queue A at the preset statistical time. ar With CoV ar At the same time, circular queue B is used to record the service time of completed tasks in chronological order, and CoV is calculated based on the records in the circular queue B at the preset statistical time. st With R sr .
8. The response time guaranteed cluster system according to claim 6, characterized in that: The service quality monitoring module evaluates the service quality of the cluster system in the following manner: Set up a circular queue C for each cluster worker node; when each cluster worker node completes a task, record the response time of the task in the circular sequence C of the corresponding cluster worker node; after a preset time, traverse all the circular queue C records and calculate the average response time T of the completed load tasks rt , T rt Compare with the preset response time standard to evaluate the service quality of the cluster system.
9. The response time guaranteed cluster system according to claim 6, characterized in that: The threshold setting adjustment module determines R ar , CoV ar 、T rt , CoV st 、R sr The degree of correlation with changes in cluster system service quality is determined as follows: Get the sampling values of each load characteristic in the continuous time period before the latest sample, including R ar , CoV ar 、T rt , CoV st 、R sr ; The sampling values of the characteristics of the load in each time period are used as analytical statistical data to calculate the relative rate of service quality P rq and P rq With R ar Correlation coefficient P rq With CoV ar Correlation coefficient P rq With T rt Correlation coefficient P rq With CoV st Correlation coefficient and P rq With R sr Correlation coefficient etc., among which, Where E rt is the preset response time standard; The obtained correlation coefficient value and The size of corresponds to the degree of correlation between the various characteristics of the load and the service quality of the cluster system.
Citation Information
Patent Citations
Cluster service resource dynamic adjustment method based on response time perception
CN111782394A
Distributed service cluster load adaptive processing method, device and system
CN113055479A