Solid state disk multi-level cache scheduling method and system
By obtaining the identity and service quality requirements of the virtual machine in the solid-state drive controller and dynamically adjusting the cache layer permissions and priorities, the problem of cache resource competition between virtual machines is solved, more efficient cache scheduling is achieved, and system performance in the virtualized environment is improved.
Patent Information
- Application Number
- CN202510785908.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-09-26
AI Technical Summary
In a virtualized environment, where multiple virtual machines share a solid-state drive (SSD), existing cache scheduling strategies cannot effectively meet the unique I/O requirements of each virtual machine, resulting in unstable performance and a degraded user experience.
By obtaining the identity information and service quality requirements of the virtual machine from the solid-state drive controller, the write access rights and scheduling priority of the cache layer are dynamically adjusted to achieve differentiated cache scheduling for different virtual machines.
Improves the rational allocation of cache resources between virtual machines, ensures that the performance of high-priority virtual machines is not disturbed, and improves the overall system performance and user experience.
Smart Images

Figure CN120704873A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of solid-state hard disk technology, particularly to applications in a virtualized environment, and more particularly to a multi-level cache scheduling method and system for a solid-state hard disk. Background Art
[0002] To bridge the speed gap between the central processing unit (CPU) and flash memory, solid-state drives (SSDs) generally integrate a multi-level cache system. This multi-level cache architecture typically consists of a small, high-speed DRAM cache as the first-level cache, and a slightly larger SLC cache as the second-level cache, which is superior to the primary storage cache. When a user or operating system initiates a data access request, whether for read or write, the cache scheduling method deployed within the SSD controller begins to operate. However, the core goal of current multi-level cache mechanisms and scheduling mechanisms is to maximize the cache hit rate for frequently accessed data, thereby effectively reducing average access latency and improving the overall system response speed and user experience.
[0003] In actual applications, the types of applications carried by SSDs are not fixed, but change dynamically with user operations or system task switching. For example, a user may run a database query and update application that requires high random read and write performance in a short period of time, and then may need to perform a large-capacity file copy or backup task. The I / O characteristics of the latter are mainly high-throughput sequential writes. This type of situation is particularly prevalent in virtualization technology applications.
[0004] Given the current use of virtualization technology in computing environments, a single physical server (host) often runs multiple virtual machines simultaneously. Each virtual machine may host different applications, generating distinct I / O load characteristics. For example, one virtual machine might run a development environment that continuously compiles and links small files, with an I / O pattern characterized by high-frequency random reads and writes. Meanwhile, another virtual machine might be dedicated to transcoding and storing video streams, with an I / O pattern dominated by continuous, large-block sequential writes. Still another virtual machine might run a latency-sensitive online transaction processing system. These virtual machines share the same solid-state drive (SSD) and its multi-level cache resources on the host. In such a complex scenario with multiple VMs sharing storage, if the SSD cache scheduling policy is simply a global one that uniformly processes I / O requests from all VMs, or if adjustments are made based on the overall statistical characteristics of the mixed I / O flows generated by all VMs, it will be difficult to provide optimal cache support for each VM with its unique I / O requirements. Summary of the Invention
[0005] The present invention aims to solve the technical problems mentioned in the background technology. The purpose of the present invention is to provide a multi-level cache scheduling method and system for solid-state hard disks, so as to provide differentiated cache scheduling for different virtual machines in a virtualized application environment and improve the overall performance of the system.
[0006] In order to achieve the above object, the technical solutions of the present invention are:
[0007] As one aspect of the present application, a multi-level cache scheduling method for a solid-state drive is provided. The method is applied in a scenario where multiple virtual machines carrying different applications are running on a host machine and interacting with a solid-state drive, and includes the following steps:
[0008] Step S1: Determine multiple virtual machines that need to be cached;
[0009] Step S2: Based on the identity information of each virtual machine, the solid-state drive controller obtains the service quality requirement information of each virtual machine;
[0010] Step S3: Outputting a data control policy to the solid-state drive based on the quality of service requirement information of each virtual machine, the data control policy including write access rights or write amounts configured for at least one predetermined type of cache layer for access data of each virtual machine and scheduling processing priorities for data access requests configured for different virtual machines;
[0011] Step S4: The solid-state drive receives the data control policy issued by the solid-state drive controller, and allocates the write access permission level or write amount and scheduling priority of the predetermined type of cache layer according to the permission level of each virtual machine based on the data control policy.
[0012] In this application, step S1 specifically includes:
[0013] Step S11: The host machine identifies application running states of multiple virtual machines carrying different applications, where the application running states indicate that data access requests required by one or more program applications are about to be executed;
[0014] Step S12: Determine a virtual machine that needs to be cached according to the application running status of multiple virtual machines.
[0015] In this application, in step S2:
[0016] The identity information of the virtual machine includes one or more of a virtual machine identifier, a virtual machine physical address, a virtual machine communication address, an access identifier of the virtual machine in the host machine, a name of the virtual machine in the host machine, and a creation time of the virtual machine in the host machine;
[0017] The service quality requirement information of the virtual machine includes one of a delay-sensitive quality level, a high-throughput quality level, a balanced quality level, and a best-effort quality level.
[0018] In this application, step S2 specifically includes:
[0019] Step S21: Based on the identity information of each virtual machine, the solid-state drive controller retrieves the service quality requirement information corresponding to each virtual machine;
[0020] Step S22: When it is determined that the service quality requirement information of one or more virtual machines is not provided or needs to be adjusted, the solid-state drive controller extracts characteristic parameters of the data stream of the virtual machine within the set time window, and obtains service quality requirement information that matches the virtual machine based on the characteristic parameter analysis and mapping; when it is determined that the service quality requirement information of the virtual machine has been provided, the solid-state drive controller obtains the service quality requirement information of the virtual machine.
[0021] In this application, in step S3:
[0022] The configuration of scheduling processing priorities for data access requests to different virtual machines specifically prioritizes the data access requests of different virtual machines according to the quality of service requirement information and gives scheduling priority authority;
[0023] The configuration grants each virtual machine write access rights or write amount to at least one predetermined type of cache layer for accessing data, specifically to manage and control the behavior of each virtual machine using the internal cache of the solid-state drive, and configures the write access rights or write amount of the cache layer according to the service quality requirement information.
[0024] In this application, after step S4, the following steps are also included:
[0025] Step S5: The solid-state drive controller monitors the performance of each virtual machine and, based on a comparison result between the performance of the virtual machine and the quality of service requirement information corresponding to the virtual machine, adjusts the operating parameters for priority scheduling of data access requests and / or the operating parameters for write access rights or write volume control when the data stream output by the virtual machine passes through the cache layer.
[0026] Furthermore, the step S5 specifically includes:
[0027] Step S51: monitor the performance of each virtual machine and obtain performance data of each virtual machine;
[0028] Step S52: Obtain a comparison result based on the current performance data of each virtual machine and the target operating parameters indicated by the service quality requirement information corresponding to each virtual machine;
[0029] Step S53: determining whether an operating parameter of a target virtual machine needs to be adjusted based on the comparison result; if so, the solid-state drive controller outputs a planned adjustment parameter value for the target virtual machine;
[0030] Step S54: Adjust the operating parameters for the I / O request priority scheduling process and / or the operating parameters for the cache layer write access permission or write amount control according to the planned adjustment parameter value.
[0031] In the present application, the following steps are further included between step S53 and step S54:
[0032] Step A1: obtaining service quality requirement information of each virtual machine other than the target adjusted virtual machine;
[0033] Step A2: Based on the planned adjustment parameter value of the target virtual machine and the current service quality requirement information of each other virtual machine, a quantitative calculation is performed to obtain a potential impact value of the planned adjustment parameter value on the service quality requirement information of each virtual machine other than the target virtual machine, and the potential impact value is compared with the allowable impact threshold set for each virtual machine other than the target virtual machine to obtain an impact comparison result;
[0034] Step A3: Based on the impact comparison result, determine whether to adjust the planned adjustment parameter value. If so, limit the range of the planned adjustment parameter value or modify the content to obtain a modified adjustment parameter value, so that the potential impact value of the modified adjustment parameter value on each virtual machine other than the target virtual machine does not exceed its corresponding allowable impact threshold.
[0035] Furthermore, the step A2 specifically includes:
[0036] Step A21: Obtaining planned adjustment parameter values for the target virtual machine, quality of service requirement information for each virtual machine other than the target virtual machine, and current status data of at least one key shared resource within the solid-state drive, wherein the key shared resource includes one or more of available space in the SLC cache, the number of concurrent write channels of the NAND flash memory, and the depth of a controller processing queue;
[0037] Step A22: Based on the current state data of the at least one key shared resource, determining whether the total system load of the solid-state drive causes the at least one key shared resource to be in a resource bottleneck state; if it is determined that the at least one key shared resource is in a resource bottleneck state, using the first estimation model; if it is determined that the at least one key shared resource is not in a resource bottleneck state, using the second estimation model;
[0038] The first estimation model indicates that, based on the planned adjustment parameter value of the target virtual machine, the service quality requirement information of each virtual machine other than the target virtual machine, and the current state data of the at least one key shared resource, the potential impact of the planned adjustment parameter value of the target virtual machine on the service quality requirement information of each virtual machine other than the target virtual machine, taking into account the nonlinear competition effect of the at least one key shared resource, is calculated and estimated;
[0039] The second estimation model indicates that based on the planned adjustment parameter value of the target virtual machine and the service quality requirement information of each virtual machine except the target virtual machine, the potential impact value of the planned adjustment parameter value of the target virtual machine on the service quality requirement information of each virtual machine other than the target virtual machine is calculated and estimated.
[0040] In one aspect of the present application, a multi-level cache scheduling method for a solid-state drive is provided. By outputting a data control strategy to the solid-state drive based on the service quality requirement information of each virtual machine, it is possible to dynamically and differentiatedly optimize the data storage and flow strategy in the multi-level cache for a specific application or a specific virtual machine. This achieves the reasonable allocation of cache resources among the various virtual machines to adapt to the differentiated needs of each virtual machine while ensuring that the performance of high-priority or I / O delay-sensitive virtual machines is not interfered with by the I / O activities of other virtual machines, and has the advantage of improving the overall performance of the system.
[0041] As a second aspect of the present application, a multi-level cache scheduling system for a solid-state drive is provided. The cache scheduling system is configured on a solid-state drive controller and is applied in a scenario where multiple virtual machines carrying different applications run on a host machine and interact with the solid-state drive, including:
[0042] A determination module, configured to determine a plurality of virtual machines requiring cache scheduling;
[0043] An acquisition module, configured to acquire, from a controller of the solid-state drive, service quality requirement information of each virtual machine based on the identity information of each virtual machine;
[0044] an output module, the output module being configured to output a data control policy to the solid-state drive based on the quality of service requirement information of each virtual machine, the data control policy including a write access permission or write amount configured for at least one predetermined type of cache layer for access data of each virtual machine and a scheduling processing priority for data access requests configured for different virtual machines;
[0045] An execution module is used to allocate a write access permission level or write amount and a scheduling processing priority of a predetermined type of cache layer according to the permission level of the virtual machine based on the data control policy after the solid-state drive receives the data control policy issued by the solid-state drive controller.
[0046] In the second aspect of the present application, a multi-level cache scheduling system for a solid-state drive is provided. The cache scheduling system is configured on the controller of the solid-state drive and includes a determination module, an acquisition module, an output module, and an execution module. Through the interactive cooperation between the modules, the data control strategy can be output to the solid-state drive according to the service quality requirement information of each virtual machine, thereby dynamically and differently optimizing the data storage and flow strategy in the multi-level cache for a specific application or a specific virtual machine. Under the premise of ensuring that the performance of high-priority or I / O delay-sensitive virtual machines is not interfered with by the I / O activities of other virtual machines, the cache resources are reasonably allocated among the virtual machines to adapt to the differentiated needs of the virtual machines, which has the advantage of improving the overall performance of the system.
[0047] For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 This is a flow chart of a multi-level cache scheduling method for a solid-state drive in this embodiment;
[0049] Figure 2 This is a schematic diagram of a specific flow chart indicating step S1 in a multi-level cache scheduling method for a solid-state drive in this embodiment;
[0050] Figure 3 This is a schematic diagram of a specific flow chart indicating step S2 in a multi-level cache scheduling method for a solid-state drive in this embodiment;
[0051] Figure 4 4 is a flow chart of a multi-level cache scheduling method for a solid-state drive in this embodiment, including the subsequent step S5;
[0052] Figure 5 A schematic diagram of a specific flow chart indicating step S5 in a multi-level cache scheduling method for a solid-state drive in this embodiment;
[0053] Figure 6 4 is a flow chart showing the intermediate processing steps between step S53 and step S54 in a multi-level cache scheduling method for a solid state drive in this embodiment;
[0054] Figure 7 This is a schematic diagram of a specific flow indicating step A2 in a multi-level cache scheduling method for a solid-state drive in this embodiment;
[0055] Figure 8 This is a system structure diagram of a solid-state hard disk multi-level cache scheduling system in this embodiment. DETAILED DESCRIPTION
[0056] In order to better illustrate the present invention, the present invention is described in further detail below with reference to the accompanying drawings.
[0057] It should be clear that the embodiments described are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the embodiments of the present application.
[0058] The terms used in the embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit the embodiments of the present application. The singular forms "a," "the," and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0059] When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims. In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances.
[0060] In addition, in this application, unless otherwise specified, "plurality" refers to two or more. "And / or" describes the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0061] In the existing technology, in an environment where multiple virtual machines share a solid-state drive, the I / O activities between different virtual machines will interfere with each other, especially in terms of cache resource competition and I / O request scheduling. This will cause the application performance of virtual machines with high priority requirements to decline. At the same time, cache resources will be occupied by low-priority or non-critical tasks, affecting the overall cache utilization efficiency. This performance instability and the inability to guarantee service quality will directly affect the user experience and the reliability of the business system.
[0062] Therefore, the technical problem actually solved by this application is how to realize cache allocation and scheduling between the solid-state hard disk and multiple virtual machines under the host machine, so that cache resources can be reasonably allocated among the virtual machines to adapt to the differentiated needs of each virtual machine.
[0063] An example is now used for description. In this example, Figure 1 As shown, a multi-level cache scheduling method for a solid-state drive is provided, which is applied in a scenario where multiple virtual machines carrying different applications are running in a host machine and interacting with a solid-state drive, and includes the following steps:
[0064] Step S1: Determine multiple virtual machines that need to be cached;
[0065] Step S2: Based on the identity information of each virtual machine, the solid-state hard disk controller obtains the service quality requirement information of each virtual machine; wherein the identity information of the virtual machine includes one or more of a virtual machine identifier, a virtual machine physical address, a virtual machine communication address, an access identifier of the virtual machine in the host machine, a name of the virtual machine in the host machine, and a creation time of the virtual machine in the host machine, and the service quality requirement information of the virtual machine includes one of a delay-sensitive quality level, a high-throughput quality level, a balanced quality level, and a best-effort quality level.
[0066] Step S3: outputting a data control policy to the solid-state drive based on the quality of service requirement information of each virtual machine, the data control policy including configuring write access rights or write amounts for at least one predetermined type of cache layer for access data of each virtual machine and scheduling processing priorities for data access requests of each different virtual machine; wherein, the scheduling processing priorities for data access requests of each different virtual machine are specifically prioritized and given scheduling priority rights based on the quality of service requirement information; the write access rights or write amounts for at least one predetermined type of cache layer for access data of each virtual machine are specifically managed and controlled for each virtual machine's use of the internal cache of the solid-state drive, and the write rights or write amounts for the cache layer are configured according to the quality of service requirement information;
[0067] Step S4: The solid-state drive receives the data control policy issued by the solid-state drive controller, and allocates the write access permission level or write amount and scheduling priority of the predetermined type of cache layer according to the permission level of each virtual machine based on the data control policy.
[0068] Among them, determining multiple virtual machines that need cache scheduling refers to identifying a set of virtual machines that are currently running or about to generate I / O requests and require solid-state hard drives for cache resource allocation and access priority management. This can be achieved by the host machine monitoring the running status of the virtual machine application and notifying it.
[0069] The identity information of a virtual machine refers to the attribute data used to uniquely identify a virtual machine. It can be implemented using one or more of the following: a virtual machine identifier, a virtual machine physical address, a virtual machine communication address, an access identifier of the virtual machine in the host machine, a name of the virtual machine in the host machine, and the creation time of the virtual machine in the host machine. It is mainly used by the solid-state drive controller to distinguish different virtual machines.
[0070] Quality of service requirement information refers to the requirements of the virtual machine or the application running on it for the I / O performance of the solid-state drive. Generally, when the virtual machine submits a business transaction, the service quality standard / level of the submitted transaction is identified at the same time. In the virtual machine, it can be annotated with delay-sensitive quality level, high-throughput quality level, balanced quality level, best-effort quality level, etc., and is mainly used to guide the solid-state drive controller to perform differentiated resource allocation and scheduling.
[0071] A data control policy refers to a set of rules formulated by the solid-state drive controller based on the service quality requirements of the virtual machine to guide the management of the solid-state drive's internal cache and the processing of I / O requests. The policy specifies the write access rights or write volume for at least one predetermined type of cache layer assigned to each virtual machine for accessing data. This policy limits or allocates the use of the solid-state drive's internal cache (e.g., one or more of the SLC cache, primary storage cache, or DRAM cache) by different virtual machines, such as allowing writes, prohibiting writes, or limiting the amount of data written. This policy is primarily used to control the use of cache memory based on the virtual machine's needs and cache resource availability. The scheduling processing priority assigned to data access requests from different virtual machines specifies setting different processing orders or priorities for I / O requests from different virtual machines, ensuring that high-priority virtual machine requests are processed first.
[0072] For example, a host monitors the I / O activity of multiple virtual machines running on it. When it detects that one or more virtual machines are generating I / O requests or their application status indicates that a large amount of I / O is about to be generated, the host notifies the SSD controller of the virtual machine's identity information, thereby determining which virtual machine currently needs to perform I / O activity. After receiving the virtual machine identity information, the SSD controller can query internal storage through program interaction with the host to obtain the corresponding quality of service requirement information for the virtual machine, such as determining whether each virtual machine has a delay-sensitive quality level, a high-throughput quality level, a balanced quality level, or a best-effort quality level. Based on the virtual machine's quality of service requirement information, the controller calculates and generates a data control policy, such as granting high write permissions and a large write quota to the SLC cache for one of the delay-sensitive quality level virtual machines, and setting the scheduling priority of its I / O requests to the highest. After receiving this policy, the SSD's internal firmware or scheduling module identifies the I / O request from the virtual machine, allocates SLC cache space to it according to the policy, and places the request in a high-priority queue for priority processing.
[0073] Further explanation, in this embodiment, as Figure 2 As shown, the step S1 specifically includes:
[0074] Step S11: The host machine identifies application running states of multiple virtual machines carrying different applications, where the application running states indicate that data access requests required by one or more program applications are about to be executed;
[0075] Step S12: Determine a virtual machine that needs to be cached according to the application running status of multiple virtual machines.
[0076] Among them, the application running state refers to the current activity mode of the program or task running in the virtual machine, such as large-scale file compilation, database query, video transcoding, or background backup, etc. It can be achieved by the host machine monitoring system calls in the virtual machine, analyzing process activities, identifying file access patterns, and evaluating CPU or memory usage.
[0077] Determining a virtual machine that requires cache scheduling based on the application running states of multiple virtual machines refers to confirming, based on the identified application running states of the virtual machines, that the virtual machines have I / O activities that require data interaction with the solid-state drives.
[0078] In addition, in this embodiment, the host machine may deploy a monitoring agent, which runs inside the host machine or the virtual machine to enable the host machine to monitor the I / O activities of the virtual machine.
[0079] Further explanation, in this embodiment, as Figure 3As shown, the step S2 specifically includes:
[0080] Step S21: Based on the identity information of each virtual machine, the solid-state drive controller retrieves the service quality requirement information corresponding to each virtual machine;
[0081] Step S22: When it is determined that the service quality requirement information of one or more virtual machines is not provided or needs to be adjusted, the solid-state drive controller extracts characteristic parameters of the data stream of the virtual machine within the set time window, and obtains service quality requirement information that matches the virtual machine based on the characteristic parameter analysis and mapping; when it is determined that the service quality requirement information of the virtual machine has been provided, the solid-state drive controller obtains the service quality requirement information of the virtual machine.
[0082] Retrieving quality of service requirement information means that the solid-state drive controller attempts to obtain the quality of service requirement information associated with the virtual machine identity information from a preset storage location or through a specific communication interface using program interaction. This can be achieved by accessing the virtual machine metadata interface provided by the host machine or reading a specific file.
[0083] A set time window is a continuous period of time used to observe and analyze the data flow behavior of a virtual machine.
[0084] When it is determined that the service quality requirement information of one or more virtual machines is not provided or needs to be adjusted, the service quality requirement information category or level that best matches the current I / O behavior of the virtual machine is determined through predefined rules, lookup tables or models, and used as the current service quality requirement information of the virtual machine.
[0085] When it is determined that the service quality requirement information of the virtual machine has been provided, that is, the I / O activity performed by the virtual machine has the service quality requirement information remark, the solid state drive controller directly obtains it.
[0086] It is proposed to output a data control strategy to the solid-state drive based on the service quality requirement information of each virtual machine. The data control strategy includes the write access rights or write amount of the cache layer of the predetermined type of access data configured for each virtual machine and the scheduling processing priority of data access requests of different virtual machines. After receiving the data control strategy, the solid-state drive allocates the write access rights level or write amount and scheduling processing priority of the cache layer of the predetermined type according to the permission level of the virtual machine according to the data control strategy. For example, for delay-sensitive virtual machines, a higher scheduling priority and a larger SLC cache write permission can be allocated. For high-throughput virtual machines, a higher write amount and an appropriate scheduling priority can be allocated. In this way, cache resources and I / O scheduling can be preliminarily allocated according to different service quality requirement information. However, cache scheduling based solely on the initially set service quality requirement information may not be able to adapt to changes in performance requirements during the operation of the virtual machine, resulting in unreasonable resource allocation or inaccurate priority scheduling, thereby affecting the performance of the virtual machine.
[0087] Therefore, in this embodiment, it is proposed that Figure 4 As shown, after step S4, step S5 is configured, and step S5 includes:
[0088] The solid-state drive controller monitors the performance of each virtual machine and, based on the comparison between the performance of the virtual machine and the service quality requirement information corresponding to the virtual machine, adjusts the operating parameters used for priority scheduling of data access requests and / or the operating parameters used for write access rights or write volume control when the data flow output by the virtual machine passes through the cache layer. Monitoring the performance of each virtual machine refers to obtaining data reflecting the efficiency and effectiveness of the virtual machine's I / O activities, such as I / O latency, I / O throughput, IOPS and other indicators.
[0089] To illustrate, in a specific implementation scenario, a solid-state drive controller can periodically (e.g., once per second) collect average I / O latency and throughput data for each virtual machine. Each virtual machine also pre-configures its quality of service (QoS) requirements. For example, VM A requires an average I / O latency of less than 500 microseconds, while VM B requires a sequential write throughput greater than 200 MB / s. The controller detects that VM A's average I / O latency remains above 500 microseconds for a period of time, while VM B's throughput is normal. The controller compares VM A's actual latency (e.g., 600 microseconds) with its QoS requirement (500 microseconds) and finds that it does not meet the requirements. Based on this comparison, the controller determines that adjustments are necessary for VM A. After the adjustments, the controller continues to monitor VM A's performance. If it does not meet the requirements, it may stop further adjustments or perform fine-tuning. The controller may also attempt further parameter adjustments or consider adjusting the parameters of other VMs to free up shared resources.
[0090] Furthermore, the specific steps of step S5 are described as follows: Figure 5 As shown, the step S5 specifically includes:
[0091] Step S51: monitor the performance of each virtual machine and obtain performance data of each virtual machine;
[0092] Step S52: Obtain a comparison result based on the current performance data of each virtual machine and the target operating parameters indicated by the service quality requirement information corresponding to each virtual machine;
[0093] Step S53: determining whether an operating parameter of a target virtual machine needs to be adjusted based on the comparison result; if so, the solid-state drive controller outputs a planned adjustment parameter value for the target virtual machine;
[0094] Step S54: Adjust the operating parameters for the I / O request priority scheduling process and / or the operating parameters for the cache layer write access permission or write amount control according to the planned adjustment parameter value.
[0095] To better understand the above steps, some technical features involved are explained below:
[0096] Among them, performance data refers to quantitative indicators reflecting the I / O performance of the virtual machine, which can be expressed by indicators such as IOPS (input / output operations per second), throughput (amount of data transmitted per second), average access delay, maximum access delay, queue depth, etc.
[0097] Among them, the comparison result refers to the difference or relationship between the actual performance data and the target operating parameters, which can be expressed by the difference or ratio between the actual value and the target value, or the Boolean judgment result of whether the target condition is met; the target virtual machine refers to the specific virtual machine that needs to be performance evaluated and its operating parameters may be adjusted in the current performance monitoring and adjustment; the planned adjustment parameter value refers to the recommended value preliminarily determined based on the performance comparison result for adjusting the I / O scheduling and cache control related parameters of the target virtual machine in the solid-state drive, which can be in the form of recommended increase or decrease priority value, recommended adjustment cache write quota, recommended modification, etc. The operating parameters of the I / O request priority scheduling processing refer to the parameters that affect the processing order and priority of the I / O requests issued by the virtual machine in the internal scheduling queue of the solid-state drive, which can be controlled by parameters such as priority value, scheduling weight, service category identifier, etc. The operating parameters of the cache layer write access permission or write amount control refer to the parameters that control the permission, rate or total amount when the virtual machine writes data to the internal cache layer of the solid-state drive (such as SLC cache), which can be controlled by parameters such as the cache type allowed to be written, the maximum write rate limit, the maximum write data amount quota, and the write permission level.
[0098] The following describes step S5 with reference to a specific example:
[0099] Assume that a solid-state drive is connected to a host machine running virtual machines A and B. VM A is configured for a latency-sensitive application, and its quality of service requirement information indicates a target operating parameter of average I / O latency of less than 2 milliseconds. VM B is configured for a high-throughput application, and its quality of service requirement information indicates a target operating parameter of sequential write throughput greater than 400 MB / s.
[0100] During operation, the SSD controller continuously monitors the performance of VM A and VM B. At a certain point in time, VM A's average I / O latency is monitored to be 5 milliseconds, and VM B's sequential write throughput is 300 MB / s, generating corresponding performance data.
[0101] This performance data is compared with the target operating parameters indicated by the corresponding quality of service requirements. The comparison results show that VM A's actual latency (5 milliseconds) is higher than its target (less than 2 milliseconds), while VM B's actual throughput (300 MB / s) is lower than its target (greater than 400 MB / s).
[0102] Based on the comparison results, the performance of both VM A and VM B falls short of their service quality requirements, necessitating adjustments to their operating parameters. Based on a pre-set adjustment algorithm, the SSD controller outputs planned parameter adjustments for VM A, such as a recommendation to increase its I / O request priority by one level. It also outputs planned parameter adjustments for VM B, such as a recommendation to increase its cache tier sequential write quota by 50MB / second.
[0103] Based on these planned parameter values, the SSD controller adjusts the priority of VM A in the I / O request scheduling queue so that its request can be processed more quickly. It also adjusts the write volume control parameters for VM B when performing sequential writes to the SLC cache, allowing it to write to the cache at a higher rate or in a larger total amount.
[0104] Further explanation, in this embodiment, as Figure 6 As shown, between step S53 and step S54, the following steps are also included:
[0105] Step A1: obtaining service quality requirement information of each virtual machine other than the target adjusted virtual machine;
[0106] Step A2: Based on the planned adjustment parameter value of the target virtual machine and the current service quality requirement information of each other virtual machine, a quantitative calculation is performed to obtain a potential impact value of the planned adjustment parameter value on the service quality requirement information of each virtual machine other than the target virtual machine, and the potential impact value is compared with the allowable impact threshold set for each virtual machine other than the target virtual machine to obtain an impact comparison result;
[0107] Step A3: Based on the impact comparison result, determine whether to adjust the planned adjustment parameter value. If so, limit the range of the planned adjustment parameter value or modify the content to obtain a modified adjustment parameter value, so that the potential impact value of the modified adjustment parameter value on each virtual machine other than the target virtual machine does not exceed its corresponding allowable impact threshold.
[0108] The planned adjustment parameter values refer to recommended values of operating parameters to be applied to the target virtual machine, which are preliminarily determined based on the comparison results between the performance of the target virtual machine and the service quality requirements. These parameters can affect its I / O priority.
[0109] The current service quality requirement information of each other virtual machine refers to the performance data actually achieved by the other virtual machines other than the target virtual machine at the current moment.
[0110] The potential impact value refers to a numerical value obtained through quantitative calculation, which reflects the degree of deviation or negative impact that may be caused to the service quality requirements of other virtual machines if the parameter value is adjusted according to the plan.
[0111] The permissible impact threshold is the preset limit for the maximum acceptable deviation or negative impact on the service quality of each non-target VM. The impact comparison result is a comparison of the potential impact value with the corresponding permissible impact threshold, indicating whether the planned adjustment will cause the service quality of other VMs to exceed the acceptable range.
[0112] The modified adjustment parameter value refers to the final value used to adjust the target virtual machine operating parameter after the range is limited or the content is modified.
[0113] In a specific example scenario, a solid-state drive controller manages multiple virtual machines running on a host, including a database VM with high latency requirements and a VM performing background data backup. The controller detects that the write throughput of the background data backup VM is not meeting its target. Therefore, it determines that the cache write quota for this VM needs to be increased and outputs a planned adjustment parameter value, such as doubling the SLC cache write quota for this VM.
[0114] At this point, the system first determines the service quality requirements of the database VM, such as an average I / O latency requirement of no more than 50 microseconds. Next, based on the planned adjustment parameter values of the background data backup VM (doubling the write quota) and the actual I / O latency of the database VM (for example, 40 microseconds), the system uses a pre-defined quantitative calculation model to estimate that if the planned adjustment is carried out, the I / O latency of the database VM could increase to 60 microseconds.
[0115] The database VM's permissible impact threshold is set to a maximum latency increase of 10 microseconds (meaning a total latency of no more than 50 microseconds). Comparing the estimated latency increase (20 microseconds) with the permissible impact threshold (10 microseconds) revealed that the estimated impact exceeded the permissible range.
[0116] Therefore, the system determines that the planned adjustment parameter value needs to be modified. After limiting the range or modifying the content, the revised adjustment parameter value is obtained. For example, if the modified adjustment parameter value is to increase the write quota by 50%, the system will perform another quantitative calculation and estimate that the latency of the database VM may increase to 45 microseconds under this adjustment. This estimated impact value (5 microseconds) does not exceed the allowable impact threshold (10 microseconds).
[0117] At this point, the system determines to use the modified adjustment parameter value and adjusts the cache write volume control parameter of the background data backup virtual machine accordingly.
[0118] Further explanation, in this embodiment, as Figure 7 As shown, the step A2 specifically includes:
[0119] Step A21: Obtaining planned adjustment parameter values for the target virtual machine, quality of service requirement information for each virtual machine other than the target virtual machine, and current status data of at least one key shared resource within the solid-state drive, wherein the key shared resource includes one or more of available space in the SLC cache, the number of concurrent write channels of the NAND flash memory, and the depth of a controller processing queue;
[0120] Step A22: Based on the current state data of the at least one key shared resource, determining whether the total system load of the solid-state drive causes the at least one key shared resource to be in a resource bottleneck state; if it is determined that the at least one key shared resource is in a resource bottleneck state, using the first estimation model; if it is determined that the at least one key shared resource is not in a resource bottleneck state, using the second estimation model;
[0121] Among them, the first estimation model indicates that based on the planned adjustment parameter value of the target virtual machine, the service quality requirement information of each virtual machine except the target virtual machine and the current status data of the at least one key shared resource, the potential impact value of the planned adjustment parameter value of the target virtual machine on the service quality requirement information of each virtual machine other than the target virtual machine, which takes into account the nonlinear competition effect of the at least one key shared resource, is calculated and estimated.
[0122] The second estimation model indicates that based on the planned adjustment parameter value of the target virtual machine and the service quality requirement information of each virtual machine except the target virtual machine, the potential impact value of the planned adjustment parameter value of the target virtual machine on the service quality requirement information of each virtual machine other than the target virtual machine is calculated and estimated.
[0123] Among them, key shared resources refer to hardware or software resources that are competed for by multiple virtual machines inside the solid-state drive, and the resource bottleneck state refers to the usage rate of key shared resources reaching or approaching its capacity limit.
[0124] The first estimation model refers to a computational model used to quantitatively evaluate the potential impact of target virtual machine parameter adjustment on the service quality of other virtual machines. This model is used in a resource bottleneck state and can capture and reflect the nonlinear impact brought about by competition for key shared resources.
[0125] The second estimation model refers to another calculation model used to quantitatively evaluate potential impacts. This model is used when resources are not in a bottleneck state. In this case, resource competition is relatively mild, and the impact between virtual machines may be closer to a linear relationship.
[0126] In the current step, by introducing the judgment of the status of key shared resources inside the solid-state drive and selecting different impact estimation models according to whether the resources are in a bottleneck state, the potential impact of the target virtual machine operating parameters on the service quality of other virtual machines can be more accurately adjusted.
[0127] On one hand, a multi-level cache scheduling method for a solid-state drive is provided. By outputting a data control strategy to the solid-state drive based on the service quality requirement information of each virtual machine, the data storage and flow strategy in the multi-level cache can be dynamically and differentiatedly optimized for a specific application or a specific virtual machine. This ensures that the performance of high-priority or I / O delay-sensitive virtual machines is not interfered with by the I / O activities of other virtual machines, while achieving reasonable allocation of cache resources among the virtual machines to adapt to the differentiated needs of the virtual machines, thereby having the advantage of improving the overall performance of the system.
[0128] In two aspects of this embodiment, Figure 8 As shown, a multi-level cache scheduling system 100 for a solid-state drive is provided. The cache scheduling system is configured on a solid-state drive controller and is applied in a scenario where multiple virtual machines carrying different applications run on a host machine and interact with the solid-state drive, including:
[0129] A determination module 101 is configured to determine a plurality of virtual machines requiring cache scheduling;
[0130] An acquisition module 102 is configured to acquire, from a solid-state drive controller, service quality requirement information of each virtual machine based on the identity information of each virtual machine;
[0131] an output module 103 configured to output a data control policy to the solid-state drive based on the quality of service requirement information of each virtual machine, the data control policy including a write access permission or write amount configured for at least one predetermined type of cache layer for access data of each virtual machine, and a scheduling processing priority for data access requests configured for different virtual machines;
[0132] Execution module 104, the execution module 104 is used to allocate the write access permission level or write amount and scheduling processing priority of the predetermined type of cache layer according to the permission level of the virtual machine according to the data control policy after the solid-state drive receives the data control policy issued by the controller of the solid-state drive.
[0133] In the second aspect of this embodiment, a multi-level cache scheduling system for a solid-state drive is provided. The cache scheduling system is configured on the controller of the solid-state drive and includes a determination module, an acquisition module, an output module, and an execution module. Through the interactive cooperation between the modules, it is possible to output data control strategies to the solid-state drive according to the service quality requirement information of each virtual machine, thereby dynamically and differentially optimizing the data storage and flow strategies in the multi-level cache for specific applications or specific virtual machines. This ensures that the performance of high-priority or I / O delay-sensitive virtual machines is not interfered with by the I / O activities of other virtual machines, while achieving reasonable allocation of cache resources among various virtual machines to adapt to the differentiated needs of various virtual machines, which has the advantage of improving the overall performance of the system.
[0134] Based on the disclosure and teachings of the above description, those skilled in the art may also make changes and modifications to the above embodiments. Therefore, the present invention is not limited to the specific embodiments disclosed and described above, and modifications and variations of the present invention should also fall within the scope of protection of the claims of the present invention. In addition, although certain specific terms are used in this description, these terms are only for convenience of description and do not constitute any limitation to the present invention.
Claims
1. A multi-level cache scheduling method for a solid-state drive, applied in a scenario where multiple virtual machines carrying different applications interact with a solid-state drive in a host machine, characterized in that: The steps include: Step S1: Determine multiple virtual machines that need to be cached; Step S2: Based on the identity information of each virtual machine, the solid-state drive controller obtains the service quality requirement information of each virtual machine; Step S3: Outputting a data control policy to the solid-state drive based on the quality of service requirement information of each virtual machine, the data control policy including write access rights or write amounts configured for at least one predetermined type of cache layer for access data of each virtual machine and scheduling processing priorities for data access requests configured for different virtual machines; Step S4: The solid-state drive receives the data control policy issued by the solid-state drive controller, and allocates the write access permission level or write amount and scheduling priority of the predetermined type of cache layer according to the permission level of each virtual machine based on the data control policy.
2. The multi-level cache scheduling method for a solid-state drive according to claim 1, wherein: The step S1 specifically includes: Step S11: The host machine identifies application running states of multiple virtual machines carrying different applications, where the application running states indicate that data access requests required by one or more program applications are about to be executed; Step S12: Determine a virtual machine that needs to be cached according to the application running status of multiple virtual machines.
3. The multi-level cache scheduling method for a solid-state drive according to claim 1, wherein: In step S2: the identity information of the virtual machine includes one or more of a virtual machine identifier, a virtual machine physical address, a virtual machine communication address, an access identifier of the virtual machine in the host machine, a name of the virtual machine in the host machine, and a creation time of the virtual machine in the host machine; The service quality requirement information of the virtual machine includes one of a delay-sensitive quality level, a high-throughput quality level, a balanced quality level, and a best-effort quality level.
4. The multi-level cache scheduling method for a solid-state drive according to claim 1, wherein: The step S2 specifically includes: Step S21: Based on the identity information of each virtual machine, the solid-state drive controller retrieves the service quality requirement information corresponding to each virtual machine; Step S22: When it is determined that the service quality requirement information of one or more virtual machines is not provided or needs to be adjusted, the solid-state drive controller extracts characteristic parameters of the data stream of the virtual machine within the set time window, and obtains service quality requirement information that matches the virtual machine based on the characteristic parameter analysis and mapping; when it is determined that the service quality requirement information of the virtual machine has been provided, the solid-state drive controller obtains the service quality requirement information of the virtual machine.
5. The method for scheduling a multi-level cache of a solid-state drive according to claim 1, wherein in step S3: The configuration of scheduling processing priorities for data access requests to different virtual machines specifically prioritizes the data access requests of different virtual machines according to the quality of service requirement information and gives scheduling priority authority; The configuration grants each virtual machine write access rights or write amount to at least one predetermined type of cache layer for accessing data, specifically to manage and control the behavior of each virtual machine using the internal cache of the solid-state drive, and configures the write access rights or write amount of the cache layer according to the service quality requirement information.
6. The method for scheduling a multi-level cache of a solid-state drive according to claim 1, further comprising, after step S4: Step S5: The solid-state drive controller monitors the performance of each virtual machine and, based on a comparison result between the performance of the virtual machine and the quality of service requirement information corresponding to the virtual machine, adjusts the operating parameters for priority scheduling of data access requests and / or the operating parameters for write access rights or write volume control when the data stream output by the virtual machine passes through the cache layer.
7. The method for scheduling a multi-level cache of a solid-state drive according to claim 6, wherein step S5 specifically comprises: Step S51: monitor the performance of each virtual machine and obtain performance data of each virtual machine; Step S52: Obtain a comparison result based on the current performance data of each virtual machine and the target operating parameters indicated by the service quality requirement information corresponding to each virtual machine; Step S53: determining whether an operating parameter of a target virtual machine needs to be adjusted based on the comparison result; if so, the solid-state drive controller outputs a planned adjustment parameter value for the target virtual machine; Step S54: Adjust the operating parameters for the I / O request priority scheduling process and / or the operating parameters for the cache layer write access permission or write amount control according to the planned adjustment parameter value.
8. The multi-level cache scheduling method for a solid-state drive according to claim 7, wherein: The following steps are included between step S53 and step S54: Step A1: obtaining service quality requirement information of each virtual machine other than the target adjusted virtual machine; Step A2: Based on the planned adjustment parameter value of the target virtual machine and the current service quality requirement information of each other virtual machine, a quantitative calculation is performed to obtain a potential impact value of the planned adjustment parameter value on the service quality requirement information of each virtual machine other than the target virtual machine, and the potential impact value is compared with the allowable impact threshold set for each virtual machine other than the target virtual machine to obtain an impact comparison result; Step A3: Based on the impact comparison result, determine whether to adjust the planned adjustment parameter value. If so, limit the range of the planned adjustment parameter value or modify the content to obtain a modified adjustment parameter value, so that the potential impact value of the modified adjustment parameter value on each virtual machine other than the target virtual machine does not exceed its corresponding allowable impact threshold.
9. The multi-level cache scheduling method for a solid-state drive according to claim 8, characterized in that: The step A2 specifically includes: Step A21: Obtaining planned adjustment parameter values for the target virtual machine, quality of service requirement information for each virtual machine other than the target virtual machine, and current status data of at least one key shared resource within the solid-state drive, wherein the key shared resource includes one or more of available space in the SLC cache, the number of concurrent write channels of the NAND flash memory, and the depth of a controller processing queue; Step A22: Based on the current state data of the at least one key shared resource, determining whether the total system load of the solid-state drive causes the at least one key shared resource to be in a resource bottleneck state; if it is determined that the at least one key shared resource is in a resource bottleneck state, using the first estimation model; if it is determined that the at least one key shared resource is not in a resource bottleneck state, using the second estimation model; The first estimation model indicates that, based on the planned adjustment parameter value of the target virtual machine, the service quality requirement information of each virtual machine other than the target virtual machine, and the current state data of the at least one key shared resource, the potential impact of the planned adjustment parameter value of the target virtual machine on the service quality requirement information of each virtual machine other than the target virtual machine, taking into account the nonlinear competition effect of the at least one key shared resource, is calculated and estimated; The second estimation model indicates that based on the planned adjustment parameter value of the target virtual machine and the service quality requirement information of each virtual machine except the target virtual machine, the potential impact value of the planned adjustment parameter value of the target virtual machine on the service quality requirement information of each virtual machine other than the target virtual machine is calculated and estimated.
10. A multi-level cache scheduling system for a solid-state drive, configured on a solid-state drive controller and applied in a scenario where multiple virtual machines carrying different applications interact with the solid-state drive in a host machine, characterized in that: include: A determination module, configured to determine a plurality of virtual machines requiring cache scheduling; An acquisition module, configured to acquire, from a controller of the solid-state drive, service quality requirement information of each virtual machine based on the identity information of each virtual machine; an output module, the output module being configured to output a data control policy to the solid-state drive based on the quality of service requirement information of each virtual machine, the data control policy including a write access permission or write amount configured for at least one predetermined type of cache layer for access data of each virtual machine, and a scheduling processing priority for data access requests configured for different virtual machines; An execution module is used to allocate a write access permission level or write amount and a scheduling processing priority of a predetermined type of cache layer according to the permission level of the virtual machine based on the data control policy after the solid-state drive receives the data control policy issued by the solid-state drive controller.
Citation Information
Patent Citations
Method for ensuring fault isolation of virtual machines of cache-aware multi-core processor
CN102053873A
Cloud application-guided solid state disk cache management system and method
CN106775942A
Virtualization cache implementation method and physical machine
CN110597451A
Memory management method and memory management device
CN119669113A
Deep learning task hybrid deployment method and system
CN119987974A