A solid state disk multi-level cache scheduling method and system
Patent Information
- Application Number
- CN202510785908.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2045-06-12
AI Technical Summary
在这样的多虚拟机共享存储的复杂场景下,如果固态硬盘的缓存调度策略仅仅是一个全局性的、对所有虚拟机的I/O请求采用统一处理方式的策略,或者只是简单地基于所有虚拟机产生的混合I/O流的整体统计特性进行调整,那么就很难为每一个具有独特I/O需求的虚拟机提供最优化的缓存支持
Smart Images

Figure CN120704873B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of solid-state drive (SSD) technology, particularly its application in virtualization environments, and specifically to a multi-level cache scheduling method and system for SSDs. Background Technology
[0002] To bridge the speed gap between the CPU and flash memory, solid-state drives (SSDs) typically integrate a multi-level caching system. This multi-level caching architecture commonly combines a small-capacity but high-speed DRAM cache as the first level, and a slightly larger SLC cache (slightly larger than the main storage cache) as the second level. When a user or operating system initiates a data access request, whether for reading or writing, the cache scheduling method deployed within the SSD controller begins to operate. However, the core goal of current multi-level caching and scheduling mechanisms is to maximize the cache hit rate of frequently accessed data, thereby effectively reducing average access latency and improving overall system responsiveness and user experience.
[0003] In practical applications, the types of applications hosted on solid-state drives are not fixed, but change dynamically as users operate or system tasks switch. For example, a user may first run a database query and update application that requires high random read and write performance, and then may need to perform a large file copy or backup task. The latter's I / O characteristics are mainly high-throughput sequential writes. This type of situation is especially common in applications of virtualization technology.
[0004] Given the current application of virtualization technology in computing environments, multiple virtual machines (VMs) often run simultaneously on a single physical server (host machine). Each VM may host different applications, resulting in varying I / O loads. For example, one VM might be running a development environment that continuously compiles and links small files, exhibiting high-frequency random read / write operations; another VM might be dedicated to transcoding and storing video streams, with its I / O primarily consisting of continuous, large-block sequential writes; and yet another VM might be running a latency-sensitive online transaction processing system. These VMs share the same solid-state drive (SSD) and its multi-level cache resources on the host machine. In such a complex scenario of multiple VMs sharing storage, if the SSD's cache scheduling strategy is merely a global strategy that applies a uniform approach to I / O requests from all VMs, or simply adjusts based on the overall statistical characteristics of the mixed I / O streams generated by all VMs, it becomes difficult to provide optimal cache support for each VM with unique I / O requirements. Summary of the Invention
[0005] The present invention aims to solve the technical problems mentioned in the background art. The purpose of the present invention is to provide a multi-level cache scheduling method and system for solid-state drives, so as to realize the advantage of providing differentiated cache scheduling for different virtual machines in virtualization application environments and improving the overall system performance.
[0006] To achieve the above objectives, the technical solutions of the present invention are as follows:
[0007] As one aspect of this application, a multi-level cache scheduling method for solid-state drives is provided, applicable to scenarios where multiple virtual machines running different applications on a host machine interact with the solid-state drive, including the following steps:
[0008] Step S1: Identify the multiple virtual machines that need to be cached and scheduled;
[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: Output data control policies to the solid-state drive based on the service quality requirements of each virtual machine. The data control policies include write access permissions or write amounts of at least one predetermined type of cache layer configured for each virtual machine and scheduling processing priorities for data access requests configured for each different virtual machine.
[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 volume of the cache layer of a predetermined type and the scheduling processing priority 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 the application running status of multiple virtual machines carrying different applications, wherein the application running status indicates that one or more program applications will execute data access requests.
[0014] Step S12: Determine the virtual machines that need to be cached based on 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 the following: virtual machine identifier, virtual machine physical address, virtual machine communication address, virtual machine access identifier in the host machine, virtual machine name in the host machine, and virtual machine creation time in the host machine;
[0017] The service quality requirements of the virtual machine include one of the following: latency-sensitive quality level, high-throughput quality level, balanced quality level, and 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 the feature parameters of the data stream of the virtual machine within a set time window, and obtains the service quality requirement information matching the virtual machine based on the feature parameters analysis and mapping; when it is determined that the service quality requirement information of the virtual machine is 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 assigns priority to the data access requests of different virtual machines by prioritizing the data access requests of different virtual machines based on service quality requirements and granting them priority scheduling permissions.
[0023] The configuration of granting each virtual machine at least one type of cache layer write access permission or write volume specifically involves controlling the behavior of each virtual machine using the internal cache of the solid-state drive, and configuring the cache layer write permission or write volume according to the service quality requirement information.
[0024] In this application, after step S4, the following is also included:
[0025] Step S5: The solid-state drive controller monitors the performance of each virtual machine and adjusts the running parameters used for data access request priority scheduling and / or the running parameters used for write access permissions or write volume control when the data flow output by the virtual machine passes through the cache layer, based on the comparison results between the performance of the virtual machine and the service quality requirement information corresponding to the virtual machine.
[0026] Furthermore, step S5 specifically includes:
[0027] Step S51: Monitor the performance of each virtual machine and obtain the performance data of each virtual machine;
[0028] Step S52: Obtain the comparison results 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: Based on the comparison results, determine whether the running parameters of a target virtual machine need to be adjusted. If so, the solid-state drive controller outputs the planned adjustment parameter values for the target virtual machine.
[0030] Step S54: Adjust the operating parameters used for the I / O request priority scheduling process and / or the operating parameters used for the cache layer write access permission or write volume control according to the planned parameter values.
[0031] In this application, a further step is included between step S53 and step S54:
[0032] Step A1: Obtain the service quality requirements information of each virtual machine other than the target 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 other virtual machines, perform quantitative calculations to obtain the potential impact value of the planned adjustment parameter value on the service quality requirement information of other virtual machines except the target virtual machine, and compare the potential impact value with the allowable impact threshold set for other virtual machines except the target virtual machine to obtain the impact comparison result.
[0034] Step A3: Based on the impact comparison results, determine whether to adjust the plan adjustment parameter value. If so, limit the magnitude or modify the content of the plan adjustment parameter value to obtain the modified adjustment parameter value, so that the potential impact 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, step A2 specifically includes:
[0036] Step A21: Obtain the planned adjustment parameter value of the target virtual machine and the service quality requirement information of each virtual machine other than the target virtual machine, as well as the current status data of at least one key shared resource inside the solid-state drive. The key shared resource includes one or more of the following: available space of SLC cache, number of concurrent write channels of NAND flash memory, and depth of controller processing queue.
[0037] Step A22: Based on the current status data of the at least one key shared resource, determine 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, then the first prediction model is adopted; if it is determined that the at least one key shared resource is not in a resource bottleneck state, then the second prediction model is adopted.
[0038] The first prediction model indicates that, based on the target virtual machine's planned adjustment parameter value, the service quality requirement information of each virtual machine other than the target virtual machine, and the current status data of the at least one key shared resource, the potential impact of the target virtual machine's planned adjustment parameter value 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 predicted.
[0039] The second prediction 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 other than the target virtual machine, 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 is calculated and predicted.
[0040] One aspect of this application provides a multi-level cache scheduling method for solid-state drives (SSDs). By outputting data control strategies to the SSDs based on the service quality requirements of each virtual machine, this method can dynamically and differentiately optimize the data storage and flow strategies in the multi-level cache for specific applications or virtual machines. This achieves the reasonable allocation of cache resources among virtual machines to adapt to the differentiated needs of each virtual machine, while ensuring that the performance of high-priority or I / O latency-sensitive virtual machines is not interfered with by the I / O activities of other virtual machines. This has the advantage of improving the overall system performance.
[0041] As a second aspect of this application, a multi-level cache scheduling system for solid-state drives (SSDs) is provided. This cache scheduling system is configured on the SSD controller and is applied in scenarios where multiple virtual machines running different applications on a host machine interact with the SSD. The system includes:
[0042] A determination module, which is used to determine multiple virtual machines that need to be cached and scheduled;
[0043] The acquisition module is used to acquire the service quality requirement information of each virtual machine from the solid-state drive controller based on the identity information of each virtual machine.
[0044] The output module is used to output a data control policy to the solid-state drive according to the service quality requirements information of each virtual machine. The data control policy includes write access permissions or write amounts of at least one predetermined type of cache layer configured for each virtual machine and scheduling processing priorities for data access requests configured for each different virtual machine.
[0045] An execution module is used to, after receiving a data control policy from the solid-state drive's controller, allocate a predetermined type of cache layer write access permission level or write volume and schedule processing priority according to the virtual machine's permission level based on the data control policy.
[0046] In two aspects of this application, a multi-level cache scheduling system for solid-state drives (SSDs) is provided. The cache scheduling system is configured on the SSD controller and includes a determination module, an acquisition module, an output module, and an execution module. Through the interaction and cooperation between these modules, the system can output data control strategies to the SSD based on the service quality requirements of each virtual machine. This dynamically and differentiatedly optimizes the data storage and flow strategies in the multi-level cache for specific applications or virtual machines. It achieves the reasonable allocation of cache resources among virtual machines to adapt to the differentiated needs of each virtual machine, while ensuring that the performance of high-priority or I / O latency-sensitive virtual machines is not interfered with by the I / O activities of other virtual machines. This has the advantage of improving the overall performance of the system.
[0047] To better understand and implement this invention, the following detailed description is provided in conjunction with the accompanying drawings. Attached Figure Description
[0048] Figure 1 This is a flowchart illustrating a multi-level cache scheduling method for solid-state drives in this embodiment;
[0049] Figure 2 This is a schematic diagram of the specific process of step S1 in a solid-state drive multi-level cache scheduling method in this embodiment;
[0050] Figure 3 This is a schematic diagram of the specific process of step S2 in a solid-state drive multi-level cache scheduling method in this embodiment;
[0051] Figure 4 This is a flowchart illustrating the subsequent step S5 in a solid-state drive multi-level cache scheduling method in this embodiment.
[0052] Figure 5 This embodiment illustrates the specific flowchart of step S5 in a solid-state drive multi-level cache scheduling method.
[0053] Figure 6 This is a flowchart illustrating the intermediate processing steps between steps S53 and S54 in a solid-state drive multi-level cache scheduling method in this embodiment.
[0054] Figure 7 This is a schematic diagram of the specific process of step A2 in a solid-state drive multi-level cache scheduling method in this embodiment;
[0055] Figure 8 This is a system architecture diagram of a solid-state drive multi-level cache scheduling system in this embodiment. Detailed Implementation
[0056] To better illustrate the present invention, the invention will now be described in further detail with reference to the accompanying drawings.
[0057] It should be understood that the described embodiments are merely some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of the embodiments of this application.
[0058] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the embodiments of this application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0059] In the following description, when referring 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 this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims. In the description of this application, it should be understood that the terms "first," "second," "third," etc., are used only to distinguish similar objects and are not necessarily used to describe a specific order or sequence, nor should they be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0060] Furthermore, in the description of this application, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0061] In existing technologies, in an environment where multiple virtual machines share a solid-state drive, the I / O activities of different virtual machines will interfere with each other, especially at the level of cache resource contention and I / O request scheduling. This will lead to a decrease in the application performance of virtual machines with high priority requirements. 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 inability to guarantee service quality will directly affect the user experience and the reliability of business systems.
[0062] Therefore, the technical problem actually solved by this application is how to realize the cache allocation and scheduling between the solid-state drive and multiple virtual machines under the host machine, so as to make the cache resources reasonably allocated among the virtual machines to adapt to the different needs of each virtual machine.
[0063] The following is an example illustration. In this example, as... Figure 1 As shown, a multi-level cache scheduling method for solid-state drives (SSDs) is provided, applicable to scenarios where multiple virtual machines running different applications interact with the SSD on a host machine. The method includes the following steps:
[0064] Step S1: Identify the multiple virtual machines that need to be cached and scheduled;
[0065] 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; wherein, the identity information of the virtual machine includes one or more of the following: virtual machine identifier, virtual machine physical address, virtual machine communication address, virtual machine access identifier in the host machine, virtual machine name in the host machine, and virtual machine creation time in the host machine; the service quality requirement information of the virtual machine includes one of the following: latency-sensitive quality level, high-throughput quality level, balanced quality level, and best-effort quality level.
[0066] Step S3: Output a data control policy to the solid-state drive based on the service quality requirements of each virtual machine. The data control policy includes configuring write access permissions or write limits for at least one predetermined type of cache layer for each virtual machine's access data, and scheduling processing priorities for data access requests configured for each different virtual machine. Specifically, configuring the scheduling processing priorities for data access requests of each different virtual machine involves prioritizing the data access requests of each different virtual machine according to the service quality requirements and granting them priority. Specifically, configuring write access permissions or write limits for at least one predetermined type of cache layer for each virtual machine's access data involves controlling the behavior of each virtual machine using the internal cache of the solid-state drive and configuring the write permissions or write limits of the cache layer according to the service quality requirements.
[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 volume of the cache layer of a predetermined type and the scheduling processing priority according to the permission level of each virtual machine based on the data control policy.
[0068] Among them, the multiple virtual machines that need to be cached refer to the set of virtual machines that are currently running or about to generate I / O requests and require the solid-state drive to allocate cache resources and manage access priorities. This can be achieved by having the host machine monitor the running status of the virtual machine applications and send notifications.
[0069] Virtual machine identity information refers to attribute data used to uniquely identify a virtual machine. It can be implemented using one or more of the following: virtual machine identifier, virtual machine physical address, virtual machine communication address, virtual machine access identifier in the host machine, virtual machine name in the host machine, and virtual machine creation time in the host machine. It is mainly used by solid-state drive controllers to distinguish different virtual machines.
[0070] Quality of Service (QoS) requirements refer to the I / O performance requirements of a virtual machine or the applications running on it for a solid-state drive (SSD). Generally, when a business transaction is submitted by a virtual machine, the QoS standard / level of that transaction is identified. In a virtual machine, it can be marked with a latency-sensitive QoS level, a high-throughput QoS level, a balanced QoS level, a best-effort QoS level, etc., and is mainly used to guide the SSD controller to perform differentiated resource allocation and scheduling.
[0071] Data control policy refers to a set of rules formulated by the SSD controller based on the virtual machine's quality of service (QoS) requirements to guide the management of the SSD's internal cache and the processing of I / O requests. Within this policy, the write access permissions or write limits granted to each virtual machine for at least one predetermined type of cache layer restrict or allocate the behavior of different virtual machines using the SSD's internal cache (e.g., SLC cache, main storage cache, or DRAM cache), such as allowing writes, disallowing writes, or limiting the amount of data that can be written. This is primarily used to control the virtual machine's cache usage based on its needs and cache resource availability. The scheduling priority for data access requests configured for different virtual machines refers to 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] To illustrate, consider a host machine monitoring the I / O activity of multiple virtual machines (VMs) running on it. When the host detects that one or more VMs are generating I / O requests or that their application status indicates an impending surge in I / O, it notifies the SSD controller of the VM's identity information, thus identifying the VMs currently requiring I / O activity. Upon receiving the VM's identity information, the SSD controller can query internal storage and, through program interaction with the host, obtain the corresponding Quality of Service (QoS) requirements for that VM. This includes determining whether the VM falls under a latency-sensitive, high-throughput, balanced, or best-effort QoS level. Based on these QoS requirements, the controller calculates and generates a data control policy. For example, it might grant high write privileges and large write quotas to a latency-sensitive VM for the SLC cache and set its I / O request scheduling priority to the highest. Upon receiving this policy, the SSD's internal firmware or scheduling module identifies the I / O request from that VM, allocates SLC cache space 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, step S1 specifically includes:
[0074] Step S11: The host machine identifies the application running status of multiple virtual machines carrying different applications, wherein the application running status indicates that one or more program applications will execute data access requests.
[0075] Step S12: Determine the virtual machines that need to be cached based on the application running status of multiple virtual machines.
[0076] The application running status refers to the current activity mode of the program or task running in the virtual machine, such as compiling a large number of files, querying the database, transcoding the video, or backing up in the background. It can be achieved by the host machine monitoring the system calls in the virtual machine, analyzing process activities, identifying file access patterns, and evaluating CPU or memory usage.
[0077] Determining which virtual machines require cache scheduling based on the application running status of multiple virtual machines means confirming that the virtual machine has I / O activity that requires data interaction with the solid-state drive.
[0078] In addition, in this embodiment, the host machine can deploy a monitoring agent, which runs inside the host machine or 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, 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 the feature parameters of the data stream of the virtual machine within a set time window, and obtains the service quality requirement information matching the virtual machine based on the feature parameters analysis and mapping; when it is determined that the service quality requirement information of the virtual machine is provided, the solid-state drive controller obtains the service quality requirement information of the virtual machine.
[0082] Service Quality Request (SQRP) information retrieval refers to the solid-state drive (SSD) controller attempting to obtain SQRP information associated with the virtual machine's identity information from a preset storage location or through a specific communication interface via program interaction. This can be achieved by accessing the virtual machine metadata interface provided by the host machine or by reading specific files.
[0083] A time window is a continuous period of time used to observe and analyze virtual machine data flow behavior.
[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 activities performed by the virtual machine have service quality requirement information notes, the solid-state drive controller can directly obtain it.
[0086] A data control strategy is proposed to output data to the solid-state drive (SSD) based on the service quality requirements of each virtual machine (VM). This data control strategy includes configuring write access permissions or write volumes for the cache layer of a predetermined data access type for each VM, as well as scheduling processing priorities for data access requests from different VMs. After receiving the data control strategy, the SSD allocates write access permission levels or write volumes and scheduling processing priorities for the predetermined type of cache layer according to the VM's permission level. For example, for latency-sensitive VMs, a higher scheduling priority and a larger SLC cache write permission can be allocated; for high-throughput VMs, a higher write volume and an appropriate scheduling priority can be allocated. This allows for initial allocation of cache resources and I / O scheduling based on different service quality requirements. However, cache scheduling based solely on the initially set service quality requirements may not adapt to changes in performance requirements during VM operation, leading to unreasonable resource allocation or inaccurate priority scheduling, thereby affecting VM performance.
[0087] Therefore, in this embodiment, it is proposed that, as Figure 4 As shown, step S5 is configured after step S4, and step S5 includes:
[0088] The solid-state drive controller monitors the performance of each virtual machine and adjusts the operating parameters used for prioritizing data access requests and / or the operating parameters used for controlling write access permissions or write volume when the data flow output by the virtual machine passes through the cache layer, based on the comparison between the virtual machine's performance and the corresponding quality of service requirements. Monitoring the performance of each virtual machine refers to obtaining data that reflects the efficiency and effectiveness of virtual machine I / O activities, such as I / O latency, I / O throughput, IOPS, and other metrics.
[0089] To illustrate, in a specific implementation scenario, a solid-state drive (SSD) controller can periodically (e.g., once per second) collect average I / O latency and throughput data for each virtual machine (VM). Each VM is pre-configured with 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 of more than 200 MB / s. The controller detects that VM A's average I / O latency consistently exceeds 500 microseconds for a certain period, while VM B's throughput is normal. The controller compares VM A's actual latency (e.g., 600 microseconds) with its QoS requirements (500 microseconds) and finds that it does not meet the requirements. Based on this comparison, the controller determines that VM A needs adjustment. After adjustment, the controller continues to monitor VM A's performance for a period. If it still does not meet the requirements, it may stop further adjustments or perform fine-tuning. The controller may also try further parameter adjustments or consider adjusting the parameters of other VMs to free up shared resources.
[0090] Furthermore, step S5 will be described in detail, such as... Figure 5 As shown, step S5 specifically includes:
[0091] Step S51: Monitor the performance of each virtual machine and obtain the performance data of each virtual machine;
[0092] Step S52: Obtain the comparison results 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: Based on the comparison results, determine whether the running parameters of a target virtual machine need to be adjusted. If so, the solid-state drive controller outputs the planned adjustment parameter values for the target virtual machine.
[0094] Step S54: Adjust the operating parameters used for the I / O request priority scheduling process and / or the operating parameters used for the cache layer write access permission or write volume control according to the planned parameter values.
[0095] To better understand the above steps, some of the technical features involved are explained below:
[0096] Among them, performance data refers to quantitative indicators that reflect the I / O performance of virtual machines, which can be represented by metrics such as IOPS (input / output operations per second), throughput (data transfer per second), average access latency, maximum access latency, and queue depth.
[0097] The comparison result refers to the difference or relationship between the actual performance data and the target operating parameters, which can be expressed as the difference or ratio between the actual and target values, or as a Boolean judgment result indicating whether the target conditions are met. The target virtual machine refers to the specific virtual machine that requires performance evaluation and whose operating parameters may be adjusted during the current performance monitoring and adjustment. The planned adjustment parameter values refer to the suggested values initially determined based on the performance comparison results for adjusting the I / O scheduling and cache control parameters of the target virtual machine on the solid-state drive. These can include suggested increases or decreases in priority values, suggested adjustments to cache write quotas, and suggested modifications. The modified cache write permission level is used to represent the parameters; the I / O request priority scheduling parameters are the parameters that affect the processing order and priority of I / O requests issued by the virtual machine in the internal scheduling queue of the solid-state drive. These parameters can be controlled by parameters such as priority value, scheduling weight, and service category identifier; the cache layer write access permission or write volume control parameters are the parameters that control the permissions, rate, or total amount of data written by the virtual machine to the internal cache layer of the solid-state drive (such as SLC cache). These parameters can be controlled by parameters such as the allowed cache type, maximum write rate limit, maximum write data volume quota, and write permission level.
[0098] The following example illustrates step S5:
[0099] Suppose a solid-state drive (SSD) is connected to a host machine, which is running virtual machines A and B. Virtual machine A is configured for a latency-sensitive application, with its QoS requirements indicating a target operating parameter of average I / O latency of less than 2 milliseconds; virtual machine B is configured for a high-throughput application, with its QoS requirements indicating a target operating parameter of sequential write throughput greater than 400 MB / s.
[0100] During operation, the SSD controller continuously monitors the performance of virtual machines A and B. At a certain point in time, the average I / O latency of virtual machine A was 5 milliseconds, and the sequential write throughput of virtual machine B was 300MB / s, thus obtaining the corresponding performance data.
[0101] These performance data were compared with the target operating parameters indicated by the corresponding Quality of Service (QoS) requirements. The comparison results showed that the actual latency of virtual machine A (5 milliseconds) was higher than its target (less than 2 milliseconds), while the actual throughput of virtual machine B (300 MB / s) was lower than its target (greater than 400 MB / s).
[0102] Based on the comparison results, the performance of both virtual machines A and B failed to meet their service quality requirements, therefore their operating parameters need to be adjusted. The SSD controller, according to a preset adjustment algorithm, outputs planned adjustment parameter values for virtual machine A, such as suggesting increasing its I / O request priority by one level; simultaneously, it outputs planned adjustment parameter values for virtual machine B, such as suggesting increasing its cache layer sequential write quota by 50MB / s.
[0103] Based on these plans, the solid-state drive controller adjusts the parameter values, adjusting the priority of virtual machine A in the I / O request scheduling queue so that its requests can be processed faster; at the same time, it adjusts the write volume control parameters when virtual machine B performs sequential writes to the SLC cache, allowing it to write to the cache at a higher rate or with a larger total volume.
[0104] Further explanation: In this embodiment, as... Figure 6 As shown, a further step is included between step S53 and step S54:
[0105] Step A1: Obtain the service quality requirements information of each virtual machine other than the target 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 other virtual machines, perform quantitative calculations to obtain the potential impact value of the planned adjustment parameter value on the service quality requirement information of other virtual machines except the target virtual machine, and compare the potential impact value with the allowable impact threshold set for other virtual machines except the target virtual machine to obtain the impact comparison result.
[0107] Step A3: Based on the impact comparison results, determine whether to adjust the plan adjustment parameter value. If so, limit the magnitude or modify the content of the plan adjustment parameter value to obtain the modified adjustment parameter value, so that the potential impact 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] Among them, the planned adjustment parameter values refer to the suggested values of the running parameters of the target virtual machine application, which are initially determined based on the comparison results of the target virtual machine's performance and service quality requirements. These parameters can affect its I / O priority.
[0109] The current quality of service requirements information for other virtual machines refers to the actual performance data achieved by virtual machines other than the target virtual machine at the current moment.
[0110] The potential impact value refers to a quantitatively calculated value that reflects the degree of deviation or negative impact that may occur on the quality requirements of other virtual machine services if the parameter values are adjusted as planned.
[0111] The permissible impact threshold refers to the maximum acceptable deviation or negative impact level for the service quality of each non-target virtual machine, preset for that purpose. The impact comparison result is a judgment derived by comparing the potential impact value with the corresponding permissible impact threshold, indicating whether the planned adjustment will cause the service quality of other virtual machines to exceed the acceptable range.
[0112] The modified adjustment parameter value refers to the final value used to adjust the target virtual machine's running parameters after the range has been limited or the content has been modified.
[0113] In a specific example scenario, a solid-state drive (SSD) controller manages multiple virtual machines running on a host machine, including a database virtual machine with high latency requirements and a virtual machine performing background data backup. The controller detects that the write throughput of the background data backup virtual machine is not meeting its set target, so it determines that the cache write volume of that virtual machine needs to be increased, and outputs a planned adjustment parameter value, such as doubling the SLC cache write quota of that virtual machine.
[0114] At this point, the system first obtains the service quality requirements of the database virtual machine, such as requiring an average I / O latency of no more than 50 microseconds. Then, based on the planned adjustment parameters of the background data backup virtual machine (doubling the write quota) and the current actual I / O latency of the database virtual machine (e.g., currently 40 microseconds), the system uses a preset quantitative calculation model to estimate that if the adjustments are made according to the plan, the I / O latency of the database virtual machine may increase to 60 microseconds.
[0115] Meanwhile, the database virtual machine's permissible impact threshold is set to increase latency by no more than 10 microseconds (i.e., total latency not exceeding 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 values need to be modified. After limiting the magnitude or modifying the content, the modified adjustment parameter values are obtained. For example, the modified adjustment parameter value is to increase the write quota by 50%. The system performs another quantitative calculation and estimates that under this adjustment, the latency of the database virtual machine may increase to 45 microseconds. This estimated impact (5 microseconds) does not exceed the allowable impact threshold (10 microseconds).
[0117] At this point, the system determines to use this modified adjustment parameter value and adjusts the cache write control parameter of the background data backup virtual machine accordingly.
[0118] Further explanation: In this embodiment, as... Figure 7 As shown, step A2 specifically includes:
[0119] Step A21: Obtain the planned adjustment parameter value of the target virtual machine and the service quality requirement information of each virtual machine other than the target virtual machine, as well as the current status data of at least one key shared resource inside the solid-state drive. The key shared resource includes one or more of the following: available space of SLC cache, number of concurrent write channels of NAND flash memory, and depth of controller processing queue.
[0120] Step A22: Based on the current status data of the at least one key shared resource, determine 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, then the first prediction model is adopted; if it is determined that the at least one key shared resource is not in a resource bottleneck state, then the second prediction model is adopted.
[0121] The first prediction model indicates that, based on the target virtual machine's planned adjustment parameter value, the service quality requirement information of each virtual machine other than the target virtual machine, and the current status data of the at least one key shared resource, the potential impact of the target virtual machine's planned adjustment parameter value on the service quality requirement information of each virtual machine other than the target virtual machine is calculated and predicted, taking into account the nonlinear competition effect of the at least one key shared resource.
[0122] The second prediction 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 other than the target virtual machine, 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 is calculated and predicted.
[0123] Among them, critical shared resources refer to the hardware or software resources that multiple virtual machines within a solid-state drive compete for. Resource bottleneck status refers to the utilization rate of critical shared resources reaching or approaching their capacity limit.
[0124] The first prediction model is a computational model used to quantitatively assess the potential impact of adjusting the parameters of a target virtual machine on the service quality of other virtual machines. This model is used under resource bottleneck conditions and can capture and reflect the nonlinear effects of competition for critical shared resources.
[0125] The second prediction model refers to another computational model used to quantify the potential impact. This model is used when resources are not in a bottleneck state, at which point 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 an assessment of the status of critical shared resources within the solid-state drive and selecting different impact prediction models based on whether the resources are in a bottleneck state, the potential impact of the target virtual machine's operating parameters on the service quality of other virtual machines can be adjusted more accurately.
[0127] In one aspect of this embodiment, a multi-level cache scheduling method for solid-state drives is provided. By outputting data control strategies to the solid-state drive based on the service quality requirements of each virtual machine, the method can dynamically and differentiately optimize the data storage and flow strategies in the multi-level cache for specific applications or virtual machines. This achieves the reasonable allocation of cache resources among virtual machines to adapt to the differentiated needs of each virtual machine, while ensuring that the performance of high-priority or I / O latency-sensitive virtual machines is not interfered with by the I / O activities of other virtual machines. This has the advantage of improving the overall system performance.
[0128] Two aspects of this embodiment, such as Figure 8 As shown, a multi-level cache scheduling system 100 for solid-state drives (SSDs) is provided. This cache scheduling system is configured on the SSD controller and is applied in scenarios where multiple virtual machines running different applications on a host machine interact with the SSD. The system includes:
[0129] The determining module 101 is used to determine multiple virtual machines that need to be cached and scheduled.
[0130] The acquisition module 102 is used to acquire the service quality requirement information of each virtual machine from the solid-state drive controller based on the identity information of each virtual machine.
[0131] Output module 103 is used to output data control policy to solid-state drive according to the service quality requirement information of each virtual machine. The data control policy includes write access permission or write amount of at least one predetermined type of cache layer configured for each virtual machine and scheduling processing priority of data access requests configured for each different virtual machine.
[0132] The execution module 104 is used to allocate a predetermined type of cache layer write access permission level or write volume and scheduling processing priority according to the virtual machine's permission level after receiving the data control policy issued by the controller of the solid-state drive.
[0133] In a second aspect of this embodiment, a solid-state drive (SSD) multi-level cache scheduling system is provided. The cache scheduling system is configured on the SSD controller and includes a determination module, an acquisition module, an output module, and an execution module. Through the interaction and cooperation between these modules, data control strategies can be output to the SSD based on the service quality requirements of each virtual machine. This dynamically and differentiatedly optimizes the data storage and flow strategies in the multi-level cache for specific applications or virtual machines. It achieves the reasonable allocation of cache resources among virtual machines to adapt to the differentiated needs of each virtual machine, while ensuring that the performance of high-priority or I / O latency-sensitive virtual machines is not interfered with by the I / O activities of other virtual machines. This has the advantage of improving the overall system performance.
[0134] Based on the disclosure and teachings of the foregoing specification, those skilled in the art can make changes and modifications to the above embodiments. Therefore, the present invention is not limited to the specific embodiments disclosed and described above, and some modifications and changes to the present invention should also fall within the protection scope of the claims of the present invention. Furthermore, although some specific terms are used in this specification, these terms are only for convenience of explanation and do not constitute any limitation on the present invention.
Claims
1. A multi-level cache scheduling method for solid-state drives (SSDs), applied in a scenario where multiple virtual machines running different applications interact with the SSD on a host machine, characterized in that... Includes the following steps: Step S1: Identify the multiple virtual machines that need to be cached and scheduled; 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: Output data control policies to the solid-state drive according to the service quality requirements information of each virtual machine. The data control policies include configuring write access permissions or write amounts of at least one predetermined type of cache layer for each virtual machine's access data, and configuring scheduling processing priorities for data access requests of 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 volume of the cache layer of a predetermined type and the scheduling processing priority according to the permission level of each virtual machine according to the data control policy. The process after step S4 also includes: Step S5: The solid-state drive controller monitors the performance of each virtual machine and adjusts the running parameters used for data access request priority scheduling and / or the running parameters used for write access permissions or write volume control when the data flow output by the virtual machine passes through the cache layer, based on the comparison results between the performance of the virtual machine and the service quality requirement information corresponding to the virtual machine. Step S5 specifically includes: Step S51: Monitor the performance of each virtual machine and obtain the performance data of each virtual machine; Step S52: Obtain the comparison results 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: Based on the comparison results, determine whether it is necessary to adjust the running parameters of a target virtual machine. If so, the solid-state drive controller outputs the planned adjustment parameter values for the target virtual machine. Step S54: Adjust the running parameters used for the priority scheduling of the data access request and / or the running parameters used for the write access permission or write volume control of the cache layer according to the planned parameter values; Between step S53 and step S54, the following step is also included: Step A1: Obtain the service quality requirements information of each virtual machine other than the target virtual machine; Step A2: Based on the planned adjustment parameter value of the target virtual machine and the current service quality requirement information of other virtual machines, perform quantitative calculations to obtain the potential impact value of the planned adjustment parameter value on the service quality requirement information of other virtual machines except the target virtual machine, and compare the potential impact value with the allowable impact threshold set for other virtual machines except the target virtual machine to obtain the impact comparison result. Step A3: Based on the impact comparison results, determine whether to adjust the plan adjustment parameter value. If so, limit the magnitude or modify the content of the plan adjustment parameter value to obtain the modified adjustment parameter value, so that the potential impact of the modified adjustment parameter value on each virtual machine other than the target virtual machine does not exceed its corresponding allowable impact threshold.
2. The solid-state drive multi-level cache scheduling method according to claim 1, characterized in that, Step S1 specifically includes: Step S11: The host machine identifies the application running status of multiple virtual machines carrying different applications, wherein the application running status indicates that one or more program applications will execute data access requests. Step S12: Determine the virtual machines that need to be cached based on the application running status of multiple virtual machines.
3. The solid-state drive multi-level cache scheduling method according to claim 1, characterized in that, In step S2: the identity information of the virtual machine includes one or more of the following: virtual machine identifier, virtual machine physical address, virtual machine communication address, virtual machine access identifier in the host machine, virtual machine name in the host machine, and virtual machine creation time in the host machine; The service quality requirements of the virtual machine include one of the following: latency-sensitive quality level, high-throughput quality level, and best-effort quality level.
4. The solid-state drive multi-level cache scheduling method according to claim 1, characterized in that, 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 the feature parameters of the data stream of the virtual machine within a set time window, and obtains the service quality requirement information matching the virtual machine based on the feature parameters analysis and mapping; when it is determined that the service quality requirement information of the virtual machine is provided, the solid-state drive controller obtains the service quality requirement information of the virtual machine.
5. The solid-state drive multi-level cache scheduling method according to claim 1, in step S3: The configuration assigns priority to the data access requests of different virtual machines by prioritizing the data access requests of different virtual machines based on service quality requirements and granting them priority scheduling permissions. The configuration of granting each virtual machine at least one type of cache layer write access permission or write volume specifically involves controlling the behavior of each virtual machine using the internal cache of the solid-state drive, and configuring the cache layer write permission or write volume according to the service quality requirement information.
6. The solid-state drive multi-level cache scheduling method according to claim 1, characterized in that, Step A2 specifically includes: Step A21: Obtain the planned adjustment parameter value of the target virtual machine and the service quality requirement information of each virtual machine other than the target virtual machine, as well as the current status data of at least one key shared resource inside the solid-state drive. The key shared resource includes one or more of the following: available space of SLC cache, number of concurrent write channels of NAND flash memory, and depth of controller processing queue. Step A22: Based on the current status data of the at least one key shared resource, determine 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, then the first prediction model is adopted; if it is determined that the at least one key shared resource is not in a resource bottleneck state, then the second prediction model is adopted. The first prediction model indicates that, based on the target virtual machine's planned adjustment parameter value, the service quality requirement information of each virtual machine other than the target virtual machine, and the current status data of the at least one key shared resource, the potential impact of the target virtual machine's planned adjustment parameter value 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 predicted. The second prediction 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 other than the target virtual machine, 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 is calculated and predicted.
7. A solid-state drive (SSD) multi-level cache scheduling system, used to execute the method described in any one of claims 1 to 6, wherein the cache scheduling system is configured on the SSD controller and applied in a scenario where multiple virtual machines carrying different applications interact with the SSD while running on a host machine, characterized in that... include: A determination module, which is used to determine multiple virtual machines that need to be cached and scheduled; The acquisition module is used to acquire the service quality requirement information of each virtual machine from the solid-state drive controller based on the identity information of each virtual machine. The output module is used to output a data control policy to the solid-state drive according to the service quality requirements information of each virtual machine. The data control policy includes configuring write access permissions or write amounts of at least one predetermined type of cache layer for each virtual machine to access data, and configuring the scheduling processing priority for data access requests of different virtual machines. An execution module is used to, after receiving a data control policy from the controller of the solid-state drive (SSD), allocate a predefined type of cache layer write access permission level or write volume and schedule processing priority according to the virtual machine's permission level based on the data control policy.
Citation Information
Patent Citations
Cloud application-guided solid state disk cache management system and method
CN106775942A
Virtualization cache implementation method and physical machine
CN110597451A
