SSD SR-IOV configuration QoS strategy method, apparatus and device, and medium
By realizing intelligent automatic configuration and dynamic adjustment of QoS policies in enterprise-level SSDs, the shortcomings of QoS policy support in the SR-IOV technology in the existing technology are solved, and efficient resource utilization and management process are achieved.
Patent Information
- Application Number
- CN202411950872.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-25
Smart Images

Figure CN119883509A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of configuring QoS policies, and in particular to a method, device, equipment and medium for configuring QoS policies for SSD SR-IOV. Background Art
[0002] In the application field of enterprise-level solid-state drives (SSDs), with the widespread popularization of virtualization technology, major manufacturers have been committed to improving the performance of SSDs in virtualization scenarios to better meet the needs of complex applications such as cloud computing and big data processing. Among them, Single Root Input / Output Virtualization (SR-IOV) technology, as an important hardware virtualization technology, is adopted by many SSD manufacturers to achieve efficient and direct communication between virtual machines (VMs) and physical hardware, thereby approaching or even reaching the performance level in a bare metal environment.
[0003] However, although SR-IOV technology has significant advantages in improving the performance of virtualized environments, in actual applications, different manufacturers have different levels of implementation and support for SR-IOV functions. Specifically, although some manufacturers have implemented SR-IOV technology, they have not fully supported the Quality of Service (QoS) feature. The QoS feature is crucial in a virtualized environment. It allows system administrators to control the flow control of different VFs through QoS according to business needs, thereby effectively avoiding the "performance starvation" phenomenon caused by excessive resource concentration, that is, some virtual machines affect the normal operation of other virtual machines due to excessive consumption of SSD performance.
[0004] For those manufacturers that support QoS policies, the implementation methods are also different. Some manufacturers provide static QoS configuration options based on estimated business performance, allowing administrators to pre-set the maximum IOPS (input / output operations per second) and bandwidth limits for each virtual function (VirtualFunction, referred to as VF). Although this static configuration can alleviate the problem of resource competition to a certain extent, its inherent limitation is that it cannot dynamically adapt to fluctuations in business performance requirements. As business loads change, static QoS policies may lead to unreasonable resource allocation, and businesses with continuously growing performance requirements cannot be responded to in a timely manner, which in turn affects user experience and overall system efficiency.
[0005] On the other hand, if you blindly configure high-specification QoS policies for multiple VFs in an attempt to ensure business continuity by reserving sufficient resources, this approach may seem safe, but in fact it may backfire. Among them, too high QoS configuration will not only waste the overall performance of the SSD and fail to fully realize its potential, but may also reduce the overall operating efficiency of the system due to overly dispersed resource allocation. In the long run, this mechanism not only increases the complexity of system management, but also increases operation and maintenance costs, because administrators need to constantly monitor and manually adjust QoS policies to adapt to business changes, which is a time-consuming and laborious task.
[0006] In summary, current enterprise-level SSDs face many challenges in supporting QoS policies for SR-IOV technology, including lack of comprehensive support, difficulty in adapting static configuration to dynamic business needs, and resource waste and increased management complexity caused by high-performance configuration. Therefore, it is particularly important to develop an SR-IOV QoS management solution that can dynamically adapt to business changes, efficiently utilize SSD resources, and simplify management processes. Summary of the invention
[0007] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a method, apparatus, device and medium for configuring QoS policy for SSD SR-IOV.
[0008] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0009] In a first aspect, this embodiment provides a method for configuring a QoS policy for an SSD SR-IOV, comprising the following steps:
[0010] Determine whether the SSD has been configured with a QoS policy;
[0011] If the SSD is not configured with a QoS policy, determine whether the SSD allows automatic configuration of a QoS policy;
[0012] If the SSD allows automatic configuration of QoS policies, the average performance of each VF in a fixed period is calculated;
[0013] Determine whether the average performance of all VFs is greater than or equal to the overall disk performance / number of VFs.
[0014] If there is a scenario where the ratio is greater than or equal to the overall disk performance / VF quantity, the QoS policy is automatically configured so that the VF initial QoS configuration is equal to the overall disk performance / VF quantity;
[0015] Periodically count the average performance of VFs, and calculate the remaining QoS resources of each VF and the VFs that have used up their QoS resources;
[0016] Determine whether the last configured QoS policy has timed out;
[0017] If the last configured QoS policy times out, the QoS policy is adjusted based on the remaining QoS resources of each VF and the VF that has used up the QoS resources to obtain the adjusted QoS policy;
[0018] Among them, SR-IOV stands for Single Root I / O Virtualization, an IO virtualization technology; VF stands for virtual function; QoS stands for quality of service.
[0019] Its further technical solution is: before the step of determining whether the SSD has been configured with a QoS policy, it also includes: initializing the SSD, creating an SR-IOV VF, turning on automatic configuration of the QoS policy or turning on an existing QoS policy to allow automatic adjustment of the QoS policy.
[0020] Its further technical solution is: in the step of adjusting and configuring the QoS policy according to the remaining QoS resources of each VF and the VF that has used up the QoS resources to obtain the adjusted QoS policy, the QoS configuration of the VF with remaining QoS resources is set to be equal to the current average performance of the VF, and at the same time, the QoS of the VF that has used up the QoS resources is set to be equal to the original QoS plus the aggregated remaining QoS resources / VF that has used up the QoS resources.
[0021] Its further technical solution is: after the step of adjusting and configuring the QoS policy according to the remaining QoS resources of each VF and the VF that has used up the QoS resources to obtain the adjusted QoS policy, it also includes: judging whether a notification of adjusting the configuration of the QoS policy is received within a fixed period; if no notification of adjusting the configuration of the QoS policy is received within the fixed period, jumping to automatically configure the QoS policy to make the initial QoS configuration of the VF equal to the overall disk specification performance / the number of VFs; if a notification of adjusting the configuration of the QoS policy is received within the fixed period, ending the configuration.
[0022] In a second aspect, the present embodiment provides a device for configuring a QoS policy for an SSD SR-IOV, comprising: a first judgment unit, a second judgment unit, a statistical unit, a third judgment unit, an automatic configuration unit, a statistical calculation unit, a fourth judgment unit, and an adjustment configuration unit;
[0023] The first determination unit is used to determine whether the SSD has been configured with a QoS policy;
[0024] The second determination unit is used to determine whether the SSD allows automatic configuration of the QoS policy if the SSD is not configured with the QoS policy;
[0025] The statistical unit is used to count the average performance of each VF in a fixed period if the SSD allows automatic configuration of the QoS policy;
[0026] The third judgment unit is used to judge whether there is a scenario in which the average performance of all VFs is greater than or equal to the overall disk specification performance / the number of VFs;
[0027] The automatic configuration unit is used to automatically configure the QoS policy if there is a scenario that is greater than or equal to the full disk specification performance / the number of VFs, so that the VF initial QoS configuration is equal to the full disk specification performance / the number of VFs;
[0028] The statistical calculation unit is used to periodically calculate the average performance of the VF, and calculate the remaining QoS resources of each VF and the VF that has used up the QoS resources;
[0029] The fourth judgment unit is used to judge whether the last configured QoS policy has timed out;
[0030] The configuration adjustment unit is used to adjust the QoS policy according to the remaining QoS resources of each VF and the VF that has used up the QoS resources to obtain the adjusted QoS policy if the last configuration of the QoS policy times out;
[0031] Among them, SR-IOV stands for Single Root I / O Virtualization, an IO virtualization technology; VF stands for virtual function; QoS stands for quality of service.
[0032] A further technical solution is: the device further comprises: an initialization creation unit, which is used to initialize the SSD, create the SR-IOV VF, and enable automatic configuration of the QoS policy or enable automatic adjustment of the QoS policy for the existing QoS policy.
[0033] A further technical solution is: in the adjustment configuration unit, it is used to set the VF QoS configuration with remaining QoS resources to be equal to the current average performance of the VF, and at the same time set the VF QoS that has used up the QoS resources to be equal to the original QoS plus the aggregated remaining QoS resources / VF that has used up the QoS resources.
[0034] Its further technical solution is: the device also includes: a fifth judgment unit, used to judge whether a notification of adjusting the configuration of the QoS policy is received within a fixed period; if no notification of adjusting the configuration of the QoS policy is received within the fixed period, jump to execute the automatic configuration of the QoS policy to make the VF initial QoS configuration equal to the overall disk specification performance / VF quantity; if a notification of adjusting the configuration of the QoS policy is received within the fixed period, the configuration is terminated.
[0035] In a third aspect, this embodiment provides a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the method for configuring a QoS policy for SSD SR-IOV as described above when executing the computer program.
[0036] In a fourth aspect, the present embodiment provides a storage medium storing a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the method for configuring a QoS policy for SSD SR-IOV as described above can be implemented.
[0037] Compared with the prior art, the beneficial effects of the present invention are as follows: by automatically identifying whether the SSD has been configured with a QoS policy, and when it is not configured and automatic configuration is allowed, the QoS policy is automatically allocated according to the actual performance requirements of each virtual function (VF). This intelligent automatic configuration function greatly reduces the workload of the administrator, avoids the errors and inconveniences that may be caused by manual configuration, and improves the accuracy and efficiency of system configuration; in addition, by periodically counting the average performance of each VF and automatically adjusting the QoS policy accordingly, on-demand performance allocation is achieved; when it is detected that the performance requirement of a VF exceeds a preset threshold (i.e., full disk specification performance / VF number), it can respond quickly and automatically adjust the QoS policy to ensure that each VF shares SSD resources within a reasonable range, avoiding the problem of excessive concentration or waste of resources.
[0038] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 creative labor.
[0040] Figure 1 A flowchart of a method for configuring a QoS policy for SSD SR-IOV provided in an embodiment of the present invention;
[0041] Figure 2 A schematic block diagram of an apparatus for configuring a QoS policy for SSD SR-IOV provided in an embodiment of the present invention;
[0042] Figure 3 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are 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 creative work are within the scope of protection of the present invention.
[0044] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0045] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0046] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0047] See also Figure 1 In the specific embodiment shown, the present invention discloses a method for configuring a QoS policy for an SSD SR-IOV, comprising the following steps:
[0048] S1, determine whether the SSD has been configured with a QoS policy;
[0049] Specifically, the system or management software queries the current configuration information of the SSD through a specific interface or command. This information is usually stored in the firmware or management area of the SSD, including basic information of the SSD, enabled functions, and any related performance tuning or policy configuration. Next, the system will parse the queried configuration information to identify whether it contains configuration items related to the QoS policy, which may involve checking specific fields, flags, or data structures to determine whether the QoS policy has been enabled or configured with specific parameters. Based on the parsing results, the system will determine whether the SSD has been configured with a QoS policy. If the configuration information clearly indicates the existence of the QoS policy and its parameter settings, the SSD is considered to have been configured with a QoS policy; otherwise, the SSD is considered to have not been configured with a QoS policy. Among them, the QoS policy generally includes six flow limiting thresholds, including read IOPS, write IOPS, read and write IOPS, read bandwidth, write bandwidth, and read and write bandwidth.
[0050] More specifically, by directly querying the configuration information of the SSD and parsing its content, it is possible to accurately determine whether the SSD has been configured with a QoS policy, thereby avoiding erroneous judgments based on guesses or assumptions. In addition, the system is allowed to make corresponding decisions based on the actual configuration of the SSD, providing a reliable basis for subsequent QoS policy configuration or adjustment. If the SSD has been configured with a QoS policy, the system can further check the validity of the policy or make necessary adjustments; if the SSD has not been configured with a QoS policy, the system can configure the policy according to a preset automatic configuration process. Compared with the method of manually checking the SSD configuration or relying on external management tools, the implementation method provided by the present invention is simpler and faster, and the system can automatically complete the query and parsing process of the configuration information, thereby reducing the workload of the administrator and improving management efficiency. In addition, by accurately determining the QoS policy configuration of the SSD, the system can allocate and manage SSD resources more reasonably. If the SSD has been configured with an effective QoS policy, the system can make full use of these policies to optimize performance; if the SSD has not been configured with a QoS policy, the system can configure appropriate policies in a timely manner to avoid performance bottlenecks and resource waste.
[0051] S2: If the SSD is not configured with a QoS policy, determine whether the SSD allows automatic configuration of the QoS policy; if the SSD does not allow automatic configuration of the QoS policy, end the configuration.
[0052] Specifically, when the system detects that the SSD is not configured with a QoS policy, it first checks the current state of the SSD, including whether it is in an operational mode, whether there is enough remaining space for storing QoS policy configuration data, etc. Next, the system checks whether the SSD supports the function of automatically configuring the QoS policy, which is usually achieved by querying the firmware version, function list, or specific configuration flag of the SSD. If the firmware or hardware design of the SSD supports the automatic configuration function and the function has been enabled, the system considers that the SSD allows automatic configuration of the QoS policy. After determining that the SSD supports the automatic configuration function, the system usually prompts the user or administrator to ask whether the automatic configuration of the QoS policy is allowed, in order to ensure that the configuration of the SSD is not changed without the user's consent. The user or administrator can grant authorization through a graphical user interface (GUI), a command line interface (CLI), or other forms of interaction. If the user or administrator authorizes, the system will determine whether it is suitable for automatic configuration based on a preset algorithm or rule, combined with factors such as the specifications of the SSD, the current load, and the requirements of other VFs in the virtualization environment. If the judgment result is suitable for automatic configuration, the system will enter the next step of the QoS policy automatic configuration process; if it is not suitable, the user may be prompted to manually configure the QoS policy or keep the current unconfigured state.
[0053] More specifically, by automatically detecting the SSD status and function support, and combining the authorization of the user or administrator, the system can intelligently decide whether to automatically configure the QoS policy, which avoids performance problems caused by improper configuration and improves the user experience. In addition, the system can flexibly choose whether to automatically configure the QoS policy according to the actual situation of the SSD and user needs, which improves the adaptability and configurability of the system. In addition, through the automatic configuration judgment process, the system can automatically configure the QoS policy according to preset rules and conditions without manual intervention, which reduces management costs and improves management efficiency. In addition, the automatic configuration of QoS policies can ensure that SSD resources are reasonably allocated and utilized, avoid resource waste and performance bottlenecks, which helps to improve the overall performance and stability of the virtualized environment.
[0054] S3, if the SSD allows automatic configuration of QoS policies, the average performance of each VF in a fixed period is counted;
[0055] Specifically, when the system determines that the SSD allows automatic configuration of QoS policies, it will first set a fixed performance monitoring cycle. This cycle can be configured according to actual needs, such as every 5 seconds, 10 seconds or longer time intervals. The setting of the monitoring cycle should take into account the balance between the accuracy and real-time performance of the performance data. A cycle that is too short may cause data collection to be too frequent, increasing system overhead; while a cycle that is too long may not be able to reflect the changes in VF performance in a timely manner. At the beginning of each monitoring cycle, the system will start the performance data collection task, which usually involves collecting real-time performance data from each VF in the virtualization environment, such as IOPS (input / output operations per second), throughput, latency, etc. Data collection can be achieved through the API, SDK or other interfaces provided by the virtualization platform. The system needs to ensure that the performance data of each VF can be accurately and reliably obtained. At the end of each monitoring cycle, the system will calculate the average performance of each VF in the cycle, which usually involves summing or averaging the collected real-time performance data to obtain more representative performance indicators. The calculation of average performance can help the system more accurately understand the performance of each VF over a period of time, thereby providing strong support for subsequent QoS policy configuration. In addition, the calculated average performance data will be stored in the system database for subsequent analysis and comparison. At the same time, the system will update the VF performance status information based on the latest performance data to provide a basis for subsequent QoS policy adjustments. Among them, the average performance includes IOPS and bandwidth, and analyzes the IO model.
[0056] More specifically, by setting a fixed performance monitoring cycle and collecting the performance data of each VF in real time, the system can more accurately understand the performance of the VF, which helps the system to promptly discover performance bottlenecks and abnormal situations, and provide strong support for subsequent QoS policy configuration. In addition, based on the average performance data obtained by statistics, the system can more reasonably allocate SSD resources to each VF, which helps to avoid resource waste and performance bottlenecks, and improve the overall performance and stability of the virtualization environment. In addition, by reasonably setting the monitoring cycle and adopting efficient performance data collection methods, the system can reduce the impact on the virtualization environment and SSD while ensuring the accuracy of performance monitoring, which helps to reduce system overhead and improve the operating efficiency of the system. In addition, based on real-time performance data and average performance statistics, the system can dynamically adjust the QoS policy to adapt to changes in VF performance, which helps to ensure that SSD resources are always optimally utilized and improve the flexibility and adaptability of the virtualization environment.
[0057] S4, determining whether there is a scenario where the average performance of all VFs is greater than or equal to the overall disk specification performance / the number of VFs; if there is no scenario where the average performance of all VFs is greater than or equal to the overall disk specification performance / the number of VFs, then ending the configuration.
[0058] Specifically, the system first obtains the full-disk specification performance from the SSD specification or configuration information, which usually includes performance indicators such as the maximum IOPS and throughput of the SSD. Then, based on the number of VFs in the virtualization environment, the system calculates the average performance that each VF should theoretically be allocated, which is usually achieved by dividing the full-disk specification performance of the SSD by the number of VFs. The system traverses the performance statistics of each VF in N monitoring cycles, which include the average performance data of the VF in each cycle. For each VF, the system checks its average performance data in N cycles. If the average performance of a VF appears K times (K≤N) in the statistical results of N cycles, which is greater than or equal to the average performance that each VF should be allocated, then the performance of the VF is considered to exceed the resource share it should be allocated. In order to avoid misjudgment due to sudden performance, the system sets a threshold of K times judgment. Only when the average performance of a VF continues to exceed the standard for multiple cycles, it will be considered that there is a performance over-standard situation, which helps to reduce misconfiguration caused by temporary performance fluctuations. Among them, performance statistics include read IOPS, write IOPS, read bandwidth, write bandwidth, etc.
[0059] More specifically, by judging whether the average performance of VF exceeds the standard, the system can allocate SSD resources to each VF more reasonably, which helps to avoid the situation where some VFs occupy too much resources and cause the performance of other VFs to be limited. In addition, by continuously monitoring the performance of VFs and setting reasonable judgment thresholds, the system can promptly detect and handle performance exceeding the standard, which helps to reduce the risk of system instability or crash caused by performance bottlenecks or resource contention. In addition, through reasonable resource allocation and performance monitoring, the system can ensure that each VF can obtain sufficient resources to support its operation, which helps to improve the overall performance and user experience of the virtualization environment. In addition, based on the performance statistics and judgment logic of VF, the system can dynamically adjust the QoS policy to adapt to changes in VF performance, which helps to ensure that SSD resources are always optimally utilized and improve the flexibility and adaptability of the virtualization environment.
[0060] S5: If there is a scenario where the performance of the entire disk is greater than or equal to the number of VFs, the QoS policy is automatically configured so that the initial QoS configuration of the VF is equal to the performance of the entire disk / the number of VFs;
[0061] Specifically, the system first determines whether there is a scenario where the average performance of the VF is greater than or equal to the full disk specification performance divided by the number of VFs based on the previous performance monitoring and statistical results. This usually involves analyzing and comparing the VF performance data in multiple monitoring cycles. If the system detects that there is such a scenario, that is, the performance of one or some VFs exceeds the resource share that should be allocated to them, the system will trigger the process of automatically configuring the QoS policy. When the automatic configuration process is triggered, the system will calculate the QoS policy parameters that should be allocated to each VF based on the full disk specification performance of the SSD and the number of VFs in the current virtualization environment. For the IOPS performance model, the QoS configuration parameters will be equal to the disk IOPS performance specification divided by the number of VFs; for the bandwidth performance model, the QoS configuration parameters will be equal to the disk bandwidth performance specification divided by the number of VFs. The system will automatically configure the corresponding QoS policy for each VF based on the calculated QoS policy parameters, which usually involves modifying the configuration parameters of the virtualization platform or SSD controller to limit or optimize the virtual machine's access to the SSD VF resources. During the configuration process, the system needs to ensure that the newly configured QoS policy can be effectively implemented and will not have a negative impact on the stability and performance of the virtualization environment. After configuration is complete, the system will perform a series of verification tests to ensure that the newly configured QoS policy works as expected, including checking whether the performance of the VF is reasonably limited and whether the allocation of SSD resources is more balanced. If problems are found during the verification process or the performance does not meet expectations, the system may automatically adjust the QoS policy parameters and reconfigure it.
[0062] More specifically, by automatically configuring QoS policies, the system can ensure that each VF can obtain an SSD resource share that matches its performance requirements, which helps to avoid situations where some VFs over-occupy resources and limit the performance of other VFs, thereby improving the balance of resource allocation. In addition, automatically configuring QoS policies can effectively limit excessive access to SSD VF resources by virtual machines, thereby avoiding the risk of system instability or crashes caused by resource contention or performance bottlenecks, which helps to improve the overall stability and reliability of the virtualization environment. In addition, through reasonable QoS policy configuration, the system can ensure that each VF can operate in the best state, thereby improving the overall performance of the virtualization environment, which helps to improve user experience and business efficiency. In addition, automatically configuring QoS policies reduces the need for manual intervention and reduces management costs. The system can automatically adjust QoS policies based on the performance requirements of VFs and the resource status of SSDs, thereby improving management efficiency and automation.
[0063] S6, periodically count the average performance of VFs, calculate the remaining QoS resources of each VF and the VFs that have used up their QoS resources;
[0064] Specifically, the system will first set a fixed performance monitoring cycle, such as every 5 seconds, 10 seconds or longer time interval, which is used to regularly collect real-time performance data of each VF. At the beginning of each monitoring cycle, the system will start the performance data collection task to collect real-time performance data, such as IOPS, throughput, etc., from each VF in the virtualization environment. The system will process the collected real-time performance data and calculate the average performance of each VF in the current monitoring cycle. Based on the average performance of the VF and the currently set QoS policy, the system will calculate the consumption of QoS resources by each VF, including the number of VFs that have reached the QoS limit and the number of VFs that have not reached the QoS limit. For VFs that have not reached the QoS limit, the system will calculate the difference between its current cycle performance statistics and the QoS limit value. The system will summarize the difference between the real-time performance of all VFs that have not reached the QoS limit and the currently set QoS flow control to obtain the remaining situation of the overall QoS resources and the potential adjustable space. Based on the summarized remaining QoS resource situation, the system can automatically adjust the QoS policy to more reasonably allocate resources to each VF. This may include calculating the difference between the current performance and the flow control threshold for VFs that have not reached the QoS limit as the remaining QoS resources. For VFs that have reached the QoS limit, the QoS flow control threshold needs to be increased, and the room for improvement comes from the remaining QoS resources (if possible, optimize its performance through other means to reduce the occupancy of QoS resources).
[0065] More specifically, by periodically counting the average performance of VFs and calculating the consumption of QoS resources, the system can more flexibly adjust the QoS policy to adapt to changes in VF performance, which helps ensure that SSD resources are always optimally utilized. In addition, the system can collect VF performance data in real time and calculate QoS differences, so as to quickly respond to changes in VF performance requirements, which helps to reduce performance bottlenecks or resource waste caused by improper resource allocation. In addition, through reasonable QoS policy configuration and dynamic adjustment, the system can ensure that each VF can operate in the best state, thereby improving the overall performance of the virtualized environment. In addition, the automatic collection and calculation of VF performance data and QoS difference information reduces the need for manual intervention and reduces management costs. The system can automatically adjust the QoS policy based on real-time data, improving management efficiency and automation. In addition, by continuously monitoring and analyzing VF performance data and QoS difference information, the system can provide strong support for future resource optimization and expansion planning, which helps to ensure that the virtualized environment can continue to meet the development of business needs.
[0066] S7, determine whether the last configured QoS policy has timed out; if the last configured QoS policy has not timed out, return to execute step S6;
[0067] Specifically, each time the system configures a QoS policy, it will record a timestamp indicating the time when the configuration operation is completed. This timestamp can be saved in the system's log file or stored in a dedicated configuration management database. The system will set a reasonable timeout threshold based on actual needs. This threshold indicates the maximum time interval allowed after the QoS policy is configured. If the time between the last configuration and the current time exceeds this threshold, it is considered that the last configuration has timed out. The system will set a periodic check mechanism, such as checking every few seconds or tens of seconds. During each check, the system will read the timestamp of the last configuration of the QoS policy and compare it with the current time. If the difference between the last configuration time and the current time exceeds the set timeout threshold, the system will determine that the last configuration of the QoS policy has timed out. At this point, the system may trigger a series of subsequent operations, such as reconfiguring the QoS policy, issuing a warning, or notifying the administrator.
[0068] More specifically, by regularly checking the time when the QoS policy was last configured and determining whether it has timed out, the system can ensure that the QoS policy always remains in a valid state, which helps avoid performance problems caused by outdated QoS policies. In addition, by promptly handling timed-out QoS policy configurations, the system can reduce the risk of system instability or crashes caused by improper configuration or failure, which helps improve the overall stability and reliability of the virtualized environment. In addition, when it is found that the last configured QoS policy has timed out, the system can re-evaluate the resource requirements and performance status of the current virtualized environment, thereby more reasonably allocating resources to each VF, which helps optimize resource utilization and improve the overall performance of the virtualized environment. In addition, by automatically checking and handling timed-out QoS policy configurations, the system can reduce the need for manual intervention and reduce management costs. At the same time, this also allows administrators to focus more on other more important tasks and improve overall management efficiency.
[0069] S8, if the last configured QoS policy times out, adjust the configured QoS policy according to the remaining QoS resources of each VF and the VF that has used up the QoS resources to obtain the adjusted QoS policy;
[0070] Specifically, the system first detects the timestamp of the last QoS policy configuration and compares it with the current time to determine whether it has timed out. The timeout threshold can be set according to actual needs, such as a few seconds or tens of seconds. Once the last QoS policy configuration timeout is detected, the system adjusts it according to the results of the last collection cycle. The system further analyzes the current performance requirements and future performance forecasts of each VF, which can be achieved by monitoring the real-time performance data, historical performance data, and business load patterns of the VF. Based on the remaining QoS resources of each VF, the VF that has used up the QoS resources, and the performance requirements of the VF, the system will formulate a reasonable QoS policy adjustment plan, which aims to reallocate QoS resources to ensure that all VFs can obtain sufficient performance guarantees while avoiding resource waste. The system will automatically adjust the current QoS policy configuration according to the formulated adjustment plan, which may include increasing or decreasing the QoS limit value of a specific VF. After the adjustment is completed, the system will perform a series of verification tests to ensure that the new QoS policy configuration works as expected. At the same time, the system will continue to monitor the performance data of the VF and the use of QoS resources to promptly discover and handle potential problems.
[0071] More specifically, by regularly detecting timeouts and adjusting QoS policies based on resource conditions and requirements, the system can more flexibly respond to changes in VF performance requirements in the virtualized environment, which helps ensure that the QoS policy is always in the optimal state, thereby improving the overall performance of the system. In addition, by making adjustments based on the remaining QoS resources of each VF and the VF that has used up the QoS resources, it can ensure that resources are more reasonably allocated, which helps avoid resource waste and performance bottlenecks and improves resource utilization in the virtualized environment. In addition, by timely adjusting the timed QoS policy configuration, the system can reduce the risk of system instability or crashes caused by improper configuration or failure, which helps improve the overall stability and reliability of the virtualized environment. In addition, the automated detection and adjustment mechanism reduces the need for manual intervention and reduces management costs. At the same time, this also allows administrators to focus more on other more important tasks and improve overall management efficiency.
[0072] Among them, SR-IOV stands for Single Root I / O Virtualization, an IO virtualization technology; VF stands for virtual function; QoS stands for quality of service.
[0073] In one embodiment, before the step of determining whether the SSD has been configured with a QoS policy, the step further includes: initializing the SSD, creating an SR-IOV VF, enabling automatic configuration of the QoS policy or enabling automatic adjustment of the QoS policy if an existing QoS policy is enabled.
[0074] Specifically, first use the system management tool or the dedicated tool provided by the SSD manufacturer to initialize the SSD, which includes setting the basic parameters of the SSD, such as capacity, read and write mode, etc., and loading the necessary drivers and firmware. Create a virtual function (VF) on a PCIe SSD that supports SR-IOV through the umtool tool or the nvme protocol command. After creating the VF, you need to assign I / O queues to it. This can be done through the umtool tool or the nvme protocol command, and the specific steps include specifying the number of queues. In addition, the VF needs to be set to the online state so that it can receive and process I / O requests. SSDs usually contain multiple namespaces (NameSpace), which are units or spaces used to store data. In this technical feature, one or more NameSpaces need to be created for the VF in order to store data on the SSD. This step can be done through the umtool tool or the nvme protocol command, and the specific steps include specifying parameters such as the size, type, and protection level of the NameSpace. After creating the NameSpace, it needs to be attached to the previously created VF. This step ensures that the VF can access and manage the data in the NameSpace. This can be done through the umtool tool or the nvme protocol command. The specific steps include specifying parameters such as the NameSpace to be attached and the identifier of the VF. After completing the above steps, you need to configure the QoS policy of the SSD. For newly created VFs, you can turn on the switch that allows automatic configuration of QoS policies so that the system can automatically configure appropriate QoS policies for them according to preset rules or algorithms. For VFs that already have QoS policies, you can turn on the switch that allows automatic adjustment of QoS policies so that QoS policies can be automatically adjusted when necessary to adapt to changing performance requirements.
[0075] More specifically, by creating SR-IOV VFs and assigning independent I / O queues and NameSpaces to each VF, flexible allocation and sharing of SSD resources are achieved, which helps improve the utilization of SSD resources and meet the performance requirements of different virtual machines or applications. In addition, the function of allowing automatic configuration and automatic adjustment of QoS policies enables the system to dynamically adjust QoS policies according to performance requirements and resource conditions, which enhances the flexibility of QoS policies and enables them to better adapt to changes in performance requirements in virtualized environments. In addition, by creating independent NameSpaces for VFs and attaching them to VFs, data isolation and sharing are achieved, which helps optimize the overall performance of the virtualized environment and improve the stability and reliability of the system. In addition, using the umtool tool or nvme protocol command to create VFs, assign queues, set online status, and create and attach NameSpaces simplifies the management process and reduces management costs. In addition, through SR-IOV technology, SSD resources can be easily expanded and more VFs can be added to meet the growing needs of virtualized environments, which improves the scalability of the system and enables it to adapt to future business development.
[0076] In one embodiment, in the step of adjusting and configuring the QoS policy according to the remaining QoS resources of each VF and the VF that has used up the QoS resources to obtain the adjusted QoS policy, the QoS configuration of the VF with remaining QoS resources is set to be equal to the current average performance of the VF, and the QoS of the VF that has used up the QoS resources is set to be equal to the original QoS plus the aggregated remaining QoS resources / VF that has used up the QoS resources.
[0077] Specifically, the system first detects the remaining QoS resources of each VF, including bandwidth, IOPS (input / output operations per second) or other relevant performance indicators. At the same time, the system also counts the VFs that have used up their QoS resources, that is, those VFs that have reached or exceeded their current QoS limits. For those VFs that have not yet used up their QoS resources, the system calculates their average performance level, which can be achieved by taking the arithmetic mean or weighted average of the current performance of these VFs. The calculated average performance will be used as the basis for subsequent adjustment of QoS policies. For the remaining QoS resources of each VF, the system allocates these resources to those VFs that have been used up. In order to maintain fairness, the system sets the QoS of the VFs that have not reached the QoS limit to be equal to the previously calculated average performance of the VFs. In this way, even if the performance of these VFs is improved in subsequent use, they will not exceed the average level of other VFs, thereby avoiding unfair allocation of resources. For those VFs that have used up their QoS resources, the system will try to improve their performance by reallocating the remaining QoS resources of each VF. Specifically, the system calculates the ratio between the total amount of remaining QoS resources and the VFs that have used up all QoS resources, and then adds this ratio to the original QoS configuration of these VFs. In this way, these VFs can obtain additional performance resources, thereby alleviating performance bottlenecks to a certain extent. After completing the above adjustments, the system will apply the new QoS policy configuration, which includes updating the QoS limit value of the VF, adjusting related performance parameters, etc. The new QoS policy will ensure that all VFs can obtain fair and reasonable performance resource allocation.
[0078] More specifically, by allocating the remaining QoS resources of each VF to those VFs that have been used up, and setting the QoS of the VFs that have not reached the QoS limit to be equal to the previously calculated average performance of the VFs, the system ensures the fairness of resource allocation, which helps to avoid the situation where some VFs are limited in performance due to insufficient resources, while other VFs have excess resources. In addition, by adjusting the QoS limit value of the VF that has used up the QoS resources, the system alleviates the performance bottleneck to a certain extent, which helps to improve the overall performance of the virtualized environment so that all VFs can better meet their performance requirements. In addition, this implementation allows the system to dynamically adjust the QoS policy based on the remaining QoS resources of each VF and the VF that has used up the QoS resources, which enhances the flexibility and scalability of the system and enables it to adapt to virtualized environments of different scales and performance requirements. In addition, through the automated adjustment process, the system reduces the need for manual intervention. The administrator does not need to manually adjust the QoS limit value of each VF, but can rely on the system to automatically complete these tasks, which simplifies management operations and reduces management costs.
[0079] In one embodiment, after the step of adjusting and configuring the QoS policy according to the remaining QoS resources of each VF and the VF that has used up the QoS resources to obtain the adjusted QoS policy, it also includes: S9, judging whether a notification of adjusting the QoS policy configuration is received within a fixed period; if no notification of adjusting the QoS policy configuration is received within the fixed period, jumping to automatically configure the QoS policy so that the initial QoS configuration of the VF is equal to the overall disk specification performance / the number of VFs, that is, S5; if a notification of adjusting the QoS policy configuration is received within the fixed period, the configuration is terminated.
[0080] Specifically, after the system adjusts the QoS policy, it will start a fixed-cycle timer. This cycle can be set according to actual needs, such as a few seconds or tens of seconds. At the end of each cycle, the system will check whether it has received a new notification of adjusting the QoS policy. This notification may come from the administrator's manual operation or from a certain trigger mechanism within the system (such as detecting performance bottlenecks, resource changes, etc.). If no notification of adjusting the QoS policy is received within the fixed cycle, the system will consider that the current QoS policy configuration is appropriate, or at least does not need to be adjusted immediately. At this time, the system will jump to the step of automatically configuring the QoS policy and set the QoS of each VF to be equal to the overall disk specification performance divided by the number of VFs. This operation can be regarded as a "fallback" or "reset" mechanism, which ensures that VFs can obtain a relatively fair and reasonable performance allocation even when there is no new adjustment demand. If a notification of adjusting the QoS policy is received within the fixed cycle, the system will immediately stop the current periodic check and adjust the QoS policy according to the new requirements in the notification, which may involve operations such as reallocating QoS resources and updating the QoS limit value of VF. Regardless of whether the QoS policy is adjusted, after processing the relevant notifications or operations, the system will end the current configuration process and wait for the arrival of the next cycle or new adjustment requirements.
[0081] More specifically, by introducing a periodic inspection and response mechanism, the system can detect and handle possible performance issues in a timely manner, thereby improving the stability and reliability of the system. In addition, when no adjustment notification is received within a fixed period, the system automatically configures the QoS policy to ensure that each VF can obtain a relatively fair and reasonable performance allocation, which helps to avoid unfair resource allocation and performance bottlenecks. In addition, the system can adjust the QoS policy according to actual needs, which enhances the flexibility and scalability of the system. At the same time, by introducing a periodic inspection and response mechanism, the system can also adapt to virtualization environments of different scales and performance requirements.
[0082] In one embodiment, after the step of determining whether the SSD allows automatic configuration of the QoS policy, it also includes: S10, determining whether the SSD allows automatic adjustment of the QoS policy; if the SSD allows automatic adjustment of the QoS policy, jumping to execute periodic statistics on the average performance of the VF, calculating the remaining QoS resources of each VF and the VF that has used up the QoS resources, that is, S6; if the SSD does not allow automatic adjustment of the QoS policy, ending the configuration.
[0083] Specifically, the system will first check the configuration or status of the SSD to determine whether automatic adjustment of the QoS policy is allowed, which usually involves reading the firmware settings, configuration files or status registers of the SSD to obtain information about the support for automatic adjustment of the QoS policy. The system will periodically (such as a few seconds or tens of seconds, etc.) count the average performance of each virtual function (VF), which includes key performance indicators such as read rate, write rate, IOPS, etc. Based on the statistical average performance of the VF, the system will calculate the total amount of QoS resources remaining for each VF and the VF that has used up the QoS resources. This usually involves a comprehensive analysis of the total performance, allocated performance and current load of the SSD. If the SSD does not support automatic adjustment of the QoS policy, the system will assume that the current QoS policy configuration is fixed and does not need to be dynamically adjusted. At this point, the system will end the current configuration process and will no longer execute subsequent periodic statistics and calculation steps.
[0084] More specifically, by determining whether the SSD allows automatic adjustment of the QoS policy, the system can dynamically configure according to the actual capabilities and needs of the SSD, which improves the flexibility and adaptability of the system, enabling it to better adapt to different workloads and performance requirements. In addition, when the SSD allows automatic adjustment of the QoS policy, the system can periodically count the average performance of the VF and calculate the remaining QoS resources of each VF and the VF that has used up the QoS resources, which helps the system to more accurately understand the current resource allocation and performance bottlenecks, so as to perform targeted optimization and adjustment. In addition, through the automated configuration and adjustment process, the system reduces the need for manual intervention, and the administrator does not need to manually adjust the QoS policy or monitor the performance status of the SSD, thereby reducing management costs and complexity. In addition, automated QoS policy adjustment helps the system maintain stability and reliability in the face of performance fluctuations or load changes. By dynamically adjusting resource allocation, the system can ensure that critical businesses always receive sufficient performance support.
[0085] The present invention automatically identifies whether the SSD has been configured with a QoS policy, and automatically allocates a QoS policy according to the actual performance requirements of each virtual function (VF) when it is not configured and automatic configuration is allowed. This intelligent automatic configuration function greatly reduces the workload of administrators, avoids the errors and inconveniences that may be caused by manual configuration, and improves the accuracy and efficiency of system configuration. In addition, by periodically counting the average performance of each VF and automatically adjusting the QoS policy accordingly, on-demand performance allocation is achieved. When it is detected that the performance requirement of a VF exceeds a preset threshold (i.e., the overall disk specification performance / the number of VFs), it can respond quickly and automatically adjust the QoS policy to ensure that each VF shares SSD resources within a reasonable range, avoiding the problem of excessive concentration or waste of resources. In addition, The present invention not only takes into account the performance requirements of the current VF, but also realizes dynamic monitoring and efficient utilization of SSD resources by periodically counting and calculating the remaining QoS resources of each VF and the VF that has used up the QoS resources; when the last configured QoS policy times out or the resource allocation changes, the policy can be adjusted in time to ensure the maximum utilization of SSD performance and improve the overall operation efficiency of the system; in addition, through intelligent QoS policy configuration and adjustment, the performance stability and reliability of each VF application are effectively guaranteed, and the performance limitation problem caused by insufficient resources is avoided, which not only improves the user's business experience, but also enhances the market competitiveness of SSD products and wins more market share for manufacturers; compared with the traditional manual configuration and management method, the QoS policy management process of SSD SR-IOV is greatly simplified, and the administrator does not need to frequently intervene or adjust the policy to realize the intelligent and automatic allocation and monitoring of SSD resources, reducing the management complexity and operation and maintenance costs.
[0086] See also Figure 2 As shown, the present invention also discloses a device for configuring a QoS policy for SSD SR-IOV, comprising: a first judgment unit 10, a second judgment unit 20, a statistical unit 30, a third judgment unit 40, an automatic configuration unit 50, a statistical calculation unit 60, a fourth judgment unit 70 and an adjustment configuration unit 80;
[0087] The first determination unit 10 is used to determine whether the SSD has been configured with a QoS policy;
[0088] The second determination unit 20 is used to determine whether the SSD allows automatic configuration of the QoS policy if the SSD is not configured with the QoS policy;
[0089] The statistical unit 30 is used to count the average performance of each VF in a fixed period if the SSD allows automatic configuration of the QoS policy;
[0090] The third judgment unit 40 is used to judge whether there is a scenario in which the average performance of all VFs is greater than or equal to the overall disk specification performance / the number of VFs;
[0091] The automatic configuration unit 50 is used to automatically configure the QoS policy if there is a scenario that is greater than or equal to the full disk specification performance / the number of VFs, so that the VF initial QoS configuration is equal to the full disk specification performance / the number of VFs;
[0092] The statistical calculation unit 60 is used to periodically calculate the average performance of VFs, and calculate the remaining QoS resources of each VF and the VFs that have used up the QoS resources;
[0093] The fourth determination unit 70 is used to determine whether the last configured QoS policy has timed out;
[0094] The adjustment configuration unit 80 is used to adjust the configuration QoS policy according to the remaining QoS resources of each VF and the VF that has used up the QoS resources to obtain the adjusted QoS policy if the last configuration of the QoS policy times out;
[0095] Among them, SR-IOV stands for Single Root I / O Virtualization, an IO virtualization technology; VF stands for virtual function; QoS stands for quality of service.
[0096] In one embodiment, the device further includes: an initialization creation unit, which is used to initialize the SSD, create an SR-IOVVF, and enable automatic configuration of the QoS policy or enable automatic adjustment of the QoS policy for an existing QoS policy.
[0097] In one embodiment, the adjustment configuration unit 80 is used to set the VF QoS configuration with remaining QoS resources to be equal to the current average performance of the VF, and to set the VF QoS that has used up all QoS resources to be equal to the original QoS plus the aggregated remaining QoS resources / VF that has used up all QoS resources.
[0098] In one embodiment, the device also includes: a fifth judgment unit 90, which is used to judge whether a notification of adjusting the configuration of the QoS policy is received within a fixed period; if a notification of adjusting the configuration of the QoS policy is not received within the fixed period, then jump to execute the automatic configuration of the QoS policy so that the initial QoS configuration of the VF is equal to the overall disk specification performance / VF quantity; if a notification of adjusting the configuration of the QoS policy is received within the fixed period, then the configuration is terminated.
[0099] In one embodiment, the device also includes: a sixth judgment unit 100, used to judge whether the SSD allows automatic adjustment of the QoS policy; if the SSD allows automatic adjustment of the QoS policy, then jump to execute periodic statistics on the average performance of the VF, calculate the remaining QoS resources of each VF and the VF that has used up the QoS resources; if the SSD does not allow automatic adjustment of the QoS policy, then end the configuration.
[0100] It should be noted that technicians in the relevant field can clearly understand that the specific implementation process of the above-mentioned SSD SR-IOV configuration QoS policy device and each unit can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and brevity of description, it will not be repeated here.
[0101] The above-mentioned device for configuring QoS policy of SSD SR-IOV can be implemented in the form of a computer program, and the computer program can be used in Figure 3 Runs on the computer device shown.
[0102] See also Figure 3 , Figure 3 is a schematic block diagram of a computer device provided in an embodiment of the present application; the computer device 500 may be a terminal or a server, wherein the terminal may be an electronic device with communication functions such as a smart phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device. The server may be an independent server or a server cluster composed of multiple servers.
[0103] See also Figure 3 The computer device 500 includes a processor 502 , a memory and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .
[0104] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, and when the program instructions are executed, the processor 502 can execute a method for configuring a QoS policy for SSD SR-IOV.
[0105] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .
[0106] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a method for configuring a QoS policy for SSD SR-IOV.
[0107] The network interface 505 is used to communicate with other devices over the network. Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0108] The processor 502 is used to run the computer program 5032 stored in the memory to implement the following steps:
[0109] Determine whether the SSD has been configured with a QoS policy; if the SSD has not been configured with a QoS policy, determine whether the SSD allows automatic configuration of the QoS policy; if the SSD allows automatic configuration of the QoS policy, then count the average performance of each VF in a fixed period; determine whether there is a scenario in which the average performance of all VFs is greater than or equal to the full disk specification performance / number of VFs; if there is a scenario in which the average performance of all VFs is greater than or equal to the full disk specification performance / number of VFs, then automatically configure the QoS policy so that the initial QoS configuration of the VF is equal to the full disk specification performance / number of VFs; periodically count the average performance of the VFs, and calculate the remaining QoS resources of each VF and the VFs that have used up the QoS resources; determine whether the last configuration of the QoS policy has timed out; if the last configuration of the QoS policy has timed out, adjust the configuration of the QoS policy according to the remaining QoS resources of each VF and the VFs that have used up the QoS resources to obtain the adjusted QoS policy; where SR-IOV is Single Root I / O Virtualization, an IO virtualization technology; VF is virtual function; QoS is quality of service.
[0110] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0111] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.
[0112] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the above-mentioned method for configuring a QoS policy for SSD SR-IOV can be implemented. The storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the above-mentioned method can be implemented. The program instructions include the following steps:
[0113] Determine whether the SSD has been configured with a QoS policy; if the SSD has not been configured with a QoS policy, determine whether the SSD allows automatic configuration of the QoS policy; if the SSD allows automatic configuration of the QoS policy, then count the average performance of each VF in a fixed period; determine whether there is a scenario in which the average performance of all VFs is greater than or equal to the full disk specification performance / number of VFs; if there is a scenario in which the average performance of all VFs is greater than or equal to the full disk specification performance / number of VFs, then automatically configure the QoS policy so that the initial QoS configuration of the VF is equal to the full disk specification performance / number of VFs; periodically count the average performance of the VFs, and calculate the remaining QoS resources of each VF and the VFs that have used up the QoS resources; determine whether the last configuration of the QoS policy has timed out; if the last configuration of the QoS policy has timed out, adjust the configuration of the QoS policy according to the remaining QoS resources of each VF and the VFs that have used up the QoS resources to obtain the adjusted QoS policy; where SR-IOV is Single Root I / O Virtualization, an IO virtualization technology; VF is virtual function; QoS is quality of service.
[0114] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.
[0115] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0116] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or skipped.
[0117] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0118] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.
[0119] The above embodiments are preferred implementation schemes of the present invention. In addition, the present invention may also be implemented in other ways. Any obvious replacement without departing from the concept of the present technical solution is within the protection scope of the present invention.
Claims
1. A method for configuring a QoS policy for SSD SR-IOV, characterized in that: The following steps are involved: Determine whether the SSD has been configured with a QoS policy; If the SSD is not configured with a QoS policy, determine whether the SSD allows automatic configuration of a QoS policy; If the SSD allows automatic configuration of QoS policies, the average performance of each VF in a fixed period is calculated; Determine whether the average performance of all VFs is greater than or equal to the overall disk performance / number of VFs. If there is a scenario where the ratio is greater than or equal to the overall disk performance / VF quantity, the QoS policy is automatically configured so that the VF initial QoS configuration is equal to the overall disk performance / VF quantity; Periodically count the average performance of VFs, and calculate the remaining QoS resources of each VF and the VFs that have used up their QoS resources; Determine whether the last configured QoS policy has timed out; If the last configured QoS policy times out, the QoS policy is adjusted based on the remaining QoS resources of each VF and the VF that has used up the QoS resources to obtain the adjusted QoS policy; Among them, SR-IOV stands for Single Root I / O Virtualization, an IO virtualization technology; VF stands for virtual function; QoS stands for quality of service.
2. The method for configuring QoS policy for SSD SR-IOV according to claim 1, characterized in that: Before the step of determining whether the SSD has been configured with a QoS policy, the step also includes: initializing the SSD, creating an SR-IOV VF, enabling automatic configuration of the QoS policy, or enabling automatic adjustment of the QoS policy if an existing QoS policy is enabled.
3. The method for configuring QoS policy for SSD SR-IOV according to claim 1, characterized in that: In the step of adjusting and configuring the QoS policy according to the remaining QoS resources of each VF and the VF that has used up the QoS resources to obtain the adjusted QoS policy, the QoS configuration of the VF with remaining QoS resources is set to be equal to the current average performance of the VF, and the QoS of the VF that has used up the QoS resources is set to be equal to the original QoS plus the aggregated remaining QoS resources / VF that has used up the QoS resources.
4. The method for configuring QoS policy for SSD SR-IOV according to claim 1, characterized in that: After the step of adjusting and configuring the QoS policy according to the remaining QoS resources of each VF and the VF that has used up the QoS resources to obtain the adjusted QoS policy, the method also includes: determining whether a notification of adjusting the QoS policy configuration is received within a fixed period; if no notification of adjusting the QoS policy configuration is received within the fixed period, jumping to automatically configure the QoS policy so that the initial QoS configuration of the VF is equal to the overall disk specification performance / the number of VFs; if a notification of adjusting the QoS policy configuration is received within the fixed period, ending the configuration.
5. The device for configuring QoS policy for SSD SR-IOV is characterized in that: include: A first judgment unit, a second judgment unit, a statistical unit, a third judgment unit, an automatic configuration unit, a statistical calculation unit, a fourth judgment unit and an adjustment configuration unit; The first determination unit is used to determine whether the SSD has been configured with a QoS policy; The second determination unit is used to determine whether the SSD allows automatic configuration of the QoS policy if the SSD is not configured with the QoS policy; The statistical unit is used to count the average performance of each VF in a fixed period if the SSD allows automatic configuration of the QoS policy; The third judgment unit is used to judge whether there is a scenario in which the average performance of all VFs is greater than or equal to the overall disk specification performance / the number of VFs; The automatic configuration unit is used to automatically configure the QoS policy if there is a scenario that is greater than or equal to the full disk specification performance / the number of VFs, so that the VF initial QoS configuration is equal to the full disk specification performance / the number of VFs; The statistical calculation unit is used to periodically calculate the average performance of the VF, and calculate the remaining QoS resources of each VF and the VF that has used up the QoS resources; The fourth judgment unit is used to judge whether the last configured QoS policy has timed out; The configuration adjustment unit is used to adjust the QoS policy according to the remaining QoS resources of each VF and the VF that has used up the QoS resources to obtain the adjusted QoS policy if the last configuration of the QoS policy times out; Among them, SR-IOV is Single Root I / O Virtualization, an IO virtualization technology; VF is virtual function; QoS is quality of service.
6. The device for configuring QoS policy for SSD SR-IOV according to claim 5, characterized in that: The device also includes: an initialization creation unit, which is used to initialize the SSD, create an SR-IOV VF, and enable automatic configuration of the QoS policy or enable automatic adjustment of the QoS policy for an existing QoS policy.
7. The device for configuring QoS policy for SSD SR-IOV according to claim 5, characterized in that: The adjustment configuration unit is used to set the VF QoS configuration with remaining QoS resources to be equal to the current average performance of the VF, and to set the VF QoS that has used up all QoS resources to be equal to the original QoS plus the aggregated remaining QoS resources / VF that has used up all QoS resources.
8. The device for configuring QoS policy for SSD SR-IOV according to claim 5, characterized in that: The device also includes: a fifth judgment unit, which is used to judge whether a notification of adjusting the configuration of the QoS policy is received within a fixed period; if no notification of adjusting the configuration of the QoS policy is received within the fixed period, jump to execute the automatic configuration of the QoS policy so that the initial QoS configuration of the VF is equal to the overall disk specification performance / the number of VFs; if a notification of adjusting the configuration of the QoS policy is received within the fixed period, the configuration is terminated.
9. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the method for configuring a QoS policy for an SSD SR-IOV according to any one of claims 1 to 4 when executing the computer program.
10. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the method for configuring a QoS policy for an SSD SR-IOV according to any one of claims 1 to 4 is implemented.