A performance control method, device, equipment, program product and storage medium

By obtaining the real-time load rate of the RAID card CPU and adjusting the number of interrupt aggregation, the impact of the interrupt aggregation method on IO performance and CPU load rate is solved, and performance balance and user experience are improved.

CN120123105BActive Publication Date: 2025-08-22SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510608697.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-13
Publication Date
2025-08-22
Estimated Expiration
2045-05-13

AI Technical Summary

Technical Problem

In the prior art, the interrupt aggregation method of RAID cards affects IO performance and CPU load rate, resulting in poor user experience and lack of effective performance control methods.

Method used

By obtaining the real-time load rate of the CPU of the RAID card, and adjusting the number of interrupt aggregations of the external hard disk based on the comparison result of the load rate and the preset upper limit, controlling the load rate within the upper limit, reducing the number of interrupt aggregations, and balancing the IO efficiency and CPU load rate.

Benefits of technology

While ensuring that the CPU load rate does not exceed the upper limit, the number of interrupt aggregations is reduced, the IO performance and the overall performance of the RAID card are improved, and the user experience is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120123105B_ABST
    Figure CN120123105B_ABST
Patent Text Reader

Abstract

The present invention discloses a performance control method, device, equipment, program product, and storage medium, belonging to the field of controller performance optimization. The method is used to balance I / O efficiency and CPU load rate by adjusting the interrupt aggregation number, thereby solving the problem of being unable to take into account both I / O performance and RAID card performance. In the present invention, the real-time load rate of the CPU of the RAID card can be obtained, and based on the comparison result of the real-time load rate and the load rate upper limit, the interrupt aggregation number of the external hard disk of the RAID card is adjusted, so as to reduce the interrupt aggregation number on the basis of controlling the real-time load rate not to exceed the load rate upper limit. In other words, by adjusting the interrupt aggregation number, the real-time load rate of the CPU can be controlled to be lower than the load rate upper limit on the one hand, and the interrupt aggregation number can be reduced as much as possible on the other hand, thereby balancing I / O efficiency and CPU load rate, that is, taking into account both I / O performance and RAID card performance, and improving user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of controller performance optimization, and in particular to a performance control method, device, equipment, program product and storage medium. Background Art

[0002] RAID (Redundant Arrays of Independent Disks) cards combine multiple hard drives into a single logical unit. Using parallel processing and data distribution techniques, these disks coordinate operations, improving data storage capacity and I / O (Input / Output) performance. To ensure responsiveness for I / O tasks, RAID cards typically use interrupts to obtain task responses from the completion queue. Interrupt aggregation can reduce the number of interrupts, but the degree of interrupt aggregation affects both I / O performance and the performance of the RAID card. The lack of a mature performance control method in related technologies makes it difficult to balance I / O performance and RAID card performance, resulting in a poor user experience.

[0003] Therefore, how to provide a solution to the above technical problems is a problem that those skilled in the art need to solve at present. Summary of the Invention

[0004] The purpose of the present invention is to provide a performance control method, device, equipment, program product and storage medium. In the present invention, the real-time load rate of the CPU of the RAID card can be obtained, and based on the comparison result of the real-time load rate and the load rate upper limit, the interrupt aggregation number of the external hard disk of the RAID card is adjusted, so as to reduce the interrupt aggregation number on the basis of controlling the real-time load rate not to exceed the load rate upper limit. In other words, by adjusting the interrupt aggregation number, the real-time load rate of the CPU can be controlled to be lower than the load rate upper limit on the one hand, and the interrupt aggregation number can be reduced as much as possible on the other hand, thereby balancing the IO efficiency and the CPU load rate, that is, taking into account both the IO performance and the RAID card performance, and improving the user experience.

[0005] To solve the above technical problems, the present invention provides a performance control method, comprising:

[0006] Obtaining a real-time load rate of a central processing unit of a target control device, wherein the target control device includes a redundant array of independent disks card;

[0007] Determining a comparison result between the real-time load rate and a preset upper limit of the load rate of the central processing unit;

[0008] According to the comparison result of the real-time load rate and the preset upper limit of the central processor load rate, the interrupt aggregation number of the external hard disk of the target control device is adjusted to reduce the interrupt aggregation number on the basis of controlling the real-time load rate not to exceed the upper limit of the load rate.

[0009] On the other hand, the comparison result of determining the real-time load rate and the preset upper limit of the CPU load rate includes:

[0010] Determining whether the real-time load rate reaches a preset upper limit of the load rate of the central processing unit;

[0011] If so, it is determined that the real-time load rate is not less than the preset upper limit of the CPU load rate;

[0012] If not, it is determined that the real-time load rate is less than a preset upper limit of the CPU load rate.

[0013] On the other hand, the determining whether the real-time load rate reaches a preset upper limit of the CPU load rate includes:

[0014] The preset upper limit of the CPU load rate is reduced by the preset overshoot amount to serve as the new upper limit of the load rate;

[0015] Determine whether the real-time load rate reaches the load rate upper limit.

[0016] On the other hand, after lowering the preset upper limit of the CPU load rate by a preset overshoot amount to set the new upper limit of the load rate, and before determining whether the real-time load rate has reached the upper limit of the load rate, the performance control method further includes:

[0017] Determine the redundant load ratio required for the CPU to run management tasks;

[0018] The redundant load rate is subtracted from the current load rate upper limit to obtain a new load rate upper limit.

[0019] On the other hand, determining the redundant load rate required for the central processing unit to run the management task includes:

[0020] Determine the current concurrent number of management tasks of the central processor;

[0021] The redundant load rate required by the central processing unit to run the management tasks is determined according to the concurrent number of management tasks.

[0022] On the other hand, determining the redundant load rate required for the central processor to run the management task based on the concurrent number of management tasks includes:

[0023] Determining, according to the first corresponding relationship, a redundant load rate corresponding to the concurrent number of management tasks;

[0024] The first corresponding relationship is the corresponding relationship between the number of concurrent management tasks and the redundant load rate.

[0025] On the other hand, adjusting the interrupt aggregation number of the external hard disk of the target control device according to the comparison result of the real-time load rate and the preset upper limit of the load rate of the central processing unit includes:

[0026] When the real-time load rate is less than the preset upper limit of the CPU load rate, if the current interrupt aggregation number is greater than zero, the interrupt aggregation number is reduced according to a preset step size, wherein the lower limit of the interrupt aggregation number is zero;

[0027] When the real-time load rate is not less than a preset upper limit of the CPU load rate, the interrupt aggregation number is gradually increased according to a preset step size.

[0028] On the other hand, when the real-time load rate is less than the preset upper limit of the CPU load rate, if the current interrupt aggregation number is greater than zero, before reducing the interrupt aggregation number according to the preset step size, the performance control method further includes:

[0029] According to the second corresponding relationship, a step length corresponding to the absolute value of the target difference is determined as a preset step length;

[0030] The second corresponding relationship is a corresponding relationship between a target difference absolute value and a step size, and the target difference absolute value is an absolute value of a difference between the real-time load rate and the load rate upper limit.

[0031] On the other hand, obtaining the real-time load rate of the central processing unit of the target control device includes:

[0032] Determine a ratio of a working time of a central processing unit of a target control device to a preset time within a past preset time, wherein the working time includes a thread execution time and an interrupt service response time;

[0033] The percentage of the ratio of the working time to the preset time is used as the real-time load rate of the central processing unit of the target control device.

[0034] On the other hand, the ratio of the working time of the central processor of the target control device within the past preset time period to the preset time period includes:

[0035] Determine the idle time of the central processing unit of the target control device within a preset time period in the past;

[0036] The ratio of the idle time to the preset time is used as the idle time ratio;

[0037] The supplementary value of the idle time ratio is used as the ratio of the working time of the central processor of the target control device within the past preset time to the preset time.

[0038] On the other hand, after obtaining the real-time load rate of the central processing unit of the target control device and before determining the comparison result between the real-time load rate and the preset upper limit of the load rate of the central processing unit, the performance control method further includes:

[0039] Determine the real-time rate of change of the CPU load rate;

[0040] The real-time change rate per unit time is added to the real-time load rate to update the real-time load rate.

[0041] To solve the above technical problems, the present invention further provides a performance control device, comprising:

[0042] A first acquisition module is configured to acquire a real-time load rate of a central processing unit of a target control device, wherein the target control device includes a redundant array of independent disks card;

[0043] A first determining module is used to determine a comparison result between the real-time load rate and a preset upper limit of the load rate of the central processing unit;

[0044] The first adjustment module is used to adjust the interrupt aggregation number of the external hard disk of the target control device according to the comparison result of the real-time load rate and the preset upper limit of the load rate of the central processing unit, so as to reduce the interrupt aggregation number on the basis of controlling the real-time load rate not to exceed the upper limit of the load rate.

[0045] To solve the above technical problems, the present invention further provides a performance control device, comprising:

[0046] memory for storing computer programs;

[0047] A processor is used to implement the steps of the performance control method described above when executing the computer program.

[0048] To solve the above technical problems, the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the above performance control method when executed by a processor.

[0049] To solve the above technical problems, the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the performance control method described above are implemented.

[0050] The present invention provides a performance control method. Considering that an excessively high interrupt aggregation number will reduce IO efficiency, while an excessively low interrupt aggregation number may cause an excessively high CPU load rate of a RAID card, and both an excessively high CPU load rate and an excessively low IO efficiency are two undesirable conditions, the present invention can obtain the real-time load rate of the CPU of the RAID card, and adjust the interrupt aggregation number of the external hard disk of the RAID card according to the comparison result between the real-time load rate and the load rate upper limit, so as to reduce the interrupt aggregation number on the basis of controlling the real-time load rate not to exceed the load rate upper limit. That is, by adjusting the interrupt aggregation number, on the one hand, the real-time load rate of the CPU can be controlled to be lower than the load rate upper limit, and on the other hand, the interrupt aggregation number can be reduced as much as possible, thereby balancing IO efficiency and CPU load rate, that is, taking into account both IO performance and RAID card performance, and improving user experience.

[0051] The present invention also provides a performance control device, equipment, program product and storage medium, which have the same beneficial effects as the above performance control method. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the relevant technologies and the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0053] Figure 1 A schematic flow chart of the first performance control method provided by the present invention;

[0054] Figure 2 A schematic flow chart of the second performance control method provided by the present invention;

[0055] Figure 3 A mind map of a performance control method provided by the present invention;

[0056] Figure 4 A schematic diagram of a process for determining a real-time load rate provided by the present invention;

[0057] Figure 5 A schematic flow chart of the third performance control method provided by the present invention;

[0058] Figure 6 A schematic structural diagram of a performance control device provided by the present invention;

[0059] Figure 7 A schematic structural diagram of a performance control device provided by the present invention;

[0060] Figure 8A schematic structural diagram of a computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION

[0061] The core of the present invention is to provide a performance control method, device, equipment, program product and storage medium. The present invention can obtain the real-time load rate of the CPU of the RAID card, and adjust the interrupt aggregation number of the external hard disk of the RAID card based on the comparison result of the real-time load rate and the load rate upper limit, so as to reduce the interrupt aggregation number on the basis of controlling the real-time load rate not to exceed the load rate upper limit. In other words, by adjusting the interrupt aggregation number, the real-time load rate of the CPU can be controlled to be lower than the load rate upper limit on the one hand, and the interrupt aggregation number can be reduced as much as possible on the other hand, thereby balancing the IO efficiency and the CPU load rate, that is, taking into account both the IO performance and the RAID card performance, and improving the user experience.

[0062] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0063] Please refer to Figure 1 , Figure 1 A flow chart of a performance control method provided by the present invention, the performance control method comprising:

[0064] S101: Acquire a real-time load rate of a central processing unit of a target control device, wherein the target control device includes a redundant array of independent disks card;

[0065] Specifically, taking into account the technical problems in the above background technology, and considering that a too high interrupt aggregation number will reduce IO efficiency, while a too low interrupt aggregation number may cause the CPU (Central Processing Unit) load rate of the RAID card to be too high, and both a too high CPU load rate and a too low IO efficiency are two undesirable conditions, the embodiment of the present invention aims to achieve a balance between IO efficiency and CPU load rate by regulating the interrupt aggregation number. The prerequisite for achieving the CPU load rate regulation is to obtain the real-time load rate of the central processing unit of the target control device for reference. Therefore, the embodiment of the present invention can first obtain the real-time load rate of the central processing unit of the target control device so as to use it as the data basis for subsequent steps.

[0066] In addition to the RAID card, the target control device may also be of other types, as long as the external device thereof has the interrupt aggregation function, which is not limited in the embodiment of the present invention.

[0067] Specifically, the concept of interrupt aggregation is explained here. The NVMe (Non-Volatile Memory Express) protocol states that an interaction between a host (here referring to a RAID card) and an NVMe device (here referring to an external hard disk attached to a RAID card) includes two queues, two doorbells, and an interrupt. The host writes a new SQE (submission queue entry) to the SQ (submission queue) and notifies the NVMe device of a new command through the doorbell at the end of the submission queue (SQyTDBL). The NVMe device writes the corresponding CQE (completion queue entry) to the CQ (completion queue) and generates an interrupt to notify the host that the request command has been executed. Interrupts generated by NVMe devices are encapsulated in TLP (Transport Layer Protocol) packets over the PCIe (Peripheral Component Interconnect Express) link. Upon reaching the RAID card, these TLP packets are parsed and converted into SPI (Serial Peripheral Interface) system interrupts recognizable by the CPU, which are then assigned to the corresponding interrupt service routine. The RAID card can also configure interrupt aggregation for NVMe devices. This means that after an NVMe device completes n SQEs, it responds with a CQE via a TLP packet over the PCIe link. Upon reaching the RAID card, these TLP packets are parsed and converted into SPI system interrupts recognizable by the CPU, which are then assigned to the corresponding interrupt service routine.

[0068] Among them, there is usually no unified standard for setting the number of aggregations, and it needs to be determined based on actual conditions. If the interrupt aggregation number is set too large, the IO response speed will be reduced, thereby affecting the overall IO performance of the RAID card; if it is set too small, when the IO task is too large, interrupts will occur frequently, and a large part of the CPU load comes from interrupt response, which will cause a surge in CPU utilization during high-speed IO tasks, affecting the execution of other management tasks, and even causing system freezes during specific time periods.

[0069] Of course, in addition to the NVMe protocol, the data transmission protocol between the target control device and the external hard disk can also be other types, which is not limited in the embodiment of the present invention.

[0070] S102: Determine a comparison result between the real-time load rate and a preset upper limit of the CPU load rate;

[0071] Specifically, considering that a load rate upper limit can be set for the CPU, the CPU load rate can be controlled below the load rate upper limit during the regulation process. Since the specific value of the interrupt aggregation number will directly affect the CPU load rate, the embodiment of the present invention intends to adjust the interrupt aggregation number through the comparison result between the real-time load rate and the load rate upper limit, so as to achieve the purpose of "controlling the CPU load rate below the load rate upper limit and minimizing the interrupt aggregation number to improve IO efficiency". Therefore, in this step, the comparison result between the real-time load rate and the preset central processing unit load rate upper limit can be determined, and it can be used as the data basis for subsequent steps.

[0072] The upper limit of the load rate can be set independently according to actual conditions, for example, it can be 70%, etc., and the embodiment of the present invention does not limit this.

[0073] S103: According to the comparison result between the real-time load rate and the preset upper limit of the CPU load rate, the interrupt aggregation number of the external hard disk of the target control device is adjusted, so as to reduce the interrupt aggregation number on the basis of controlling the real-time load rate not to exceed the upper limit of the load rate.

[0074] Specifically, after determining the comparison result between the real-time load rate and the preset upper limit of the central processing unit's load rate, the interrupt aggregation number of the external hard disk of the target control device can be adjusted according to the comparison result, so as to achieve the reduction of the interrupt aggregation number on the basis of controlling the real-time load rate not to exceed the upper limit of the load rate. That is, on the basis of controlling the real-time load rate not to exceed the upper limit of the load rate, the interrupt aggregation number is reduced as much as possible. On the one hand, it can ensure that the real-time load rate of the CPU is not too high, thereby ensuring the performance of the RAID card. On the other hand, it can ensure IO efficiency and the IO performance of the RAID card by minimizing the interrupt aggregation number.

[0075] Among them, a high CPU load rate may cause slow system response and reduced processing power, especially in resource-constrained embedded systems.

[0076] The present invention provides a performance control method. Considering that an excessively high interrupt aggregation number will reduce IO efficiency, while an excessively low interrupt aggregation number may cause an excessively high CPU load rate of a RAID card, and both an excessively high CPU load rate and an excessively low IO efficiency are two undesirable conditions, the present invention can obtain the real-time load rate of the CPU of the RAID card, and adjust the interrupt aggregation number of the external hard disk of the RAID card according to the comparison result between the real-time load rate and the load rate upper limit, so as to reduce the interrupt aggregation number on the basis of controlling the real-time load rate not to exceed the load rate upper limit. That is, by adjusting the interrupt aggregation number, on the one hand, the real-time load rate of the CPU can be controlled to be lower than the load rate upper limit, and on the other hand, the interrupt aggregation number can be reduced as much as possible, thereby balancing IO efficiency and CPU load rate, that is, taking into account both IO performance and RAID card performance, and improving user experience.

[0077] Based on the above embodiment:

[0078] As an optional embodiment, determining the comparison result between the real-time load rate and the preset upper limit of the CPU load rate includes:

[0079] Determine whether the real-time load rate reaches the preset upper limit of the CPU load rate;

[0080] If it is reached, it is determined that the real-time load rate is not less than the preset upper limit of the CPU load rate;

[0081] If not, it is determined that the real-time load rate is less than the preset upper limit of the CPU load rate.

[0082] Specifically, considering that the control target of the corresponding CPU load rate is that the real-time load rate does not exceed the load rate upper limit, it is sufficient to simply determine whether the real-time load rate reaches the preset upper limit of the central processing unit load rate. Therefore, the embodiment of the present invention can determine whether the real-time load rate reaches the preset upper limit of the central processing unit load rate. If it is reached, it is determined that the real-time load rate is not less than the preset upper limit of the central processing unit load rate. If it is not reached, it is determined that the real-time load rate is less than the preset upper limit of the central processing unit load rate.

[0083] Specifically, to better illustrate the embodiments of the present invention, please refer to Figure 2 and Figure 3 , Figure 2 A schematic flow chart of the second performance control method provided by the present invention is shown below: Figure 3 A mind map of a performance control method provided by the present invention, in Figure 2 In the case of real-time load rate reaching the upper limit, the CPU load rate can be reduced by increasing the number of interrupt aggregations. In the case of real-time load rate not reaching the upper limit, the I / O efficiency can be improved by reducing the number of interrupt aggregations. Figure 3The control logic of the double closed-loop negative feedback used in the present invention is embodied in the figure. The input of the outer loop is the load rate upper limit. The first regulator can determine the aggregation number reference value based on the difference between the load rate upper limit and the implementation load rate. In the inner loop, the second regulator can adjust the interrupt aggregation number based on the difference between the aggregation number reference value output by the first regulator and the real-time aggregation number. Then, the generated aggregation instruction acts on the external hard disk, which can affect the CPU operation process and the actual performance of the CPU (which can be reflected through the user task output). In addition to IO tasks, the CPU operation process will actually be affected by interference factors. Here, it mainly refers to the CPU-related management tasks, which may occupy CPU resources as interference factors at any time.

[0084] As an optional embodiment, determining whether the real-time load rate reaches a preset upper limit of the CPU load rate includes:

[0085] The preset upper limit of the CPU load rate is reduced by the preset overshoot amount to serve as the new upper limit of the load rate;

[0086] Determine whether the real-time load rate has reached the load rate upper limit.

[0087] Specifically, considering that the load rate upper limit can be further adjusted through the overshoot amount in order to better avoid the real-time load rate exceeding the original load rate upper limit, the embodiment of the present invention can reduce the preset central processing unit load rate upper limit by the preset overshoot amount as the new load rate upper limit.

[0088] Among them, the overshoot reflects the percentage difference between the maximum value and the steady-state value of the control system output signal. The size of the overshoot affects the stability and dynamic characteristics of the system. When the overshoot is too large, the system may experience oscillation or instability; when the overshoot is small, the system responds faster and has better stability. To achieve smooth adjustment, the real-time load rate of the CPU must be controlled below the load rate upper limit, and the overshoot generally does not exceed 5%, that is, in the embodiment of the present invention, it can be the original load rate multiplied by (1-preset overshoot). For example, when the preset overshoot is 5%, the preset central processing unit load rate upper limit is reduced by the preset overshoot, which can be: updating the load rate upper limit to 95% of the original load rate upper limit.

[0089] The original load rate upper limit can be represented by R0.

[0090] As an optional embodiment, after lowering the preset upper limit of the CPU load rate by a preset overshoot amount to set the new upper limit, and before determining whether the real-time load rate reaches the upper limit, the performance control method further includes:

[0091] Determine the redundant load ratio required for the CPU to run management tasks;

[0092] Subtract the redundant load factor from the current load factor upper limit to obtain the new load factor upper limit.

[0093] Specifically, considering that IO tasks are the main tasks of RAID cards, in addition to IO tasks, RAID cards also have other management tasks. For example, in large-scale IO scenarios, users also want to issue certain management commands, including but not limited to obtaining the controller or namespace information of NVMe devices, forming or deleting RAID, and processing certain asynchronous events generated by NVMe devices. Usually, these management commands do not consume too many CPU resources, but it is necessary to ensure that there are CPU resources available when these tasks arrive. Therefore, based on the current load rate upper limit, a "redundant load rate required for the central processing unit to run management tasks" can be further reserved. This allows not only to process IP tasks normally when management tasks suddenly arrive, but also to process these management tasks efficiently, thereby improving the user experience. Therefore, in an embodiment of the present invention, the redundant load rate required for the central processing unit to run management tasks can be determined, and the current load rate upper limit minus the redundant load rate is used as the new load rate upper limit.

[0094] As an optional embodiment, determining the redundant load ratio required for the central processing unit to execute the management task includes:

[0095] Determine the current concurrent number of management tasks of the central processor;

[0096] Based on the number of concurrent management tasks, the redundant load rate required by the central processor to run the management tasks is determined.

[0097] Specifically, considering that the redundant load rate itself is prepared for the CPU to run management tasks, the concurrency number of management tasks has a direct relationship with the redundant load rate. In the embodiment of the present invention, the current concurrency number of management tasks of the central processing unit can be determined, and then the redundant load rate required for the central processing unit to run management tasks can be determined based on the concurrency number of management tasks. This can improve the adaptability of the redundant load rate and will not excessively reduce the upper limit of the CPU load rate while ensuring that the management tasks can be run stably.

[0098] Of course, in addition to this specific method, the redundant load rate required for the central processing unit to run the management task can also be determined by other methods, which are not limited in this embodiment of the present invention.

[0099] As an optional embodiment, determining the redundant load rate required for the central processor to run the management task based on the number of concurrent management tasks includes:

[0100] Determining, based on the first corresponding relationship, a redundant load rate corresponding to the number of concurrent management tasks;

[0101] The first corresponding relationship is the corresponding relationship between the number of concurrent management tasks and the redundant load rate.

[0102] Specifically, considering that the redundant load rate corresponding to the concurrent number of various management tasks can be accurately expressed through the preset corresponding relationship, a first corresponding relationship can be preset in the embodiment of the present invention. Then, when determining the redundant load rate, the redundant load rate corresponding to the concurrent number of management tasks can be determined based on the first corresponding relationship, which has the advantages of high efficiency and high accuracy.

[0103] The first corresponding relationship may be independently set, for example, it may be a linear relationship, etc., which is not limited in the embodiment of the present invention.

[0104] Of course, in addition to this specific method, "determining the redundant load rate required for the central processing unit to run the management task based on the concurrent number of management tasks" can also be other specific methods, which are not limited in the embodiment of the present invention.

[0105] As an optional embodiment, adjusting the interrupt aggregation number of the external hard disk of the target control device according to the comparison result of the real-time load rate and the preset upper limit of the load rate of the central processing unit includes:

[0106] When the real-time load rate is less than the preset upper limit of the CPU load rate, if the current interrupt aggregation number is greater than zero, the interrupt aggregation number is reduced according to a preset step size, wherein the lower limit of the interrupt aggregation number is zero;

[0107] When the real-time load rate is not less than the preset upper limit of the CPU load rate, the interrupt aggregation number is gradually increased according to the preset step size.

[0108] Specifically, considering that the interrupt aggregation number can be adjusted simply and efficiently regardless of whether it is necessary to reduce or increase the interrupt aggregation number by means of a preset step size, in an embodiment of the present invention, when the real-time load rate is less than the preset upper limit of the load rate of the central processing unit, if the current interrupt aggregation number is greater than zero, the interrupt aggregation number is reduced according to the preset step size, and when the real-time load rate is not less than the preset upper limit of the load rate of the central processing unit, the interrupt aggregation number is gradually increased according to the preset step size.

[0109] The preset step size can be set independently, for example, it can be any positive integer, etc., and the embodiment of the present invention does not limit this.

[0110] As an optional embodiment, when the real-time load rate is less than a preset upper limit of the CPU load rate, if the current interrupt aggregation number is greater than zero, before reducing the interrupt aggregation number according to a preset step size, the performance control method further includes:

[0111] According to the second corresponding relationship, a step length corresponding to the absolute value of the target difference is determined as a preset step length;

[0112] The second corresponding relationship is the corresponding relationship between the target difference absolute value and the step size, and the target difference absolute value is the absolute value of the difference between the real-time load rate and the load rate upper limit.

[0113] Specifically, considering that theoretically when the absolute value of the target difference (the absolute value of the difference between the real-time load rate and the upper limit of the load rate) is different, the adjustment step size of the interrupt aggregation number should also be matched accordingly, so that the IO efficiency and the RAID card efficiency can be balanced more quickly. Therefore, the embodiment of the present invention can dynamically determine the preset step size according to the absolute value of the target difference, and through a preset second corresponding relationship, efficiently and accurately determine the step size corresponding to the absolute value of the target difference as the preset step size.

[0114] The second corresponding relationship can be set flexibly and autonomously according to actual conditions, and is not limited in this embodiment of the present invention.

[0115] As an optional embodiment, obtaining the real-time load rate of the central processing unit of the target control device includes:

[0116] Determine a ratio of a working time of a central processing unit of a target control device to a preset time within a past preset time, wherein the working time includes a thread execution time and an interrupt service response time;

[0117] The percentage of the ratio of the working time to the preset time is used as the real-time load rate of the central processing unit of the target control device.

[0118] Specifically, considering that the tasks of the RAID card may include thread execution and interrupt service response, the other tasks can be considered as the idle state of the RAID card. The total running time of the CPU of the RAID card can be calculated by S total =S thread +S isr +S idle Indicates that S total is the total CPU operating time, S thread is the CPU thread execution time, S isr The CPU interrupt service response time, S idle It is the idle time of the CPU, wherein the thread execution time and the interrupt service response time can together constitute the working time of the CPU, and it can be used as the real-time load rate of the CPU. Therefore, in the embodiment of the present invention, the ratio of the working time of the central processing unit of the target control device to the preset time within the past preset time can be determined, and then the percentage of the ratio of the working time to the preset time can be used as the real-time load rate of the central processing unit of the target control device.

[0119] As an optional embodiment, determining the ratio of the operating time of the central processor of the target control device within the past preset time period to the preset time period includes:

[0120] Determine the idle time of the central processing unit of the target control device within a preset time period in the past;

[0121] The ratio of the idle time to the preset time is used as the idle time ratio;

[0122] The supplementary value of the idle time ratio is used as the ratio of the working time of the central processor of the target control device within the past preset time to the preset time.

[0123] Specifically, considering the supplementary value of "the ratio of the CPU's idle time to the total running time", it can be used as the ratio of the CPU's working time to the preset time, and the "ratio of the CPU's idle time to the total running time" can be conveniently obtained by statistics of the idle time and the preset time. Therefore, in the embodiment of the present invention, the idle time of the central processing unit of the target control device within the past preset time can be determined, and then the ratio of the idle time to the preset time can be used as the idle time ratio. Finally, the supplementary value of the idle time ratio can be used as the ratio of the working time of the central processing unit of the target control device within the past preset time to the preset time, which can improve work efficiency and reduce resource usage.

[0124] Specifically, to better illustrate the embodiments of the present invention, please refer to Figure 4 , Figure 4 A flowchart of determining a real-time load rate provided by the present invention is provided. In a specific implementation process, determining the idle time of the central processor of the target control device within a preset time period in the past may include:

[0125] S201: Start timing and determine the current idle time of the RAID card as the starting idle time;

[0126] S202: When the timing time reaches a preset duration, the current idle duration of the RAID card is determined as the ending idle duration;

[0127] S203: The difference between the ending idle time and the starting idle time is used as the idle time of the central processing unit of the target control device within the past preset time.

[0128] As an optional embodiment, after obtaining the real-time load rate of the central processing unit of the target control device and before determining the comparison result between the real-time load rate and the preset upper limit of the load rate of the central processing unit, the performance control method further includes:

[0129] Determine the real-time rate of change of the CPU load rate;

[0130] The real-time rate of change per unit time is added to the real-time load rate to update the real-time load rate.

[0131] Specifically, considering that the influence of the RAID card on the CPU load rate through the adjustment of the interrupt aggregation number has a hysteresis, that is, when the interrupt aggregation number affects the CPU load rate, the actual CPU load rate has further changed, therefore, in order to cope with the hysteresis of the control effect, considering that the future CPU load rate can be estimated by the rate of change of the load rate, the embodiment of the present invention can use the future CPU load rate as the real-time load rate to trigger the adjustment of the interrupt aggregation number, so that the adjustment of the interrupt aggregation number can act on the CPU load rate at the corresponding moment, which can more accurately control the CPU load rate and improve the control accuracy.

[0132] There are many methods for determining the test change rate. For example, the real-time change rate can be determined by performing a differential operation on the change rate of the real-time load rate of the CPU. This is not limited in the embodiment of the present invention.

[0133] Specifically, to better illustrate the embodiments of the present invention, please refer to Figure 5 , Figure 5 This is a flow chart of the third performance control method provided by the present invention. Considering that the real-time load rate of the CPU is likely to exceed the upper limit of the load rate when it is increasing, the embodiment of the present invention can perform intensive monitoring when the real-time load rate is increasing (light monitoring at longer intervals can be performed when the real-time load rate is not increasing) to determine R t =R count + rate of change × unit time (R t is the updated real-time load rate, R count is the original real-time load rate, and the change rate is the real-time change rate of the CPU load rate), and then judge R t Whether R0×95%×(1-n%) is reached, R0 is the upper limit of the load rate, 95% is the compensation value of the overshoot (5%), and n% is the redundant load rate; if it is reached, the interrupt aggregation number can be increased to reduce the CPU load rate, and after increasing the interrupt aggregation number, R t Is it less than R0 × 95% × (1-n%)? If so, the number of interrupt aggregations can be reduced to improve I / O efficiency. Therefore, the number of interrupt aggregations can be reduced.

[0134] Please refer to Figure 6 , Figure 6 This is a schematic structural diagram of a performance control device provided by the present invention, which includes:

[0135] A first acquisition module 61 is configured to acquire a real-time load rate of a central processing unit of a target control device, wherein the target control device includes a redundant array of independent disks card;

[0136] A first determination module 62 is configured to determine a comparison result between the real-time load rate and a preset upper limit of the CPU load rate;

[0137] The first adjustment module 63 is used to adjust the interrupt aggregation number of the external hard disk of the target control device according to the comparison result of the real-time load rate and the preset upper limit of the load rate of the central processing unit, so as to reduce the interrupt aggregation number on the basis of controlling the real-time load rate not to exceed the upper limit of the load rate.

[0138] Based on the above embodiment:

[0139] As an optional embodiment, the first determining module 62 includes:

[0140] A first determination module is configured to determine whether the real-time load rate reaches a preset upper limit of the CPU load rate, and if so, trigger the first determination module; if not, trigger the second determination module;

[0141] A first determination module is used to determine whether the real-time load rate is not less than a preset upper limit of the load rate of the central processing unit;

[0142] The second determination module is configured to determine whether the real-time load rate is less than a preset upper limit of the load rate of the central processing unit.

[0143] As an optional embodiment, the first judgment module includes:

[0144] A first updating module is configured to reduce a preset upper limit of a load rate of the central processing unit by a preset overshoot amount to serve as a new upper limit of the load rate;

[0145] The first judgment submodule is used to judge whether the real-time load rate reaches the load rate upper limit.

[0146] As an optional embodiment, the performance control device further includes:

[0147] The second determining module is used to determine the redundant load rate required by the central processing unit to run the management task;

[0148] The second updating module is configured to subtract the redundant load rate from the current load rate upper limit to obtain a new load rate upper limit.

[0149] As an optional embodiment, the second determining module includes:

[0150] The third determining module is used to determine the current concurrent number of management tasks of the central processing unit;

[0151] The fourth determining module is used to determine the redundant load rate required by the central processing unit to run the management task according to the number of concurrent management tasks.

[0152] As an optional embodiment, the fourth determining module is specifically configured to:

[0153] Determining, based on the first corresponding relationship, a redundant load rate corresponding to the number of concurrent management tasks;

[0154] The first corresponding relationship is the corresponding relationship between the number of concurrent management tasks and the redundant load rate.

[0155] As an optional embodiment, the first adjustment module 63 includes:

[0156] A first regulating submodule is configured to, when the real-time load rate is less than a preset upper limit of the CPU load rate, reduce the interrupt aggregation number according to a preset step size if the current interrupt aggregation number is greater than zero, wherein the lower limit of the interrupt aggregation number is zero;

[0157] The second regulating submodule is configured to gradually increase the number of interrupt aggregations according to a preset step size when the real-time load rate is not less than a preset upper limit of the load rate of the central processing unit.

[0158] As an optional embodiment, the performance control device further includes:

[0159] a fifth determining module, configured to determine, based on the second corresponding relationship, a step length corresponding to the absolute value of the target difference as a preset step length;

[0160] The second corresponding relationship is the corresponding relationship between the target difference absolute value and the step size, and the target difference absolute value is the absolute value of the difference between the real-time load rate and the load rate upper limit.

[0161] As an optional embodiment, the first obtaining module 61 includes:

[0162] a sixth determining module, configured to determine a ratio of a working time of a central processing unit of a target control device to a preset time within a past preset time, wherein the working time includes a thread execution time and an interrupt service response time;

[0163] The seventh determining module is configured to use the percentage of the ratio of the working time to the preset time as the real-time load rate of the central processing unit of the target control device.

[0164] As an optional embodiment, the sixth determining module includes:

[0165] A first determining submodule is configured to determine an idle time duration of a central processing unit of a target control device within a preset time duration in the past;

[0166] The second determining submodule is configured to use the ratio of the idle time to the preset time as the idle time ratio;

[0167] The third determining submodule is configured to use the supplementary value of the idle time ratio as the ratio of the working time of the central processor of the target control device to the preset time within the past preset time.

[0168] As an optional embodiment, the performance control device further includes:

[0169] an eighth determining module, configured to determine a real-time rate of change of a load factor of the central processing unit;

[0170] The ninth determining module is configured to add the real-time change rate per unit time to the real-time load rate so as to update the real-time load rate.

[0171] For an introduction to the performance control device provided in an embodiment of the present invention, please refer to the embodiment of the aforementioned performance control method, and the embodiment of the present invention will not be described in detail here.

[0172] Please refer to Figure 7 , Figure 7 This is a schematic diagram of the structure of a performance control device provided by the present invention, which includes:

[0173] Memory 71, for storing computer programs;

[0174] The processor 72 is configured to implement the steps of the performance control method in the aforementioned embodiment when executing a computer program.

[0175] For an introduction to the performance control device provided in an embodiment of the present invention, please refer to the aforementioned embodiment of the performance control method, and the embodiment of the present invention will not be described in detail here.

[0176] The present invention also provides a computer program product, including a computer program / instruction, which implements the steps of the performance control method in the above embodiment when executed by a processor.

[0177] For an introduction to the computer program product provided by the embodiment of the present invention, please refer to the aforementioned embodiment of the performance control method, and the embodiment of the present invention will not be described in detail here.

[0178] Please refer to Figure 8 , Figure 8 This is a structural diagram of a computer-readable storage medium provided by the present invention. A computer program 82 is stored on the computer-readable storage medium 81. When the computer program 82 is executed by the processor, the steps of the performance control method in the above embodiment are implemented.

[0179] For an introduction to the computer-readable storage medium provided in an embodiment of the present invention, please refer to the aforementioned embodiment of the performance control method, and the embodiment of the present invention will not be described in detail here.

[0180] In this specification, the various embodiments are described in a progressive manner, with each embodiment focusing on the differences from the other embodiments. Similar or identical parts between the various embodiments may be referred to in conjunction with each other. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and for relevant parts, reference may be made to the method description. It should also be noted that, in this specification, relational terms such as first and second, etc., are used solely to distinguish one entity or operation from another, and do not necessarily require or imply any actual relationship or order between these entities or operations. Furthermore, the terms "comprise," "include," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprises a..." does not exclude the presence of other identical elements in the process, method, article, or device comprising that element.

[0181] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A performance control method, characterized in that: include: Obtaining a real-time load rate of a central processing unit of a target control device, wherein the target control device includes a redundant array of independent disks card; Determining a comparison result between the real-time load rate and a preset upper limit of the load rate of the central processing unit; According to the comparison result of the real-time load rate and the preset upper limit of the load rate of the central processing unit, the interrupt aggregation number of the external hard disk of the target control device is adjusted, so as to reduce the interrupt aggregation number on the basis of controlling the real-time load rate not to exceed the upper limit of the load rate; The comparison result of determining the real-time load rate and the preset upper limit of the load rate of the central processing unit includes: Determining whether the real-time load rate reaches a preset upper limit of the load rate of the central processing unit; If so, it is determined that the real-time load rate is not less than the preset upper limit of the CPU load rate; If not, determining that the real-time load rate is less than a preset upper limit of the CPU load rate; The determining whether the real-time load rate reaches a preset upper limit of the CPU load rate includes: The preset upper limit of the CPU load rate is reduced by the preset overshoot amount to serve as the new upper limit of the load rate; Determining whether the real-time load rate reaches the load rate upper limit; After lowering the preset upper limit of the CPU load rate by a preset overshoot amount to set the new upper limit, and before determining whether the real-time load rate has reached the upper limit, the performance control method further includes: Determine the redundant load ratio required for the CPU to run management tasks; Subtract the redundant load rate from the current load rate upper limit to obtain a new load rate upper limit; Determining the redundant load rate required for the central processing unit to run the management task includes: Determine the current concurrent number of management tasks of the central processor; Determining the redundant load rate required for the central processing unit to run the management tasks according to the concurrent number of management tasks; Determining the redundant load rate required for the central processing unit to run the management task according to the concurrent number of management tasks includes: Determining, according to the first corresponding relationship, a redundant load rate corresponding to the concurrent number of management tasks; The first corresponding relationship is the corresponding relationship between the number of concurrent management tasks and the redundant load rate.

2. The performance control method according to claim 1, characterized in that: The adjusting the interrupt aggregation number of the external hard disk of the target control device according to the comparison result of the real-time load rate and the preset upper limit of the load rate of the central processing unit includes: When the real-time load rate is less than the preset upper limit of the CPU load rate, if the current interrupt aggregation number is greater than zero, the interrupt aggregation number is reduced according to a preset step size, wherein the lower limit of the interrupt aggregation number is zero; When the real-time load rate is not less than a preset upper limit of the CPU load rate, the interrupt aggregation number is gradually increased according to a preset step size.

3. The performance control method according to claim 2, characterized in that: When the real-time load rate is less than the preset upper limit of the CPU load rate, if the current interrupt aggregation number is greater than zero, before reducing the interrupt aggregation number according to a preset step size, the performance control method further includes: According to the second corresponding relationship, a step length corresponding to the absolute value of the target difference is determined as a preset step length; The second corresponding relationship is a corresponding relationship between a target difference absolute value and a step size, and the target difference absolute value is an absolute value of a difference between the real-time load rate and the load rate upper limit.

4. The performance control method according to claim 1, characterized in that: The obtaining of the real-time load rate of the central processing unit of the target control device includes: Determine a ratio of a working time of a central processing unit of a target control device to a preset time within a past preset time, wherein the working time includes a thread execution time and an interrupt service response time; The percentage of the ratio of the working time to the preset time is used as the real-time load rate of the central processing unit of the target control device.

5. The performance control method according to claim 4, characterized in that: The ratio of the working time of the central processor of the target control device within the past preset time period to the preset time period includes: Determine the idle time of the central processing unit of the target control device within a preset time period in the past; The ratio of the idle time to the preset time is used as the idle time ratio; The supplementary value of the idle time ratio is used as the ratio of the working time of the central processor of the target control device within the past preset time to the preset time.

6. The performance control method according to any one of claims 1 to 5, characterized in that: After obtaining the real-time load rate of the central processing unit of the target control device and before determining the comparison result between the real-time load rate and the preset upper limit of the load rate of the central processing unit, the performance control method further includes: Determine the real-time rate of change of the CPU load rate; The real-time change rate per unit time is added to the real-time load rate to update the real-time load rate.

7. A performance control device, characterized in that: include: A first acquisition module is configured to acquire a real-time load rate of a central processing unit of a target control device, wherein the target control device includes a redundant array of independent disks card; A first determining module is used to determine a comparison result between the real-time load rate and a preset upper limit of the load rate of the central processing unit; a first adjustment module, configured to adjust the interrupt aggregation number of the external hard disk of the target control device according to a comparison result of the real-time load rate with a preset upper limit of the load rate of the central processing unit, so as to reduce the interrupt aggregation number on the basis of controlling the real-time load rate not to exceed the upper limit of the load rate; The first determination module includes: A first determination module is configured to determine whether the real-time load rate reaches a preset upper limit of the CPU load rate, and if so, trigger the first determination module; if not, trigger the second determination module; A first determination module is used to determine whether the real-time load rate is not less than a preset upper limit of the load rate of the central processing unit; A second determination module is used to determine whether the real-time load rate is less than a preset upper limit of the load rate of the central processing unit; The first judgment module includes: A first updating module is configured to reduce a preset upper limit of a load rate of the central processing unit by a preset overshoot amount to serve as a new upper limit of the load rate; The first judgment submodule is used to judge whether the real-time load rate reaches the load rate upper limit; The performance control device also includes: The second determining module is used to determine the redundant load rate required by the central processing unit to run the management task; The second updating module is configured to subtract the redundant load rate from the current load rate upper limit to obtain a new load rate upper limit; The second determination module includes: The third determining module is used to determine the current concurrent number of management tasks of the central processing unit; A fourth determining module is used to determine the redundant load rate required for the central processing unit to run the management task according to the number of concurrent management tasks; The fourth determination module is specifically configured to: Determining, based on the first corresponding relationship, a redundant load rate corresponding to the number of concurrent management tasks; The first corresponding relationship is the corresponding relationship between the number of concurrent management tasks and the redundant load rate.

8. A performance control device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the performance control method according to any one of claims 1 to 6 when executing the computer program.

9. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the performance control method according to any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the performance control method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Interrupt processing method and relevant device

    CN107315700A

  • Calculation task scheduling method and system based on delay perception and load balancing

    CN118233469A