A virtual machine service quality adjustment method, device and medium
By combining LSTM and EMA models with a weighted average algorithm, the virtual machine QoS is dynamically adjusted, solving the problems of inaccurate virtual machine QoS adjustment and resource waste in existing technologies, and achieving more efficient resource utilization and reduced energy consumption.
Patent Information
- Application Number
- CN202511677404.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-17
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2045-11-17
AI Technical Summary
Existing virtual machine quality of service (QoS) tuning methods cannot effectively cope with the dynamic needs of virtual machines, resulting in resource waste and performance degradation. Furthermore, they lack consideration for input/output (IO) characteristics, leading to inaccurate tuning and inefficiency.
By combining a Long Short-Term Memory (LSTM) network model and an Exponential Moving Average (EMA) model with a weighted average algorithm, the system predicts the future I/O performance of virtual machines by collecting real-time data on their input/output performance metrics, and dynamically adjusts QoS parameters based on the predicted values and the total performance resource information of the backend storage.
It enables accurate and dynamic adjustment of virtual machine QoS, improves resource utilization, reduces energy consumption, solves the problem of resource idleness or overload in traditional static configuration schemes, and fully considers the IO characteristics of virtual machines.
Smart Images

Figure CN121116766B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of cloud platforms, and in particular to a virtual machine quality of service adjustment method, device and medium. BACKGROUND
[0002] With the development of cloud computing, the number and types of virtual machines in cloud platform clusters are increasing, which makes the quality of service (QoS) of virtual machine disks increasingly important. Currently, common QoS adjustment methods mainly rely on manual configuration and static allocation.
[0003] However, this static allocation scheme cannot effectively respond to the dynamic needs of virtual machines, leading to resource waste and performance degradation. At the same time, as the number and types of virtual machines increase, the manual configuration method becomes increasingly unrealistic. In addition, existing QoS adjustment methods lack consideration of virtual machine input / output (IO) characteristics, which leads to inaccuracy and inefficiency of QoS adjustment. Therefore, it is an urgent need for cloud platform clusters to develop a QoS adjustment method and device that can consider the IO characteristics of virtual machines.
[0004] Therefore, there is an urgent need for a virtual machine quality of service adjustment method that can consider the IO characteristics of virtual machines and achieve dynamic adjustment of virtual machine QoS. SUMMARY
[0005] The purpose of the present application is to provide a virtual machine quality of service adjustment method, device and medium to provide a scheme that can adapt to the IO characteristics of virtual machines and dynamically adjust QoS.
[0006] To solve the above technical problems, the present application provides a virtual machine quality of service adjustment method, comprising: collecting real-time data of input / output performance indicators of each virtual machine to obtain corresponding feature vectors; taking the feature vectors as input, respectively predicting the input / output performance indicators through a long short-term memory network model and an exponential moving average model to obtain corresponding first prediction results and second prediction results; processing the first prediction results and the second prediction results through a weighted average algorithm to obtain prediction values of the input / output performance indicators; and adjusting the quality of service parameters corresponding to each virtual machine according to the prediction values of the input / output performance indicators and the total performance resource information of the back-end storage corresponding to each virtual machine.
[0007] In an alternative embodiment, collecting real-time data of the input / output performance indicators of each virtual machine comprises: collecting real-time data of each of the input / output performance indicators in a time-sharing manner in a current sampling period; the feature vector comprises: time features, statistical features, time sequence features and trend features of each parameter indicator; the time features comprise time information corresponding to the collection time of each of the input / output performance indicators; the statistical features comprise mean value, peak value and variance of the real-time data collected for each of the input / output performance indicators; the time sequence features comprise first-order difference between the mean value of the data in the current sampling period and the mean value of the data in the previous sampling period of each of the input / output performance indicators; and the trend features are the slope of the mean value of the data in the first number of most recent sampling periods of each of the input / output performance indicators.
[0008] In an alternative embodiment, the feature vector further comprises Fourier features; the Fourier features comprise: the first number of high-frequency components after Fourier transform of the plurality of real-time data collected in the current sampling period of each of the input / output performance indicators.
[0009] In an alternative embodiment, the feature vector further comprises service features; the service features comprise: high input / output type, high throughput type, mixed type and remaining type; wherein the service features are service type labels attached to each of the virtual machines at the beginning of creation of the virtual machines according to the services of the virtual machines.
[0010] In an alternative embodiment, the statistical features further comprise: 90th percentile of each of the input / output performance indicators.
[0011] In an alternative embodiment, the input / output performance indicators comprise: input / output operations per second, write bandwidth and read bandwidth.
[0012] In an alternative embodiment, attaching service type labels to the virtual machines according to the services of the virtual machines comprises: attaching the service type label of high input / output type to the virtual machine when the input / output operations per second of the virtual machine is greater than a first typical value and the write bandwidth and the read bandwidth are both less than a second typical value; attaching the service type label of high throughput type to the virtual machine when the write bandwidth or the read bandwidth of the virtual machine is greater than a third typical value; attaching the service type label of mixed type to the virtual machine when the input / output operations per second of the virtual machine is greater than the first typical value and the write bandwidth or the read bandwidth is greater than the second typical value; and attaching the service type label of remaining type to the virtual machine in other cases.
[0013] In an optional embodiment, the adjusting the quality of service parameter corresponding to each of the virtual machines according to the predicted value of the input / output performance indicator corresponding to each of the virtual machines and the total performance resource information of the back-end storage comprises: for any of the quality of service parameter adjustment processes of any of the input / output performance indicators corresponding to any of the virtual machines, comprising: increasing a tolerance proportion of a redundant value on the basis of the predicted value to obtain a target value; determining a remaining allocable value of the input / output performance indicator according to the total performance resource information of the back-end storage; if the remaining allocable value is greater than or equal to the target value, adjusting the value of the quality of service parameter to the target value.
[0014] In an optional embodiment, further comprising: triggering an instant adjustment when any of the input / output performance indicators of any of the virtual machines exceeds an adjustment proportion threshold of a current quality of service parameter value for a continuous third number of periods; wherein the instant adjustment comprises: determining a historical period error of a target input / output performance indicator in each sampling period; the historical period error is a difference between an actual value and a predicted value of the target input / output performance indicator in a current sampling period; determining a corresponding standard deviation according to the determined historical period error of each sampling period; predicting a predicted value of the target input / output performance indicator in a next sampling period as a future predicted value through the long short-term memory network model and the exponential moving average model; increasing a tolerance proportion of a redundant value on the basis of the future predicted value to obtain a first intermediate result value; determining a corresponding 90% confidence interval through the future predicted value and the standard deviation, and taking an upper limit value of the 90% confidence interval as a second intermediate result value; adjusting the quality of service parameter through the minimum value of the first intermediate result value and the second intermediate result value.
[0015] In an optional embodiment, before the adjusting the quality of service parameter corresponding to each of the virtual machines according to the predicted value of the input / output performance indicator corresponding to each of the virtual machines and the total performance resource information of the back-end storage, further comprising: judging whether the predicted value of the input / output performance indicator corresponding to each of the virtual machines is different from the corresponding quality of service parameter by more than a first adjustment proportion; if yes, turning to the step of adjusting the quality of service parameter corresponding to each of the virtual machines according to the predicted value of the input / output performance indicator corresponding to each of the virtual machines and the total performance resource information of the back-end storage.
[0016] In an optional embodiment, when adjusting the quality of service parameter corresponding to each of the virtual machines, further comprising: when the remaining allocable value cannot meet the adjustment requirement of the quality of service parameter corresponding to each of the virtual machines, adjusting the quality of service parameter according to an adjustment weight proportion corresponding to a business type label corresponding to each of the virtual machines according to the business type label.
[0017] In an alternative embodiment, when adjusting the quality of service parameters corresponding to each virtual machine, further comprising: when the remaining allocatable value cannot meet the adjustment requirement of the quality of service parameters corresponding to each virtual machine, adjusting the quality of service parameters according to the corresponding service type tags of each virtual machine in a corresponding priority order.
[0018] In an alternative embodiment, further comprising: determining a historical period error of a target input / output performance indicator in each sampling period; the historical period error being a difference between an actual value and a predicted value of the target input / output performance indicator in a current sampling period; when the historical period error of a continuous fourth number of sampling periods exceeds a second adjustment proportion of the predicted value, adjusting model parameters and weight coefficients of the long short-term memory network model and the exponential moving average model.
[0019] In an alternative embodiment, further comprising: adjusting the model parameters and weight coefficients of the long short-term memory network model and the exponential moving average model every fifth number of sampling periods.
[0020] In an alternative embodiment, adjusting the weight coefficients comprises: determining a historical prediction error of the long short-term memory network model and the exponential moving average model; wherein the historical prediction error is a difference between a predicted value output by the long short-term memory network model / exponential moving average model and an actual value of a corresponding input / output performance indicator; and adjusting the weight coefficients between the long short-term memory network model and the exponential moving average model according to the historical prediction error.
[0021] In an alternative embodiment, after collecting the real-time data of the input / output performance indicators of each virtual machine, further comprising: filtering abnormal data in the collected real-time data according to an abnormal filtering rule; and performing standardization processing on the filtered real-time data.
[0022] To solve the above technical problems, the present application also provides a virtual machine quality of service adjustment device, comprising: a data processing module for collecting real-time data of input / output performance indicators of each virtual machine to obtain corresponding feature vectors; a first prediction module for predicting the input / output performance indicators by using the feature vectors as inputs through a long short-term memory network model and an exponential moving average model respectively to obtain corresponding first prediction results and second prediction results; a second prediction module for processing the first prediction results and the second prediction results through a weighted average algorithm to obtain predicted values of the input / output performance indicators; and a resource allocation module for adjusting quality of service parameters corresponding to each virtual machine according to the predicted values of the input / output performance indicators of each virtual machine and backend storage total performance resource information.
[0023] To solve the above technical problems, the application further provides a computer program product comprising computer programs / instructions which, when executed by a processor, implement the steps of the virtual machine service quality adjustment method described above.
[0024] To solve the above technical problems, the application further provides a virtual machine service quality adjustment device comprising a memory for storing computer programs and a processor for executing the computer programs to implement the steps of the virtual machine service quality adjustment method described above.
[0025] To solve the above technical problems, the application further provides a non-volatile storage medium having computer programs stored thereon, the computer programs being executed by a processor to implement the steps of the virtual machine service quality adjustment method described above.
[0026] The virtual machine service quality adjustment method provided by the application can accurately predict the running state of a virtual machine according to real-time data of IO performance indicators of the virtual machine through a Long Short-Term Memory (LSTM) model and an Exponential Moving Average (EMA) model. By predicting the IO performance of each virtual machine in the next cycle, the allocation of IO resources can be accurately realized, thereby completing the dynamic adjustment of the QoS of the virtual machine. On the one hand, the method solves the problem that the traditional static QoS configuration scheme often leads to idle or overloaded resources and the technical threshold thereof. On the other hand, the method can realize more accurate adjustment of the QoS of the virtual machine compared with the traditional static QoS configuration scheme, fully considers the IO characteristics of the virtual machine, realizes accurate and dynamic QoS adjustment, improves the resource utilization rate, and reduces the energy consumption.
[0027] The virtual machine service quality adjustment device and the non-volatile storage medium provided by the application correspond to the above method and have the same effects. BRIEF DESCRIPTION OF DRAWINGS
[0028] To more clearly illustrate the embodiments of the application, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0029] Figure 1 A flowchart of a virtual machine service quality adjustment method provided by an embodiment of the application.
[0030] Figure 2 A structural diagram of a virtual machine service quality adjustment device provided by an embodiment of the application.
[0031] Figure 3 Another structure diagram of a virtual machine quality of service adjustment device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0032] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0033] The core of the present application is to provide a virtual machine quality of service adjustment method, device and medium.
[0034] In order for the person in the technical field to better understand the present application scheme, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0035] In the related art, the quality of service (QoS) parameters of each virtual machine, such as input / output operations per second (IOPS), write bandwidth and read bandwidth, need to be configured based on actual situation, so that each virtual machine can be allocated to appropriate input / output (IO) resources for running, avoiding resource waste and performance bottleneck.
[0036] However, on the one hand, the demand of the virtual machine is not constant, and the need for IO resources may change during running. On the other hand, with the increase of the number and type of virtual machines, it becomes more and more difficult to manually configure the QoS of the virtual machine. Moreover, the above-mentioned static configuration scheme does not well consider the IO characteristics of the virtual machine, and the adjustment completely depends on experience, resulting in uncertain and limited QoS adjustment effect, which is not suitable for today's cloud platform cluster application.
[0037] To solve the above problems, the present application provides a virtual machine quality of service adjustment method, as shown in Figure 1 The method comprises the following steps:
[0038] S1: Collecting real-time data of input / output performance indicators of each virtual machine to obtain corresponding feature vectors.
[0039] S2: Taking the feature vectors as input, respectively predicting the input / output performance indicators through a long short-term memory network model and an exponential moving average model to obtain corresponding first prediction results and second prediction results.
[0040] S3: processing the first prediction result and the second prediction result by a weighted average algorithm to obtain a predicted value of the input-output performance index.
[0041] S4: adjusting the quality of service parameters corresponding to each virtual machine according to the predicted value of the input-output performance index corresponding to each virtual machine and the total performance resource information of the back-end storage.
[0042] For step S1, it should be noted that the input-output performance index to be collected in step S1 and the quality of service parameter to be adjusted in step S4 are one-to-one. That is, what kind of quality of service parameter needs to be adjusted, what kind of input-output performance index real-time data needs to be collected. Exemplarily, in the application process of the virtual machine, the parameters affecting the virtual machine disk QoS mainly include IOPS, write bandwidth and read bandwidth, etc., and the input-output performance index in step S1 also refers to IOPS, write bandwidth and read bandwidth, etc. The quality of service parameter can be understood as the specific parameters to be set for the IOPS, write bandwidth and read bandwidth corresponding to each virtual machine.
[0043] However, it should be noted that the input-output performance index in the present method is not limited to IOPS, write bandwidth and read bandwidth. The above is only because IOPS, write bandwidth and read bandwidth can directly represent the IO performance of the virtual machine disk, so they are selected. However, parameters such as CPU usage rate, memory usage rate and network traffic of the virtual machine can also indirectly reflect the IO performance of the virtual machine disk, and can also be one of the selection of the input-output performance index, which is not limited in the present embodiment.
[0044] In addition, for the feature vector mentioned in S1, that is, the feature vector corresponding to the data collected for the above input-output performance index, the data features of the collected input-output performance index real-time data are stored therein. The specific composition of the feature vector (i.e., the specific data features stored therein) is not limited in the present embodiment, and should be determined according to the prediction needs of the long short-term memory network model and the exponential moving average model in subsequent step S2. Generally speaking, the long short-term memory (LSTM) model and the exponential moving average (EMA) model used in step S2 are trained based on what data features, and the feature vector in step S1 needs to include what data features, which is not limited in the present embodiment.
[0045] In addition, after the data collected in step S1, the data can be filtered based on a certain manner to remove abnormal data, so as to ensure the reliability of the data and the accuracy of the subsequent prediction. For example, the present embodiment provides an optional implementation, and the above method further comprises: filtering abnormal data in the collected real-time data according to an abnormal filtering rule; and performing standardization processing on the filtered real-time data.
[0046] In the present embodiment, the specific form of the abnormal filtering rule is not limited, as long as the condition that is considered as abnormal data in actual application is met, and should be determined according to the specific data type. For example, the data collected more than a certain multiple (such as 5 times) of the historical average can be considered as abnormal data, which is filtered out. Other similar abnormal filtering rules can also be used.
[0047] For steps S2 and S3, since the LSTM model and the EMA model are two existing models, the specific training and establishment scheme is not described herein, and there are many mature technical solutions at present. The step S2 of the present method is to predict through the LSTM model and the EMA model respectively by using the same set of data. Then, in step S3, the fusion is performed to obtain the final prediction value. The weighted average processing in step S3 can be shown as follows:
[0048] ;
[0049] In the formula, x t+1 represents the final prediction value; represents the first prediction result output by the LSTM model, and w represents the weight coefficient corresponding to the LSTM model; represents the second prediction result output by the EMA model, and 1-w represents the weight coefficient corresponding to the LSTM model; t represents the current sampling period, and t+1 represents the next period of the current sampling period, that is, the future time.
[0050] It should be noted that the prediction of step S2 and the fusion of step S3 are both performed on an input / output performance index of a virtual machine. For example, assuming that there are three virtual machines A, B and C, and each virtual machine corresponds to three input / output performance indexes of IOPS, write bandwidth and read bandwidth. Assuming that the IOPS of virtual machine A is taken as an example, the IOPS needs to be predicted by the LSTM model and the EMA model respectively in step S2 to obtain two prediction results, i.e., a first prediction result and a second prediction result. Then, the two prediction results are weighted and averaged in step S3 to realize the fusion of the two models and obtain a final prediction value. The prediction value is the IOPS prediction value of virtual machine A. Based on the same method, the other input / output performance indexes of write bandwidth and read bandwidth of the virtual machine, and each input / output performance index of other virtual machines (B and C) also need to be processed in the same way to obtain the corresponding prediction values. The prediction values obtained in step S3 reflect the IO resource demand of each virtual machine in the future period of time, which can be used to guide the adjustment of the QoS parameter (allocation of IO resources), i.e., to guide the performance of step S4.
[0051] It is not difficult to understand that one complete process of the method is an adjustment of the QoS parameters of each virtual machine. To realize the dynamic adjustment of the QoS parameters of each virtual machine in the cloud platform cluster, the method should be continuously (or periodically) run, so that the QoS parameters of each virtual machine in the cloud platform cluster are dynamically adjusted considering the IO characteristics in a long period of time.
[0052] As can be seen from the above, the present application provides a virtual machine service quality adjustment method, which accurately predicts the running situation of a virtual machine according to real-time data of an IO performance index of the virtual machine through an LSTM model and an EMA model. The IO performance of each virtual machine in the next period is predicted to accurately realize the allocation of IO resources, thereby completing the dynamic adjustment of the QoS of the virtual machine. On the one hand, the method solves the problem that the traditional static QoS configuration scheme often leads to idle or overload of resources, and the technical threshold thereof. On the other hand, the method can realize more accurate adjustment of the QoS of the virtual machine compared with the traditional static QoS configuration scheme, fully considers the IO characteristics of the virtual machine, realizes accurate and dynamic QoS adjustment, improves the resource utilization rate and reduces the energy consumption.
[0053] On the other hand, in the above embodiment, the specific data features contained in the feature vector are not limited, and it is explained that the data features contained therein should be determined according to the needs of the LSTM model and the EMA model used. However, in order to further illustrate the method, the present embodiment also provides an alternative implementation scheme.
[0054] The feature vector comprises time features, statistical features, time sequence features and trend features of each parameter index. The time features comprise time information corresponding to the collection time of each input / output performance index; the statistical features comprise mean value, peak value and variance of the real-time data collected by each input / output performance index; the time sequence features comprise first-order difference between the mean value of current sampling period data and the mean value of last sampling period data of each input / output performance index; and the trend features are the slope of the mean value of data in a continuous first number of latest sampling periods of each input / output performance index.
[0055] Correspondingly, since the data features in the embodiment comprise statistical features, when collecting the real-time data of the input / output performance index of each virtual machine in step S1, only one set of real-time data cannot obtain statistical data such as mean value, peak value and variance. Therefore, for the data feature implementation solution provided in the embodiment, the collection of the real-time data of the input / output performance index of each virtual machine in step S1 is adaptively changed to: collecting the real-time data of each input / output performance index in time within the current sampling period.
[0056] For example, assuming that one sampling period is one hour and the sampling of the input / output performance index is performed every 1 minute, 60 sets of real-time data are obtained in each sampling period, which are used to obtain the statistical data such as the mean value, peak value and variance. It should be noted that the sampling period length and the time interval of the time collection shown in the above example are only an example and do not limit the embodiment.
[0057] In addition, the embodiment gives an explanation of the specific content of each data feature. The statistical features can comprise but are not limited to mean value, peak value and variance. For example, in a further embodiment, the statistical features can also comprise 90th percentile (P90). The meanings of the features such as mean value, peak value and variance are clear and unique, and the embodiment will not be repeated. The 90th percentile means that 90% of sample values in the data set are less than or equal to the value, and only 10% of sample values are higher than it. For example, taking the IOPS of the virtual machine A as an example, all the IOPS values collected in one sampling period are arranged in ascending order, assuming that there are 100 values, the 90th value is the 90th percentile, which represents that 90% of sample values in the current sampling period are less than or equal to the value, and only 10% of sample values are higher than it.
[0058] For the time feature, the definition thereof in the foregoing description is the time information corresponding to the collection time of each input / output performance index. An optional embodiment is the collection time when data collection is performed, which can be represented by timestamp information, i.e., the timestamp information of the system when real-time data of the input / output performance index is collected. Further, in addition to the timestamp information, other time information related to the collection time, such as the day of the week (i.e., the day of the week when the data is collected) and whether it is a holiday (i.e., whether the day when the data is collected is a holiday), can be included, and the present embodiment does not limit this.
[0059] For the time sequence feature, it refers to a feature that can reflect the relationship in the time sequence between the data collected in the current sampling period and the data collected in the previous sampling period. For example, the foregoing embodiment provides an optional embodiment, i.e., the first-order difference between the mean value of the real-time data sampled in the current sampling period and the mean value of the data in the previous sampling period. It is easy to understand that the time sequence feature is also based on an input / output performance index of a virtual machine. For example, the IOPS of the virtual machine A in the foregoing example. It is assumed that the IOPS data of the virtual machine A collected in the first sampling period is IOPS A1 , the IOPS data of the virtual machine A collected in the second sampling period is IOPS A2 , and the corresponding time sequence feature is IOPS A2 - IOPS A1 .
[0060] Similarly, the trend feature also reflects the data features between periods, mainly reflecting the "change trend" of the input / output performance index between different sampling periods over time. It is easy to understand that in the current mathematical statistics, the slope is commonly used to represent the change trend of data, and therefore in the foregoing embodiment, the slope of the mean value of the data collected in a certain number (i.e., the first number) of consecutive sampling periods can be used to represent the trend feature. It should be noted that the present embodiment does not limit the specific number of the first number. Optionally, the first number can be 3. That is, the slope of the mean value of the last 3 periods is obtained as the trend feature.
[0061] Based on the foregoing, it can be seen that the present embodiment provides a plurality of different data features, including statistical features, time features, time sequence features, and trend features, thereby providing more comprehensive data for the model to complete prediction and obtaining more accurate prediction results, which is beneficial to subsequent implementation of more accurate and reliable virtual machine QoS dynamic adjustment.
[0062] Further, it needs to be noted that the above-mentioned embodiment is only an optional embodiment. In actual application, the kind of data features can be increased or decreased on the basis of the above-mentioned embodiment to realize more accurate prediction or improve the overall efficiency of the method. For example, the embodiment further provides a further embodiment, and the feature vector further comprises a Fourier feature.
[0063] The Fourier feature comprises the first second number of high-frequency components after Fourier transform is performed on the plurality of real-time data collected in the sampling period.
[0064] For example, it is assumed that one sampling period is 60 minutes and data collection is performed once per minute. Then, one group of data of one input / output performance index of one virtual machine obtained in one sampling period is a sequence with a length of 60, which is assumed to be X[n] (N=60, n=0, 1, 2, 3, 4, … 59).
[0065] Then, Fourier transform is performed on the sequence to obtain:
[0066] ;
[0067] In the formula, X[k] represents the complex result of the kth frequency component, i represents an imaginary unit, and e represents a natural constant.
[0068] After the Fourier transform is completed, the frequency component amplitude G(k) also needs to be calculated:
[0069] ;
[0070] In the formula, Re(·) represents a real part, and Im(·) represents an imaginary part.
[0071] Then, the high-frequency components can be screened. Due to the symmetry of Fourier transform, the components with k>N / 2 are the same as the components with k<N / 2, so the amplitudes of any one half can be taken and sorted in descending order for screening. In the embodiment, only the first second number of components are extracted, and the high-frequency components can be obtained. In the embodiment, the second number is not limited, and the second number can be 4, so the first four components in the sorted amplitude sequence can be taken as the Fourier feature.
[0072] It should be noted that the embodiment can strengthen the model's ability to capture periodic patterns by adding Fourier features. Fourier transform decomposes time-domain signals into frequency-domain components, enabling the model to directly learn periodic patterns in the data (e.g., every sampling period). In particular, when the method is used for continuous and periodic dynamic adjustment of virtual machine QoS, adding Fourier features can effectively improve the accuracy of model prediction. In addition, adding Fourier features can also enhance the computational efficiency of the model. Through Fourier transform, convolution operations can be converted into element-wise multiplication in the frequency domain (convolution theorem), significantly reducing computational complexity. Furthermore, adding Fourier features can also enhance the robustness of the model. Frequency domain features are more robust to noise and adversarial attacks. The perturbations of adversarial samples are usually more obvious in the frequency domain, and through frequency domain filtering or constraints, the model can ignore high-frequency noise and focus on key frequency components. In addition, the addition of Fourier features also has the advantages of improving feature representation, improving the generalization ability of the model, and improving the interpretability of the model, etc.
[0073] Further, in addition to the above-mentioned data based on the cloud platform cluster itself, other data features can be added from the user's (or business's) perspective to include user (business) requirements in the consideration range of virtual machine QoS dynamic adjustment. Optionally, the embodiment provides a specific implementation scheme, and the feature vector further includes: a business feature.
[0074] The business feature includes: high input / output (IO) type, high throughput type, mixed type, and remaining type; wherein the business feature is a business type label attached according to the business of the virtual machine at the beginning of the creation of each virtual machine.
[0075] It is not difficult to understand that the high IO type mainly refers to a higher input / output performance indicator IOPS; the high throughput type mainly refers to a higher input / output performance indicator write bandwidth or read bandwidth; and the mixed type mainly refers to higher input / output performance indicators IOPS and write bandwidth or read bandwidth; and the remaining type mainly refers to the case where IOPS, write bandwidth, and read bandwidth are all low, which is a supplement to the above-mentioned business types. The embodiment based on the setting of the business type or business feature enables the consideration of the business type of the virtual machine in addition to the IO data of the virtual machine when dynamically adjusting the QoS of the virtual machine subsequently, thereby achieving more accurate adjustment effect.
[0076] Further, the rest type can be further divided into low IO type and low throughput type. However, since the method is mainly for dynamic adjustment of QoS of the virtual machine, when the virtual machine is of high IO type, high throughput type or mixed type, it is more likely to enter the IO performance bottleneck and more needs to adjust the QoS. Whether it is low IO type or low throughput type, the adjustment demand of the QoS of the virtual machine is not as urgent as the above, and the adjustment accuracy is also more relaxed, so the rest type is combined in the above embodiment. But in the scenarios shown in Tables 1 and 2 below, low IO type and low throughput type are distinguished. Among them, 1 represents high IO type, 2 represents high throughput type, 3 represents low IO type, 4 represents low throughput type, and 5 represents mixed type.
[0077] According to the data characteristics provided by the above embodiments, an optional data collection scheme is shown in Table 1 below, and the corresponding feature vector is shown in Table 2 below:
[0078] Table 1 Data collection table
[0079]
[0080] Table 2 Feature vector table
[0081]
[0082] In the above two tables, Monday to Sunday are represented by 1-7 respectively; "yes" in holiday is represented by 1, and "no" is represented by 0.
[0083] Further, the above embodiment has explained that the service characteristics are determined based on the service type label of the virtual machine based on the service of the virtual machine at the beginning of creation. However, how to label the service type, the above embodiment does not limit. Based on this, the present embodiment provides an optional implementation scheme other than manual. The above service type label of the virtual machine is labeled according to the service of the virtual machine, which includes:
[0084] S51: When the number of input and output operations per second of the virtual machine is greater than a first typical value, and the write bandwidth and the read bandwidth are both less than a second typical value, the virtual machine is labeled with a high input and output type service type label.
[0085] S52: When the write bandwidth or read bandwidth of the virtual machine is greater than a third typical value, the virtual machine is labeled with a high throughput type service type label.
[0086] S53: When the number of input and output operations per second of the virtual machine is greater than a first typical value, and the write bandwidth or read bandwidth is greater than a second typical value, the virtual machine is labeled with a mixed type service type label.
[0087] S54: In other cases, the virtual machine is labeled with a rest type service type label.
[0088] It should be noted that the specific values of each of the typical values described above in the embodiment are not limited. However, to more clearly illustrate the embodiment, an optional example is given below: when IOPS > 1000 (times) (i.e., the first typical value is 1000), it is a high IO type; when the read bandwidth or the write bandwidth > 100 (MB / s) (i.e., the third typical value is 100), it is a high throughput type; when IOPS > 1000 (times) and the read bandwidth or the write bandwidth > 70 (MB / s) (i.e., the second typical value is 70).
[0089] That is, the embodiment provides a scheme for labeling the business type of each virtual machine based on the size relationship between the specific value and the typical value of the input / output performance indicator, which can be automatically implemented by a machine without manual completion, greatly improving the overall efficiency and reducing the probability of labeling errors.
[0090] On the other hand, the above embodiment does not limit how to complete the adjustment of the virtual machine QoS after determining the predicted value of each input / output performance indicator in step S4. Alternatively, a relatively easy-to-implement implementation is as follows: based on the total performance resource information of the back-end storage, the maximum IO resource quantity that can be allocated by the current system can be determined; if the maximum IO resource quantity is allowed, the predicted value obtained in step S3 can be used as the target value to complete the adjustment of the corresponding QoS parameter.
[0091] For example, taking the IOPS adjustment of virtual machine A as an example. It is assumed that after steps S1-S3, it is determined that the corresponding predicted value is 1000; and based on the total performance resource information of the back-end storage, it is determined that the system can still allocate 1500 IOPS resources; then the IOPS item in the QoS parameter of virtual machine A can be adjusted to 1000.
[0092] However, this scheme is relatively extreme and is likely to cause the virtual machine to exceed the set storage upper limit, which requires frequent adjustment of the QoS parameter and is also likely to affect the IO performance of the virtual machine. Based on this, the embodiment also provides another optional implementation, and the adjustment process of the service quality parameter corresponding to any of the input / output performance indicators of any of the virtual machines in step S4 specifically includes:
[0093] S41: increasing the redundant value of the tolerance ratio on the basis of the predicted value to obtain a target value.
[0094] S42: determining the remaining allocable value of the current input / output performance indicator according to the total performance resource information of the back-end storage.
[0095] S43: if the remaining allocable value is greater than or equal to the target value, adjusting the value of the service quality parameter to the target value.
[0096] The adjustment of the QoS parameter of the virtual machine disk in the cloud platform cluster can be realized by using the rbd qos update command of Ceph (a distributed storage system).
[0097] It should be noted that the embodiment does not limit the specific value of the tolerance ratio. In an optional embodiment, the tolerance ratio can be specifically 20%. Taking IOPS as an example again, assuming that the predicted value is 1000, in the case that the remaining allocable IOPS resource is sufficient, the QoS parameter of the newly allocated IOPS should be 1000*(1+20%) = 1200.
[0098] As can be seen from the above, the embodiment reserves 20% of the predicted value as a redundancy for coping with burst conditions when adjusting the QoS parameter, thereby avoiding the virtual machine from frequently entering a performance bottleneck after the QoS parameter is adjusted, and achieving better dynamic adjustment of the QoS parameter. In addition, the above adjustment is based on the premise that the remaining allocable resource of the system allows, that is, the QoS parameter realized by the method does not exceed the upper limit of the storage.
[0099] Further, as can be known from the above embodiment, steps S1-S4 are a complete process performed in one sampling period, and step S4 corresponds to routine dynamic adjustment of the QoS parameter in one sampling period. For example, if one sampling period is set to one hour, the QoS parameter adjustment performed in step S4 is performed once an hour, which cannot meet various requirements in actual applications. Therefore, in addition to the above, the embodiment further provides other QoS parameter adjustment schemes. The above method further comprises:
[0100] S601: triggering immediate adjustment when any input / output performance index of any virtual machine continuously exceeds the adjustment ratio threshold of the current service quality parameter value for a third number of periods.
[0101] It should be noted that the embodiment also does not limit the specific values of the third number and the adjustment ratio threshold. For example, in an optional embodiment, the third number is 3 and the adjustment ratio threshold is 90%. Taking IOPS as an example again (the third number and the adjustment ratio threshold corresponding to each input / output performance index can be the same or different), the triggering condition of the immediate adjustment is that IOPS continuously exceeds 90% of the QoS parameter (IOPS) of the corresponding period for three consecutive collection periods.
[0102] The immediate adjustment comprises:
[0103] S61: determining the historical period error of the target input / output performance index in each sampling period; the historical period error is the difference between the actual value and the predicted value of the target input / output performance index in the current sampling period.
[0104] Specifically, the historical period error calculation formula is as follows:
[0105] ;
[0106] In the formula, error t represents the historical period error of the period t. and respectively represent the actual value and the predicted value of the period t.
[0107] S62: Determine the corresponding standard deviation according to the determined historical period error of each sampling period.
[0108] S63: Predict the predicted value of the target input-output performance indicator in the next sampling period through the long short-term memory network model and the exponential moving average model as the future predicted value.
[0109] S64: On the basis of the future predicted value, add the redundant value of the tolerance ratio to obtain the first intermediate result value; determine the corresponding 90% confidence interval through the future predicted value and the standard deviation, and take the upper limit value of the 90% confidence interval as the second intermediate result value.
[0110] Specifically, the 90% confidence interval is as follows:
[0111] ;
[0112] In the formula, the period t is the current period, so the next period is t+1; σ represents the standard deviation; the upper limit value of the 90% confidence interval, that is, the second intermediate result is .
[0113] Similarly, the present embodiment also does not limit the specific value of the tolerance ratio. As the example provided in the above embodiment, the tolerance ratio can be 20%. At this time, the first intermediate result is .
[0114] S65: Adjust the service quality parameter through the minimum value of the first intermediate result value and the second intermediate result value.
[0115] Specifically, step S65 can be represented by the following formula:
[0116] ;
[0117] In the formula, x iops represents the adjustment target value when the QoS parameter is IOPS.
[0118] From the above, the embodiment provides a real-time adjustment scheme of QoS parameters. The trigger condition is that the input / output performance index exceeds the adjustment proportion threshold of the corresponding QoS parameter limit for a certain period of time, at which time it is indicated that a certain input / output performance index of the virtual machine disk will exceed the QoS parameter limit, and the performance bottleneck can be avoided by adjusting the QoS parameter. Further, the embodiment also provides a specific real-time adjustment scheme. The QoS parameter is realized by the historical period error, and the 90% confidence interval and the tolerance proportion are introduced, so as to ensure that the adjusted QoS parameter can effectively solve the problem, avoid repeated entry into real-time adjustment, and reduce the occupation of system resources.
[0119] On the other hand, in addition to the real-time adjustment trigger mode given in the above embodiment, the embodiment also provides another adjustment trigger scheme, which further includes, before step S4:
[0120] S602: Determine whether the predicted value of the input / output performance index of each virtual machine is different from the corresponding service quality parameter by more than the first adjustment proportion; if yes, go to step S4.
[0121] It should be noted that the embodiment does not limit the specific value of the first adjustment proportion. In an optional embodiment, the first adjustment proportion can be 20%. That is, when the predicted value is outside 80% to 120% of the current QoS parameter value, the adjustment is triggered based on this condition. As can be seen, the embodiment provides a scheme for triggering QoS parameter adjustment when the predicted value finds that the QoS parameter value of the next period of the virtual machine deviates too much from the current set value, so that the QoS parameter adjustment is more flexible and the performance of the virtual machine is ensured.
[0122] Further, when the method adjusts the QoS parameter, there can be multiple virtual machines that need to adjust the same QoS parameter at the same time. At this time, if the remaining IO resources of the system are sufficient, multiple virtual machines can be allocated sufficient resources and can be adjusted in parallel. However, when the remaining IO resources of the system are not sufficient, how to realize the QoS parameter adjustment among multiple virtual machines, the embodiment provides an optional implementation scheme. Step S4 further includes, when adjusting the service quality parameter corresponding to each virtual machine:
[0123] S44-A: When the remaining allocatable value cannot meet the adjustment demand of the service quality parameter corresponding to each virtual machine, the service quality parameter is adjusted according to the adjustment weight proportion corresponding to the business type label of each virtual machine according to the business type label of each virtual machine.
[0124] From the above embodiments, it can be seen that different service type labels have different priorities, and the specific priorities can be set by the user, which is not limited in the embodiments. However, based on the priority, the QoS parameter adjustment of the virtual machines of different service types can be performed based on different weight ratios. In other words, the QoS parameter adjustment of multiple virtual machines is performed in the embodiments, but the adjustment ratio of the virtual machine with high priority is larger, and the adjustment ratio of the virtual machine with low priority is smaller.
[0125] For example, assuming that the target value of the QoS parameter to be adjusted for the virtual machine A is 1200, and the original value is 1000, the change amount to be adjusted is 200; assuming that the target value of the QoS parameter to be adjusted for the virtual machine B is 1150, and the original value is 1050, the change amount to be adjusted is 100; further, assuming that the service type of the virtual machine A is the remaining type, and the service type of the virtual machine B is the high IO type, the priority of the virtual machine B is higher than that of the virtual machine A, and the adjustment ratio of the virtual machine B is larger than that of the virtual machine A; assuming that the adjustment ratio of the virtual machine B is 80%, and the adjustment ratio of the virtual machine A is 40%; then the QoS parameter of the virtual machine B is allowed to be adjusted to 1050+ (1150-1050)*80%=1130, and the QoS parameter of the virtual machine A is allowed to be adjusted to 1000+ (1200-1000)*40%=1080.
[0126] As can be seen from the above, the embodiments provide a scheme for adjusting the QoS parameters of multiple virtual machines based on the service type priority in different ratios. On the one hand, it ensures that the QoS parameters of multiple virtual machines can be adjusted to a certain extent, and the IO performance of the virtual machine disk is ensured. On the other hand, the adjustment can be performed in different degrees based on the priority of the service type of each virtual machine, so that the adjustment range of the virtual machine with important service is larger, and the IO performance is ensured.
[0127] In addition, the embodiments also provide a scheme for simultaneously adjusting the QoS parameters of multiple virtual machines in the case of insufficient system resources.
[0128] Step S4 further comprises the following steps when adjusting the service quality parameters corresponding to each virtual machine:
[0129] S44-B: When the remaining allocatable value cannot meet the adjustment requirement of the service quality parameters corresponding to each virtual machine, the service quality parameters are adjusted in the order of the corresponding priority according to the service type label corresponding to each virtual machine.
[0130] Similar to the above embodiment, this embodiment is also based on the different priorities of the business types of each virtual machine to perform different QoS parameters. The difference is that the above embodiment is to adjust the QoS parameters of all virtual machines, but the adjustment degree is different based on the high and low of the priority. This embodiment is to adjust the QoS parameters of different virtual machines based on the high and low of the priority, and only when the adjustment of the virtual machine with high priority meets the requirement, the adjustment of the virtual machine with low priority is performed, which is another scheme for adjusting the QoS parameters of multiple virtual machines based on the priority.
[0131] It also needs to be noted that although the above embodiments and the above embodiments mention the "adjustment" of the parameters, the adjustment of the parameters has two adjustment directions of increasing and decreasing, and the above mainly aims at the "increasing" direction, that is, the competition caused by the system allocating more IO resources. If the parameter adjustment is decreasing, it is to release the IO resources of the system, and there will be no competition and there is no problem as mentioned in the above embodiments.
[0132] On the other hand, as known from the above embodiments, the LSTM model and the EMA model are the key to ensure the accuracy of the dynamic adjustment of the QoS parameters of the virtual machine by the method. With the actual application, the LSTM model and the EMA model also need to be continuously optimized and updated. In addition, the weighting coefficients used when the LSTM model and the EMA model are fused in step S3 also need to be optimized and updated. In view of this, this embodiment provides an optional scheme for updating the LSTM model, the EMA model, and the weighting coefficients used when the two models are fused by weighted average processing. The above method further comprises:
[0133] S71: Determine the historical period error of the target input and output performance index in each sampling period.
[0134] The historical period error is the difference between the actual value and the predicted value of the target input and output performance index in the current sampling period, which can be represented by the following formula:
[0135] ;
[0136] In the formula, error x represents the historical period error, and the subscript x can be LSTM and EMA, which respectively represent the historical period error of the LSTM model and the historical period error of the EMA model; N represents the total number of sampling periods; represents the corresponding actual value, represents the corresponding predicted value.
[0137] S72: adjusting the model parameters and weight coefficients of the LSTM model and the EMA model when the historical period error of the presence of a continuous fourth number of sampling periods exceeds a second adjustment proportion of the predicted value.
[0138] The specific values of the fourth number and the second adjustment proportion are not limited in the embodiment. In an optional embodiment, the fourth number is specifically 3, and the second adjustment proportion is 15%. That is, the triggering condition of step S72 is that when the historical period error of the presence of 3 continuous sampling periods exceeds 15% of the predicted value, the model parameters and weight coefficients of the LSTM model and the EMA model are adjusted.
[0139] Further, the embodiment does not limit how to adjust the model parameters and weight coefficients. The adjustment of the model parameters can be completed by retraining the LSTM model and the EMA model based on all the historical data at the current time. As for the weight coefficients, they can be re-determined based on the first determination logic and all the data at the current time. However, the embodiment also provides an optional adjustment scheme for the weight coefficients. The adjustment of the weight coefficients in step S72 specifically includes:
[0140] S721: determining the historical prediction error of the LSTM model and the EMA model.
[0141] The historical prediction error is the difference between the predicted value output by the LSTM model / EMA model and the actual value of the corresponding input-output performance indicator.
[0142] S722: adjusting the weight coefficients between the LSTM model and the EMA model according to the historical prediction error.
[0143] That is, the weight coefficient w of the LSTM model (the weight coefficient 1-w of the EMA model can be determined according to w, without additional adjustment) can be adjusted by the following formula:
[0144] w= ;
[0145] Based on the scheme provided in the embodiment, the weight coefficients of the two models can be quickly adjusted without re-setting, improving the efficiency and prediction accuracy of the method.
[0146] Further, in addition to the adjustment triggering condition of the model parameters and weight coefficients given in the above embodiment S72, the embodiment also provides another adjustment triggering condition of the model parameters and weight coefficients. The above method further includes:
[0147] S73: adjusting the model parameters and weight coefficients of the LSTM model and the EMA model every fifth number of sampling periods.
[0148] Similarly, the fifth quantity is not limited to a specific number, but the fifth quantity is generally required to be greater than the fourth quantity described above to distinguish two different triggering conditions. For example, the fifth quantity can be specifically 6. That is, every 6 sampling periods, even if the adjustment of the model parameters and the weight coefficients is not triggered due to other conditions, the effectiveness of the prediction model is ensured due to the adjustment triggered by the embodiment. As can be seen, the embodiment is a supplement to the above-described embodiment, and a triggering condition for triggering the re-adjustment of the model parameters and the weight coefficients based on time only is given.
[0149] On the other hand, the hardware device for executing the method can be deployed in an edge computing node (such as a factory local server, a vehicle-mounted terminal) in a lightened manner. In view of the characteristics of unstable network and limited computing power in an edge scene, the feature engineering link (such as a more simplified sliding window calculation) is optimized, and a prediction model is trained in a federated learning mode, so that the localization adaptive adjustment of the disk QoS of the edge device is realized while the data privacy is protected.
[0150] In addition, the method can also continuously monitor the IO abnormal features (such as sudden delay increase and read-write imbalance) of the disk, and train an abnormal detection model in combination with historical fault data. When the abnormal detection model predicts a potential fault risk, the QoS redundancy (that is, the tolerance ratio in the above-described embodiment) of the original virtual machine is automatically increased, and data hot migration to a standby disk is triggered at the same time, so as to form a closed loop of “prediction-adjustment-self-healing” and reduce the fault impact to the minimum.
[0151] In addition to the embodiment of the virtual machine service quality adjustment method provided in the above-described embodiments, the present application also provides an embodiment corresponding to a computer program product. The computer program product includes computer programs / instructions, which, when executed by a processor, can implement the steps of the virtual machine service quality adjustment method according to any one of the above-described embodiments.
[0152] Since the embodiments of the computer program product part correspond to the embodiments of the method part, the embodiments of the computer program product part are described with reference to the description of the embodiments of the method part, and will not be described here.
[0153] In the above-described embodiments, a virtual machine service quality adjustment method is described in detail, and the present application also provides an embodiment corresponding to a virtual machine service quality adjustment device. It should be noted that the embodiments of the device part are described from two angles, one is based on the functional module, and the other is based on the hardware.
[0154] Based on the functional module, the embodiment provides a virtual machine service quality adjustment device, as shown in Figure 2 the device includes:
[0155] The data processing module 11 is configured to collect real-time data of the input / output performance indicators of the virtual machines to obtain corresponding feature vectors.
[0156] The first prediction module 12 is configured to take the feature vectors as input, and predict the input / output performance indicators by using a long short-term memory network model and an exponential moving average model respectively to obtain corresponding first prediction results and second prediction results.
[0157] The second prediction module 13 is configured to process the first prediction results and the second prediction results by using a weighted average algorithm to obtain prediction values of the input / output performance indicators.
[0158] The resource allocation module 14 is configured to adjust service quality parameters of the virtual machines according to the prediction values of the input / output performance indicators of the virtual machines and total performance resource information of the back-end storage.
[0159] Since the embodiments of the device part correspond to the embodiments of the method part, the embodiments of the device part are described in the description of the embodiments of the method part, and are not described here.
[0160] Figure 3 A structural diagram of a virtual machine service quality adjustment device provided by another embodiment of the present application is shown in FIG. 2, which includes a memory 20 and a processor 21. Figure 3 The memory 20 is configured to store a computer program, and the processor 21 is configured to execute the computer program to realize the steps of the virtual machine service quality adjustment method according to any one of the above embodiments.
[0161] The virtual machine service quality adjustment device provided by the embodiment can include but is not limited to a mobile terminal, a personal computer, a workstation, etc.
[0162] The processor 21 can include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one of a hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), a programmable logic array (PLA), etc. The processor 21 can also include a main processor and a coprocessor. The main processor is a processor for processing data in a wake-up state, also referred to as a central processing unit (CPU). The coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 21 can be integrated with a graphics processor (GPU) for rendering and drawing content to be displayed by the display screen. In some embodiments, the processor 21 can further include an artificial intelligence (AI) processor for processing machine learning-related computing operations.
[0163] The memory 20 can include one or more computer-readable storage media that can be non-transitory. The memory 20 can further include a high-speed random access memory, and a nonvolatile memory such as one or more disk storage devices, flash storage devices. In this embodiment, the memory 20 is at least used to store a computer program 201, wherein the computer program is loaded and executed by the processor 21, and can implement the related steps of the virtual machine service quality adjustment method disclosed in any of the preceding embodiments. In addition, the resources stored by the memory 20 can further include an operating system 202 and data 203, etc., and the storage manner can be temporary storage or permanent storage. The operating system 202 can include Windows, Unix, Linux, etc. The data 203 can include but is not limited to a virtual machine service quality adjustment method, etc.
[0164] In some embodiments, the virtual machine service quality adjustment apparatus can further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
[0165] Those skilled in the art can understand that the structure shown in the above embodiments does not constitute a limitation on the virtual machine service quality adjustment apparatus, and can include more or fewer components than those shown in the drawings. Figure 3
[0166] The embodiment of the present application provides a virtual machine service quality adjusting device, which comprises a memory and a processor, and the processor can realize the following method when executing the program stored in the memory: a virtual machine service quality adjusting method.
[0167] Finally, the present application also provides an embodiment corresponding to a nonvolatile storage medium. The nonvolatile storage medium stores a computer program, and the computer program realizes the steps recorded in the above method embodiments when executed by a processor.
[0168] It can be understood that if the method in the above embodiment is realized in the form of a software function unit and sold or used as an independent product, the method can be stored in a nonvolatile storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and executes all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0169] The above describes in detail the virtual machine service quality adjusting method, device and medium provided by the present application. The embodiments in the specification are described in a progressive manner, and each embodiment mainly describes the difference from other embodiments. The same or similar parts of each embodiment can be referred to. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the related parts can be referred to the method part. It should be pointed out that for ordinary skilled in the art, without departing from the principle of the present application, the present application can be improved and modified in several ways, and these improvements and modifications also fall within the protection scope of the present application.
[0170] It also needs to be explained that in the present specification, the relational terms such as first and second and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
Claims
1. A method of adjusting quality of service for a virtual machine, the method comprising: The method comprises: collecting real-time data of input / output performance indicators of each virtual machine to obtain a corresponding feature vector; wherein collecting real-time data of input / output performance indicators of each virtual machine comprises: collecting real-time data of each of the input / output performance indicators in a time-sharing manner within a current sampling period; the feature vector comprises: time characteristics, statistical characteristics, time sequence characteristics and trend characteristics of each parameter indicator; wherein the time characteristics comprise time information corresponding to the collection time of each of the input / output performance indicators; the statistical characteristics comprise mean value, peak value and variance of the real-time data collected by each of the input / output performance indicators; the time sequence characteristics comprise first-order difference between the mean value of the current sampling period data and the mean value of the last sampling period data of each of the input / output performance indicators; and the trend characteristics are the slope of the mean value of the data of each of the input / output performance indicators in the first number of consecutive latest sampling periods; using the feature vector as input, predicting the input / output performance indicators by a long short-term memory network model and an exponential moving average model respectively to obtain corresponding first prediction results and second prediction results; processing the first prediction results and the second prediction results by a weighted average algorithm to obtain prediction values of the input / output performance indicators; adjusting the service quality parameters corresponding to each of the virtual machines according to the prediction values of the input / output performance indicators and the total performance resource information of the back-end storage of each of the virtual machines; wherein adjusting the service quality parameters corresponding to each of the virtual machines according to the prediction values of the input / output performance indicators and the total performance resource information of the back-end storage comprises: for the service quality parameter adjustment process corresponding to any of the input / output performance indicators of any of the virtual machines, comprising: increasing a redundant value of a tolerance ratio on the basis of the prediction value to obtain a target value; determining a remaining allocable value of the current input / output performance indicator according to the total performance resource information of the back-end storage; if the remaining allocable value is greater than or equal to the target value, adjusting the value of the service quality parameter to the target value.
2. The virtual machine quality of service adjustment method of claim 1, wherein, The feature vector further comprises a Fourier feature; the Fourier feature comprises: the first number of high-frequency components obtained by performing Fourier transform on a plurality of real-time data collected in the current sampling period for each of the input / output performance indicators.
3. The method of claim 2, wherein, The feature vector further comprises a service feature; the service feature comprises: high input / output type, high throughput type, mixed type and remaining type; wherein the service feature is a service type label attached to each of the virtual machines at the beginning of creation according to the service of the virtual machine.
4. The method of claim 3, wherein, The statistical characteristics further comprise: 90th percentile of each of the input / output performance indicators.
5. The method of claim 4, wherein, The input / output performance indicators comprise: input / output operations per second, write bandwidth and read bandwidth.
6. The method of claim 5, wherein, attaching a service type label to the virtual machine according to the service of the virtual machine comprises: when the input / output operations per second of the virtual machine is greater than a first typical value, and the write bandwidth and the read bandwidth are both less than a second typical value, attaching the service type label of high input / output type to the virtual machine; when the write bandwidth or the read bandwidth of the virtual machine is greater than a third typical value, tagging the virtual machine with the service type label of a high-throughput type; when the input / output operation per second of the virtual machine is greater than a first typical value, and the write bandwidth or the read bandwidth is greater than the second typical value, tagging the virtual machine with the service type label of a mixed type; in other cases, tagging the virtual machine with the service type label of a remaining type.
7. The method of claim 4, wherein, Further comprising: triggering an instant adjustment when any of the input / output performance indicators of any of the virtual machines exceeds an adjustment proportion threshold of a current quality of service parameter value for a third number of consecutive periods; wherein the instant adjustment comprises: determining a historical period error of a target input / output performance indicator in each sampling period; the historical period error is a difference between an actual value and a predicted value of the target input / output performance indicator in a current sampling period; determining a corresponding standard deviation according to the determined historical period error of each sampling period; predicting a predicted value of the target input / output performance indicator in a next sampling period as a future predicted value through the long short-term memory network model and the exponential moving average model; on the basis of the future predicted value, adding a redundant value of a tolerance proportion to obtain a first intermediate result value; determining a corresponding 90% confidence interval through the future predicted value and the standard deviation, and taking an upper limit value of the 90% confidence interval as a second intermediate result value; adjusting the quality of service parameter through the minimum of the first intermediate result value and the second intermediate result value.
8. The method of claim 4, wherein, Before the step of adjusting the quality of service parameter of each virtual machine according to the predicted value of the input / output performance indicator corresponding to each virtual machine and the total performance resource information of the back-end storage, further comprising: determining whether the predicted value of the input / output performance indicator corresponding to each virtual machine differs from the corresponding quality of service parameter by more than a first adjustment proportion; if so, proceeding to the step of adjusting the quality of service parameter of each virtual machine according to the predicted value of the input / output performance indicator corresponding to each virtual machine and the total performance resource information of the back-end storage.
9. The virtual machine quality of service adjustment method according to claim 7 or 8, wherein, When adjusting the quality of service parameter of each virtual machine, further comprising: when the remaining allocatable value cannot meet the adjustment requirement of the quality of service parameter corresponding to each virtual machine, adjusting the quality of service parameter according to an adjustment weight proportion corresponding to the service type label corresponding to each virtual machine according to the service type label corresponding to each virtual machine.
10. The virtual machine quality of service adjustment method according to claim 7 or 8, wherein, When adjusting the quality of service parameter of each virtual machine, further comprising: when the remaining allocatable value cannot meet the adjustment requirement of the quality of service parameter corresponding to each virtual machine, adjusting the quality of service parameter according to a corresponding priority order according to the service type label corresponding to each virtual machine.
11. The method of claim 1, wherein, Further comprising: determining a historical period error of a target input / output performance indicator in each sampling period; the historical period error is a difference between an actual value and a predicted value of the target input / output performance indicator in a current sampling period; When the history period error of the continuous fourth number of sampling periods exceeds the second adjustment proportion of the predicted value, the model parameters and weight coefficients of the long short-term memory network model and the exponential moving average model are adjusted.
12. The method of claim 11, wherein, Also includes: Every fifth number of sampling periods, the model parameters and weight coefficients of the long short-term memory network model and the exponential moving average model are adjusted.
13. The virtual machine quality of service adjustment method according to claim 11 or 12, wherein, Adjusting the weight coefficient includes: Determine the history prediction error of the long short-term memory network model and the exponential moving average model; wherein the history prediction error is the difference between the predicted value output by the long short-term memory network model / exponential moving average model and the actual value of the corresponding input / output performance index; According to the history prediction error, the weight coefficient between the long short-term memory network model and the exponential moving average model is adjusted.
14. The method of claim 1, wherein, After collecting real-time data of input / output performance indicators of each virtual machine, it also includes: Filtering abnormal data collected in real-time data according to abnormal filtering rules; The filtered real-time data is standardized.
15. A virtual machine quality of service adjustment apparatus, characterized by comprising: Including: The data processing module is used to collect real-time data of input / output performance indicators of each virtual machine to obtain corresponding feature vectors; wherein collecting real-time data of input / output performance indicators of each virtual machine includes: collecting real-time data of each item of the input / output performance indicators in the current sampling period; The feature vector includes: time characteristics, statistical characteristics, time sequence characteristics and trend characteristics of each parameter index; wherein the time characteristics include the time information corresponding to the collection time of each item of the input / output performance indicators; the statistical characteristics include the mean, peak and variance of the real-time data collected by each item of the input / output performance indicators; the time sequence characteristics include the first order difference between the current sampling period data mean and the last sampling period data mean of each item of the input / output performance indicators; the trend characteristics are the slope of the data mean of each item of the input / output performance indicators in the continuous first number of recent sampling periods; The first prediction module is used to predict the input / output performance indicators by long short-term memory network model and exponential moving average model respectively with the feature vector as input to obtain corresponding first prediction result and second prediction result; The second prediction module is used to process the first prediction result and the second prediction result by weighted average algorithm to obtain the predicted value of the input / output performance indicators; The resource allocation module is used to adjust the quality of service parameters corresponding to each virtual machine according to the predicted value of the input / output performance indicators corresponding to each virtual machine and the total performance resource information of the back-end storage; wherein the adjustment of the quality of service parameters corresponding to each virtual machine according to the predicted value of the input / output performance indicators corresponding to each virtual machine and the total performance resource information of the back-end storage includes: For any virtual machine, the service quality parameter adjustment process corresponding to any item of the input / output performance indicators includes: Increase the redundant value of the tolerance proportion on the basis of the predicted value to obtain the target value; determining a remaining allocable value of the input / output performance index according to the total performance resource information stored in the backend; if the remaining allocable value is greater than or equal to the target value, adjusting the value of the service quality parameter to the target value.
16. A computer program product comprising computer programs / instructions, characterized in that, The computer program / instruction, when executed by the processor, implements the steps of the virtual machine service quality adjustment method according to any one of claims 1 to 14.
17. A virtual machine quality of service adjustment apparatus characterized by comprising: comprising: a memory for storing a computer program; a processor for executing the computer program to implement the steps of the virtual machine service quality adjustment method according to any one of claims 1 to 14.
18. A non-volatile storage medium, comprising: The non-volatile storage medium stores a computer program, and the computer program, when executed by the processor, implements the steps of the virtual machine service quality adjustment method according to any one of claims 1 to 14.
Citation Information
Patent Citations
Cloud resource dynamic scheduling method, device and equipment
CN110401695A
Cloud software service resource adaptive management framework based on iterative QoS model
CN111314120A