Search

CN-121996420-A - Data processing method, electronic device, storage medium, and computer program product

CN121996420ACN 121996420 ACN121996420 ACN 121996420ACN-121996420-A

Abstract

The application discloses a data processing method, electronic equipment, a storage medium and a computer program product, wherein the method comprises the steps of configuring first parameters of a double token bucket in a first virtual machine, wherein the double token bucket comprises a first token bucket and a second token bucket, the first token bucket is used for controlling the read-write times IOPS of each second of the first virtual machine, the second token bucket is used for controlling the bandwidth of the first virtual machine, analyzing the IOPS and the bandwidth of the first virtual machine to obtain a first analysis result, adjusting the first parameters of the double token bucket according to the first analysis result, and adjusting the IOPS and the bandwidth of the first virtual machine according to the adjusted first parameters. The application can realize the joint control of the bandwidth of the IOPS and realize more comprehensive resource optimization.

Inventors

  • YU JIAXIN
  • WANG YU
  • LUO LEI

Assignees

  • 中移(苏州)软件技术有限公司
  • 中国移动通信集团有限公司

Dates

Publication Date
20260508
Application Date
20260123

Claims (13)

  1. 1. A data processing method, characterized in that the data processing method comprises: Configuring a first parameter of a double token bucket in a first virtual machine, wherein the double token bucket comprises a first token bucket and a second token bucket, the first token bucket is used for controlling the read-write times IOPS (input/output) of each second of the first virtual machine, and the second token bucket is used for controlling the bandwidth of the first virtual machine; Analyzing the IOPS and the bandwidth of the first virtual machine to obtain a first analysis result; Adjusting a first parameter of the double token bucket according to the first analysis result; and adjusting the IOPS and the bandwidth of the first virtual machine according to the adjusted first parameter.
  2. 2. The method according to claim 1, wherein the method further comprises: Determining a first weight of the IOPS of each disk in the first virtual machine and a second weight of the bandwidth of each disk; And adjusting the IOPS and the bandwidth of the first virtual machine according to the adjusted first parameter, including: according to the adjusted first parameter, the IOPS of each disk in the first virtual machine is adjusted based on the first weight of each disk, and the bandwidth of each disk in the first virtual machine is adjusted based on the second weight of each disk.
  3. 3. The method of claim 2, wherein said adjusting the IOPS of said each disk in said first virtual machine based on said first weight of said each disk and adjusting the bandwidth of said each disk in said first virtual machine based on said second weight of said each disk according to said adjusted first parameter comprises: adjusting the IOPS and the bandwidth of each disk in the first virtual machine according to the adjusted first parameters; Determining a disk-adjusted reference IOPS according to the first weight of each disk, and determining a disk-adjusted reference bandwidth according to the second weight of each disk; When a first disk with the adjusted reference IOPS lower than a first reference value exists in the first virtual machine, adjusting the IOPS of the first disk to the first reference value; and when a second disk with the adjusted reference bandwidth lower than a second reference value exists in the first virtual machine, adjusting the bandwidth of the second disk to the second reference value.
  4. 4. The method of claim 3, wherein said adjusting the IOPS of said each disk in said first virtual machine according to said adjusted first parameter comprises: Determining a first total adjustment amount of the IOPS of the first virtual machine and a second total adjustment amount of the bandwidth of the first virtual machine according to the adjusted first parameter; And adjusting the IOPS and the bandwidth of each of the one or more disks in the first virtual machine, wherein the sum of the adjustment amounts of the IOPS of the one or more disks is the first total adjustment amount, and the sum of the adjustment amounts of the bandwidth of the one or more disks is the second total adjustment amount.
  5. 5. The method of claim 2, wherein the determining the first weight of the IOPS for each disk in the first virtual machine and the second weight of the bandwidth for each disk comprises: Determining the performance grade of each disk according to the disk type and the application scene of each disk; And determining a first weight of the IOPS of each disk in the first virtual machine and a second weight of the bandwidth of each disk according to the performance grade of each disk, wherein the first weight and the second weight are positively correlated with the performance grade.
  6. 6. The method of claim 1, wherein the first parameters include a token generation rate of the first token bucket and a token generation rate of the second token bucket, and wherein adjusting the IOPS and bandwidth of the first virtual machine based on the adjusted first parameters comprises: Calculating the value of the cost function of the first virtual machine based on the token generation rate adjusted by the first token bucket and the token generation rate adjusted by the second token bucket; And under the condition that the value of the first cost function is smaller than a first threshold value, adjusting the IOPS of the first virtual machine according to the token generation rate adjusted by the first token bucket, and adjusting the bandwidth of the first virtual machine according to the token generation rate adjusted by the second token bucket.
  7. 7. The method of claim 1, wherein the first analysis result includes a type of load status of the first virtual machine, and wherein analyzing the IOPS and bandwidth data of the first virtual machine to obtain the first analysis result includes: Calculating the IOPS and bandwidth data of the first virtual machine to obtain a first value of the IOPS and a second value of the bandwidth of the first virtual machine, wherein the first value and the second value comprise one or more of mean value, standard deviation and change rate; Determining a type of a load state of the first virtual machine according to a first value of the IOPS of the first virtual machine and a second value of the bandwidth, wherein the type of the load state comprises a first type, and the first virtual machine has one or more characteristics that the first value of the IOPS of the first virtual machine is larger than a corresponding threshold value and the second value of the bandwidth of the first virtual machine is larger than the corresponding threshold value when the load type of the first virtual machine is the first type.
  8. 8. The method of claim 7, wherein the first parameter of the dual token bucket comprises a token generation rate of the first token bucket, a token generation rate of the second token bucket, a size of the first token bucket and a size of the second token bucket, and wherein the adjusting the first parameter of the dual token bucket based on the first analysis result if the type of the load state is the first type comprises one or more of: increasing a token generation rate of the first token bucket; increasing the token generation rate of the second token bucket; expanding the token bucket size of the first token bucket; and expanding the token bucket size of the second token bucket.
  9. 9. The method of claim 7, wherein the method further comprises: And reducing the input or output I/O speed limit of the first virtual machine under the condition that the type of the load state is not the first type any more, wherein in the process of reducing the I/O speed limit of the first virtual machine, an exponential function relation or a linear function relation exists between the IOPS and the bandwidth of the first virtual machine and a first time length, and the first time length is the difference between the current time and the time of starting reducing the I/O speed limit of the first virtual machine.
  10. 10. A data processing apparatus, comprising: a first configuration unit, configured to configure a first parameter of a dual token bucket in a first virtual machine, where the dual token bucket includes a first token bucket and a second token bucket, the first token bucket is used to control the number of read/write IOPS per second of the first virtual machine, and the second token bucket is used to control the bandwidth of the first virtual machine; the first analysis unit is used for analyzing the IOPS and the bandwidth of the first virtual machine to obtain a first analysis result; the first adjusting unit is used for adjusting the first parameter of the double token bucket according to the first analysis result; And the second adjusting unit is used for adjusting the IOPS and the bandwidth of the first virtual machine according to the adjusted first parameter.
  11. 11. An electronic device comprising a processor and a memory for storing a computer program capable of running on the processor, Wherein the processor is adapted to perform the steps of the method of any of claims 1 to 9 when the computer program is run.
  12. 12. A storage medium having stored thereon a computer program, which when executed by a processor performs the steps of the method according to any of claims 1 to 9.
  13. 13. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 9.

Description

Data processing method, electronic device, storage medium, and computer program product Technical Field The present application relates to the field of computer technology, and in particular, to a data processing method, an electronic device, a storage medium, and a computer program product. Background To meet the needs of different applications and users for virtual machines, storage quality of service (Quality of Service, qoS) techniques may be employed. The core objective of the storage QoS technology is to ensure that the critical task and the high priority application can continuously obtain the required storage performance through means of priority control, bandwidth management, input/output operation number per second (Input/Output Operations Per Second, IOPS) scheduling and the like in a multi-tenant environment or a scene with strong resource competition, the storage QoS technology is mainly realized through Input/output (I/O) current limiting, the I/O current limiting can be realized through controlling the IOPS, the bandwidth and the like, but related schemes for limiting the I/O current limiting generally need to independently control the IOPS or the bandwidth, and the single-dimension control mode cannot realize the comprehensive resource optimization and has limitations. Disclosure of Invention To solve the related technical problems, embodiments of the present application provide a data processing method, an electronic device, a storage medium, and a computer program product. The technical scheme of the embodiment of the application is realized as follows: The embodiment of the application provides a data processing method, which comprises the following steps: Configuring a first parameter of a double token bucket in a first virtual machine, wherein the double token bucket comprises a first token bucket and a second token bucket, the first token bucket is used for controlling the read-write times IOPS (input/output) of each second of the first virtual machine, and the second token bucket is used for controlling the bandwidth of the first virtual machine; Analyzing the IOPS and the bandwidth of the first virtual machine to obtain a first analysis result; Adjusting a first parameter of the double token bucket according to the first analysis result; and adjusting the IOPS and the bandwidth of the first virtual machine according to the adjusted first parameter. In the above scheme, the method further comprises: Determining a first weight of the IOPS of each disk in the first virtual machine and a second weight of the bandwidth of each disk; And adjusting the IOPS and the bandwidth of the first virtual machine according to the adjusted first parameter, including: according to the adjusted first parameter, the IOPS of each disk in the first virtual machine is adjusted based on the first weight of each disk, and the bandwidth of each disk in the first virtual machine is adjusted based on the second weight of each disk. In the foregoing solution, the adjusting, according to the adjusted first parameter, the IOPS of each disk in the first virtual machine based on the first weight of each disk, and the adjusting, according to the second weight of each disk, the bandwidth of each disk in the first virtual machine includes: adjusting the IOPS and the bandwidth of each disk in the first virtual machine according to the adjusted first parameters; Determining a disk-adjusted reference IOPS according to the first weight of each disk, and determining a disk-adjusted reference bandwidth according to the second weight of each disk; When a first disk with the adjusted reference IOPS lower than a first reference value exists in the first virtual machine, adjusting the IOPS of the first disk to the first reference value; and when a second disk with the adjusted reference bandwidth lower than a second reference value exists in the first virtual machine, adjusting the bandwidth of the second disk to the second reference value. In the above solution, the adjusting the IOPS of each disk in the first virtual machine according to the adjusted first parameter includes: Determining a first total adjustment amount of the IOPS of the first virtual machine and a second total adjustment amount of the bandwidth of the first virtual machine according to the adjusted first parameter; And adjusting the IOPS and the bandwidth of each of the one or more disks in the first virtual machine, wherein the sum of the adjustment amounts of the IOPS of the one or more disks is the first total adjustment amount, and the sum of the adjustment amounts of the bandwidth of the one or more disks is the second total adjustment amount. In the above solution, the determining the first weight of the IOPS of each disk in the first virtual machine and the second weight of the bandwidth of each disk includes: Determining the performance grade of each disk according to the disk type and the application scene of each disk; And determining a first weight