A method and apparatus for quality of service control
By dividing the SSD into primary and secondary disks and limiting the speed according to the VM's QoS parameters, the problem of unstable IO performance in distributed storage systems is solved, and more stable IO performance is achieved.
Patent Information
- Application Number
- CN202010303052.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-17
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2040-04-17
AI Technical Summary
In distributed storage systems, when multiple storage clients share SSD acceleration, it leads to unstable I/O performance. This is especially true when there are few SSDs and many storage clients, where contention is severe, causing performance instability.
The SSD of each host node is divided into a first partition and a second partition. The first partition serves as the primary disk of the host node, and the second partition serves as the backup disk for other host nodes. The QoS parameters of each partition are determined based on the preset VM service quality QoS parameters, and the partitions are rate-limited using cgroup technology.
This avoids system latency jitter and business instability caused by VMs competing for I/O resources, thus improving the stability of I/O performance.
Smart Images

Figure CN111694635B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data storage, in particular to a service quality control method and device. BACKGROUND
[0002] With the further development of the Internet era, the effective data to be stored in the computer also increases exponentially. If there is no reasonable and effective way to store and manage data, the storage and transmission will become extremely slow as the data cardinality grows, and the storage and transmission will become a burden. At present, the data processing is usually performed by using the SSD acceleration storage mode. The SSD acceleration storage usually has two modes, the SSD write back strategy and the SSD write through strategy. Among them, the SSD write back strategy can accelerate reading and writing, and the SSD write through strategy can only accelerate reading.
[0003] In a distributed storage system, in order to provide the performance of a virtual disk, the SSD writeback acceleration strategy is usually used to accelerate reading and writing. Since the cache strategy is SSD write back, the Vm considers that the data written into the SSD cache is written successfully. There is a time difference between the cache data being written to the back-end storage. If a single machine failure occurs within the time difference, such as SSD damage or host power failure, the cache data of the SSD is not written to the disk, which causes the data to be incomplete when the Vm 1 is migrated from the host 1 to the host 2. At present, in order to ensure reliability and prevent data from being incomplete due to SSD damage, the network raid is configured to make the DRBD synchronous replication volume copy the SSD cache.
[0004] However, using SSD as cache acceleration, even if the local SSD disk has low latency, because the DRBD volume uses synchronous replication, the maximum latency still depends on max (local SSD partition latency, network latency + remote SSD partition latency). Therefore, when multiple storage clients share a piece of SSD for cache acceleration, or the number of SSDs is small and the number of storage clients is large, the io performance is unstable due to the problem of contention. SUMMARY
[0005] The embodiments of the present application provide a service quality control method and device to solve the problem of unstable io performance caused by multiple storage clients using SSD acceleration in the prior art.
[0006] The specific technical solutions provided by the embodiments of the present application are as follows:
[0007] In a first aspect, the application provides a quality of service control method applied to a distributed storage system, wherein the distributed storage system uses a SSD solid state disk cache mode for read-write acceleration, and the method comprises:
[0008] dividing each SSD corresponding to a host node into a first partition and a second partition, wherein the first partition of each SSD is used as a main disk of the corresponding host node, and the second partition of each SSD is used as a backup disk on other host nodes;
[0009] determining the Qos parameters of the first partition and the second partition of each SSD based on preset Qos parameters of each VM deployed on each host node;
[0010] limiting the speed of the first partition and the second partition of each SSD based on the determined Qos parameters of the first partition and the second partition of each SSD.
[0011] Optionally, the step of dividing each SSD corresponding to a host node into a first partition and a second partition comprises:
[0012] performing the following operations for each SSD corresponding to a host node:
[0013] dividing the SSD corresponding to a host node into a first partition and a second partition;
[0014] determining the target number of VMs deployed on a first host node using the first partition of the SSD as a main disk, and dividing the first partition of the SSD into a first number of logical partitions;
[0015] determining a second number of VMs deployed on a second host node using the second partition of the SSD as a backup disk, and dividing the second partition of the SSD into a second number of logical partitions, wherein one VM corresponds to one logical partition.
[0016] Optionally, each first / second partition has a test logical partition, and the test logical partition of the first partition of a host node as a main disk and the test logical partition of the second partition of the host node as a backup disk form a distributed replicated block device DRBD.
[0017] The step of determining the Qos parameters of the first partition and the second partition of each SSD based on preset Qos parameters of each VM deployed on each host node comprises:
[0018] For each first partition, a sum of Qos parameters of each VM deployed on a host node taking the first partition as a primary disk is determined, and a difference between the sum of Qos parameters and a first DRBD latency of the first partition is taken as a Qos parameter of the first partition, wherein the first DRBD latency is a latency of a first DRBD composed of test logical partitions of the first partition;
[0019] For each second partition, a sum of Qos parameters of each VM deployed on a host node taking the second partition as a backup disk is determined, and a sum of second DRBD latencies of the second partition is taken as a Qos parameter of the second partition, wherein the second DRBD latency is a latency of a second DRBD composed of test logical partitions of the second partition.
[0020] Optionally, the step of limiting the first partition and the second partition of each SSD based on the determined Qos parameters of the first partition and the second partition of each SSD comprises:
[0021] The first partition and the second partition of each SSD are limited by using cgroup technology based on the determined Qos parameters of the first partition and the second partition of each SSD.
[0022] Optionally, the method further comprises:
[0023] Based on a preset detection rule, a bandwidth usage value of the first partition of any SSD is detected;
[0024] If the bandwidth usage value is less than a set threshold, the Qos parameter of the first partition is reduced, so that each VM deployed on a host node taking the second partition of the any SSD as a backup disk preferentially accesses the second partition;
[0025] If the bandwidth usage value is greater than or equal to the set threshold, the Qos parameter of the first partition is increased, so that each VM deployed on a host node taking the first partition of the any SSD as a primary disk preferentially accesses the first partition.
[0026] In a second aspect, the application provides a quality of service control device applied to a distributed storage system, wherein the distributed storage system uses a SSD solid state disk cache mode for read-write acceleration, and the device comprises:
[0027] A partition unit is configured to divide each SSD corresponding to a host node into a first partition and a second partition, wherein the first partition of each SSD is taken as a primary disk of the host node corresponding thereto, and the second partition of each SSD is taken as a backup disk on other host nodes;
[0028] The determining unit is configured to determine the Qos parameters of the first partition and the second partition of each SSD respectively based on preset Qos parameters of each VM deployed on each host node;
[0029] The speed limiting unit is configured to limit the speed of the first partition and the second partition of each SSD based on the determined Qos parameters of the first partition and the second partition of each SSD.
[0030] Optionally, when the SSD corresponding to each host node is divided into the first partition and the second partition, the dividing unit is specifically configured to:
[0031] The following operations are performed respectively for the SSD corresponding to each host node:
[0032] The SSD corresponding to one host node is divided into the first partition and the second partition;
[0033] The first partition of the SSD is determined as the target number of VMs deployed on the first host node of the main disk, and the first partition of the SSD is divided into the first number of logical partitions;
[0034] The second partition of the SSD is determined as the second number of VMs deployed on the second host node of the backup disk, and the second partition of the SSD is divided into the second number of logical partitions, wherein one VM corresponds to one logical partition.
[0035] Optionally, each first / second partition is divided into a test logical partition, and the test logical partition of the first partition of the main disk of one host node and the test logical partition of the second partition of the backup disk of the one host node form a distributed replication block device (DRBD);
[0036] When the Qos parameters of the first partition and the second partition of each SSD are determined respectively based on preset Qos parameters of each VM deployed on each host node, the determining unit is specifically configured to:
[0037] For each first partition, the sum of the Qos parameters of each VM deployed on the host node of the main disk is determined as the Qos parameter of the first partition, and the difference between the sum of the Qos parameters and the first DRBD latency is determined as the Qos parameter of the first partition, wherein the first DRBD latency is the latency of the first DRBD formed by the test logical partition of the first partition;
[0038] For each second partition, the sum of the Qos parameters of each VM deployed on the host node of the backup disk is determined as the Qos parameter of the second partition, and the sum of the Qos parameters and the second DRBD latency is determined as the Qos parameter of the second partition, wherein the second DRBD latency is the latency of the second DRBD formed by the test logical partition of the second partition.
[0039] Optionally, when the first partition and the second partition of each SSD are rate-limited based on the determined Qos parameters of the first partition and the second partition of each SSD, the rate-limiting unit is specifically configured to:
[0040] Based on the determined Qos parameters of the first partition and the second partition of each SSD, the first partition and the second partition of each SSD are rate-limited using cgroup technology.
[0041] Optionally, the device further comprises:
[0042] The detection unit is configured to detect a bandwidth usage value of the first partition of any SSD based on a preset detection rule.
[0043] The adjustment unit is configured to, if the bandwidth usage value is less than a set threshold, reduce the Qos parameter of the first partition, so that each VM deployed on the host node with the second partition of the any SSD as the backup disk preferentially accesses the second partition.
[0044] If the bandwidth usage value is greater than or equal to the set threshold, the adjustment unit is configured to increase the Qos parameter of the first partition, so that each VM deployed on the host node with the first partition of the any SSD as the main disk preferentially accesses the first partition.
[0045] In a third aspect, the present application provides a service quality control device, which comprises:
[0046] A memory configured to store program instructions.
[0047] A processor configured to invoke the program instructions stored in the memory, and execute any method of the first aspect according to the obtained program.
[0048] In a fourth aspect, the present application provides a computer storage medium, which stores computer executable instructions. The computer executable instructions are configured to make the computer execute any method of the first aspect.
[0049] The present application has the following advantages:
[0050] To sum up, the service quality control method provided by the application is applied to a distributed storage system, the distributed storage system adopts an SSD solid state disk cache mode for read-write acceleration, and the method comprises the following steps: dividing each SSD corresponding to a host node into a first partition and a second partition, wherein the first partition of each SSD is used as a main disk of the corresponding host node, and the second partition of each SSD is used as a backup disk on other host nodes; based on preset service quality Qos parameters of each VM deployed on each host node, the Qos parameters of the first partition and the second partition of each SSD are determined respectively; and the first partition and the second partition of each SSD are speed-limited based on the determined Qos parameters of the first partition and the second partition of each SSD.
[0051] By adopting the service quality control method provided by the application, each SSD is divided into a partition used as a main disk to provide services for the VMs deployed on the local host node and a partition used as a backup disk to provide services for the VMs deployed on the remote host node, Qos parameters of each partition are counted according to the Qos parameters preconfigured by each VM according to actual business requirements, and each partition is speed-limited according to the Qos parameters of each partition, thereby avoiding the problem of system delay jitter and unstable business caused by the contention of each VM for io resources. BRIEF DESCRIPTION OF DRAWINGS
[0052] Figure 1 A distributed storage system structure schematic diagram provided by an embodiment of the application;
[0053] Figure 2 A service quality control method flow schematic diagram provided by an embodiment of the application;
[0054] Figure 3 A logical partition division schematic diagram of an SSD provided by an embodiment of the application;
[0055] Figure 4 A service quality control device structure schematic diagram provided by an embodiment of the application;
[0056] Figure 5 Another service quality control device structure schematic diagram provided by an embodiment of the application;
[0057] Figure 6 Still another service quality control device structure schematic diagram provided by an embodiment of the application. DETAILED DESCRIPTION
[0058] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, and not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative effort belong to the scope of the present application.
[0059] First, the term "and" in the embodiments of the present application is only used to describe the association relationship of the associated objects, which means that there can be three relationships, for example, A and B can mean that A exists alone, A and B exist together, and B exists alone. In addition, the character " / " in this paper generally represents that the front and rear associated objects are in an "or" relationship.
[0060] When the present application refers to "first", "second", "third" or "fourth" ordinal numbers, unless it really expresses the order according to the context, it should be understood as only for distinguishing.
[0061] The technical solutions of the present application will be described in detail below through specific embodiments. Of course, the present application is not limited to the following embodiments.
[0062] For example, referring to Figure 1 As shown in the figure, the present application provides a structural diagram of a distributed storage system, which can include storage clients (such as VM 1 and VM 2 deployed on host node 1, and VM 3 and VM 4 deployed on host node 2), solid state disks (SSDs) corresponding to each host node respectively, and a backend storage including a plurality of storage servers. The storage client uses the SSD for cache acceleration, specifically, adopts a write back high-performance cache strategy, and realizes high reliability of the SSD cache by using DRBD replication technology.
[0063] In combination with Figure 1 As shown in the figure, since a plurality of VMs (such as VM 1 and VM 2 deployed on host node 1, and VM 3 and VM 4 deployed on host node 2) can be deployed on each host node, and further, due to the existence of DRBD replication technology, one SSD needs to provide services for multiple VMs (such as SSD 1 needs to cache the read and write of VM 1 and VM 2 as a main disk, and cache the read and write of VM 3 and VM 4 as a backup disk; SSD 2 needs to cache the read and write of VM 3 and VM 4 as a main disk, and cache the read and write of VM 1 and VM 2 as a backup disk).
[0064] The method embodiments of the present application will be described in detail below through specific embodiments. For example, referring toFigure 2 As shown, the service quality control method provided in the application is applied to a distributed storage system, the distributed storage system adopts a SSD solid state disk cache mode for read and write acceleration, and a detailed process of the service quality control method is as follows.
[0065] Step 200: Dividing each SSD corresponding to a host node into a first partition and a second partition, wherein the first partition of each SSD is used as a main disk of the corresponding host node, and the second partition of each SSD is used as a standby disk on another host node.
[0066] In the embodiment of the application, when each SSD corresponding to a host node is divided into a first partition and a second partition, a preferred implementation manner is that the following operations are respectively performed on each SSD corresponding to a host node:
[0067] Dividing the SSD corresponding to a host node into a first partition and a second partition;
[0068] Determining a target number of VMs deployed on a first host node and using the first partition of the SSD as the main disk, and dividing the first partition of the SSD into the first number of logical partitions;
[0069] Determining a second number of VMs deployed on a second host node and using the second partition of the SSD as the standby disk, and dividing the second partition of the SSD into the second number of logical partitions, wherein one VM corresponds to one logical partition.
[0070] For example, referring to Figure 3 As shown, the embodiment of the application provides a schematic diagram of dividing a SSD logical partition. It is assumed that the distributed storage system includes a host node 1 and a host node 2, the host node 1 is deployed with a VM 1 and a VM 2, the host node 2 is deployed with a VM 3 and a VM 4, the host node 1 corresponds to a SSD 1, the host node 2 corresponds to a SSD 2, it is assumed that the performance of the SSD 1 and the SSD 2 is the same, so the SSD 1 and the SSD 2 can be divided into a first partition and a second partition, further, for the SSD 1, the first partition of the SSD 1 is divided into a logical partition 11 and a logical partition 12, the second partition of the SSD 1 is divided into a logical partition 13 and a logical partition 14, for the SSD 2, the first partition of the SSD 2 is divided into a logical partition 21 and a logical partition 22, and the second partition of the SSD 2 is divided into a logical partition 23 and a logical partition 24.
[0071] In the embodiment of the present application, the first partition of the SSD 1 and the second partition of the SSD 2 constitute a DRBD, the first partition of the SSD 2 and the second partition of the SSD 1 constitute a DRBD, that is, the logical partition 11 of the SSD 1 and the logical partition 23 of the SSD 2 constitute a DRBD, the logical partition 12 of the SSD 1 and the logical partition 24 of the SSD 2 constitute a DRBD, the logical partition 21 of the SSD 2 and the logical partition 13 of the SSD 1 constitute a DRBD, and the logical partition 22 of the SSD 2 and the logical partition 14 of the SSD 1 constitute a DRBD.
[0072] In the embodiment of the present application, the logical partition 11 of the SSD 1 is configured as the main disk of the VM 1 and is used to cache the read and write of the VM 1, the logical partition 12 of the SSD 1 is configured as the main disk of the VM 2 and is used to cache the read and write of the VM 2, the logical partition 13 of the SSD 1 is configured as the backup disk of the VM 3 and is used to backup cache the read and write of the VM 3, and the logical partition 14 of the SSD 1 is configured as the backup disk of the VM 4 and is used to cache backup the read and write of the VM 4. Similarly, the logical partition 21 of the SSD 2 is configured as the main disk of the VM 3 and is used to cache the read and write of the VM 3, the logical partition 22 of the SSD 2 is configured as the main disk of the VM 4 and is used to cache the read and write of the VM 4, the logical partition 23 of the SSD 2 is configured as the backup disk of the VM 1 and is used to backup cache the read and write of the VM 1, and the logical partition 24 of the SSD 2 is configured as the backup disk of the VM 2 and is used to cache backup the read and write of the VM 2.
[0073] Of course, if there are three VMs deployed on the host node corresponding to the SSD 1, the first partition of the SSD 1 can be divided into three logical partitions, and the second partition of the corresponding SSD 2 can also be divided into three logical partitions, so as to allocate a corresponding main logical partition and backup logical partition for each VM.
[0074] Further, in the embodiment of the present application, each first partition / second partition is divided into a test logical partition, and the test logical partition of the first partition of the main disk of a host node and the test logical partition of the second partition of the backup disk of the host node constitute a distributed replication block device DRBD.
[0075] That is, when the logical partition is divided, the number of the logical partitions of the first partition and the second partition of each SSD is the number of the VMs deployed on the corresponding host plus one, that is, a test logical partition not used to cache the read and write of the VM is created.
[0076] For example, in combination with Figure 3 and Figure 4As shown, the first partition of the SSD 1 is divided into the test logical partition 1 in addition to the logical partition 11 and the logical partition 12, the second partition of the SSD 1 is divided into the test logical partition 2 in addition to the logical partition 13 and the logical partition 14; similarly, the first partition of the SSD 2 is divided into the test logical partition 1 in addition to the logical partition 21 and the logical partition 22, the second partition of the SSD 2 is divided into the test logical partition 2 in addition to the logical partition 23 and the logical partition 24. And the test logical partition 1 of the first partition of the SSD 1 and the test logical partition 2 of the second partition of the SSD 2 form a DRBD, the test logical partition 2 of the second partition of the SSD 1 and the test logical partition 1 of the first partition of the SSD 2 form a DRBD.
[0077] In the embodiments of the present application, the test logical partition of the first partition of each SSD and the test logical partition of the second partition of the corresponding SSD form a DRBD, which can be used to test the DRBD delay, specifically, the application of the DRBD delay parameter, which will be described later.
[0078] Step 210: based on the preset service quality Qos parameters of each VM deployed on each host node, respectively determine the Qos parameters of the first partition and the second partition of each SSD.
[0079] In the embodiments of the present application, when the Qos parameters of the first partition and the second partition of each SSD are respectively determined based on the preset service quality Qos parameters of each VM deployed on each host node, a preferred implementation manner is that, for each first partition, the sum of the Qos parameters of each VM deployed on the host node taking the first partition as the main disk is determined, and the sum of the Qos parameters and the difference between the first DRBD delay are taken as the Qos parameter of the first partition, wherein the first DRBD delay is the delay of the first DRBD formed by the test logical partition of the first partition; for each second partition, the sum of the Qos parameters of each VM deployed on the host node taking the second partition as the backup disk is determined, and the sum of the Qos parameters and the second DRBD delay are taken as the Qos parameter of the second partition, wherein the second DRBD delay is the delay of the second DRBD formed by the test logical partition of the second partition.
[0080] In the embodiments of the present application, the Qos parameters (such as ioweight parameters) corresponding to each VM can be configured in advance according to the actual service requirements of the VMs deployed on each host node. In the first case, without considering the network delay, the Qos parameter of the first partition of each SSD is the sum of the Qos parameters of each VM taking the first partition as the primary disk, and the Qos parameter of the second partition of each SSD is the sum of the Qos parameters of each VM taking the second partition as the backup disk.
[0081] For example, in combination with Figure 3 As shown in Table 1, VM 1 and VM 2 take the first partition (SSD 11 and SSD 12) of SSD 1 as the group primary disk and the second partition (SSD 23 and SSD 24) of SSD 2 as the backup disk, VM 3 and VM 4 take the first partition (SSD 21 and SSD 22) of SSD 2 as the primary disk and the second partition (SSD 13 and SSD 14) of SSD 1 as the backup disk, the preset Qos parameter of VM 1 is 4, the Qos parameter of VM 2 is 2, the Qos parameter of VM 3 is 1, and the Qos parameter of VM 4 is 1.
[0082] Therefore, without considering the network delay, the Qos parameter of the first partition of SSD 1 is (4+2=6), the Qos parameter of the second partition of SSD 1 is (1+1=2), the Qos parameter of the first partition of SSD 2 is (1+1=2), and the Qos parameter of the second partition of SSD 2 is (4+2=6).
[0083]
[0084]
[0085] Table 1
[0086] Further, in the case of considering network delay, if the DRBD delay between the first partition of SSD 1 and the second partition of SSD 2 is T1, the DRBD delay between the second partition of SSD 1 and the first partition of SSD 1 is T2, then the Qos parameter of the first partition of SSD 1 can be adjusted to (6-X1), wherein X1 is the Qos adjustment parameter 1 when the delay of DRBD 1 is T1; the Qos parameter of the second partition of SSD 2 is adjusted to (6+X1); the Qos parameter of the first partition of SSD 2 is adjusted to (2-X2), wherein X1 is the Qos adjustment parameter 2 when the delay of DRBD 2 is T2; the Qos parameter of the second partition of SSD 1 is adjusted to (2+X2), preferably, X1 and X2 can be empirical values, and subsequently, X1 and X2 can be fine-tuned according to specific application scenarios, so that the Qos parameters of the first partition and the second partition of each SSD are more reasonable.
[0087] In the embodiment of the application, since the test logical partition 1 of the first partition of SSD 1 and the test logical partition 2 of the second partition of SSD 2 form DRBD 1, and the test logical partition 1 of the first partition of SSD 2 and the test logical partition 2 of the second partition of SSD 1 form DRBD 2, then the test method of DRBD delay can be: when each test logical volume is full of load io access, the io test tool is used to test the DRBD delay, and the delays of DRBD 1 and DRBD 2 are obtained. Then, according to the obtained T1 and T2, the Qos parameters of each first partition and second partition are fine-tuned.
[0088] In addition, empirical values X1 and X2 can also be set according to the current network rate (the network rate between the first partition and the second partition forming the DRBD), and the Qos parameters of each first partition and second partition are adjusted, and then X1i (i=1-n) is fine-tuned, so that the DRBD 1 delay (T1) is minimized, X1min=min{X11, X12, …, X1n}; X2i (i=1-n) is fine-tuned, so that the DRBD 2 delay (T2) is minimized, X2min=min{X21, X22, …, X2n}.
[0089] In actual application, the write efficiency of the primary disk is greater than that of the standby disk. That is, under normal circumstances, the time of writing the same data file into the local primary disk is less than that of writing into the remote standby disk, so the Qos parameters of the two partitions in the DRBD group can be fine-tuned, such as reducing the Qos parameter of the logical partition as the primary disk in the DRBD, and increasing the Qos parameter of the logical partition as the standby disk in the DRBD, so as to eliminate the negative effects of network delay between the primary disk and the standby disk.
[0090] It should be noted that in the embodiments of the present application, an optional implementation is that when the Qos parameters of the first partition and the second partition of each SSD are determined, the Qos parameters of the corresponding normally running VM on the host node are also determined, and then when the VM on any node host switches from the normally running state to the shutdown state during the normal running of the distributed storage system, the Qos parameters of the first partition of the local SSD corresponding to the node host and the Qos parameters of the second partition of the remote SSD corresponding to the host node need to be recalculated.
[0091] Further, in the embodiments of the present application, an optional implementation is that when the migration of the VM is determined, the logical partitions included in the first partition and the second partition of the SSD corresponding to the host node to which the VM migrates out and the host node to which the VM migrates in need to be adjusted, and the Qos parameters of the first partition and the Qos parameters of the second partition are recalculated according to the adjusted logical partitions included in the first partition and the second partition.
[0092] For example, as shown in FIG. 3, it is assumed that the VM 3 migrates from the host node 2 to the host node 1, and then after the migration is completed, the logical partition 13 in the host node 1, which is used as the backup disk before the migration of the VM 3, is adjusted as one logical partition of the first partition of the SSD 1, that is, the logical partition 13 is adjusted as the main disk of the migrated VM 3; and the logical partition 21 in the host node 2, which is used as the main disk before the migration of the VM 3, is adjusted as one logical partition of the second partition of the SSD 2, that is, the logical partition 21 is adjusted as the backup disk of the migrated VM 3. At this time, the first partition of the SSD 1 includes the logical partition 11, the logical partition 12 and the logical partition 13, the second partition of the SSD 1 includes the logical partition 14, the first partition of the SSD 2 includes the logical partition 22, and the second partition of the SSD 2 includes the logical partition 21, the logical partition 23 and the logical partition 24. Finally, the Qos parameters of the first partition and the second partition of the SSD 1 are recalculated, and the Qos parameters of the first partition and the second partition of the SSD 2 are recalculated. Figure 1 Figure 3 For example, as shown in FIG. 3, it is assumed that the VM 3 migrates from the host node 2 to the host node 1, and then after the migration is completed, the logical partition 13 in the host node 1, which is used as the backup disk before the migration of the VM 3, is adjusted as one logical partition of the first partition of the SSD 1, that is, the logical partition 13 is adjusted as the main disk of the migrated VM 3; and the logical partition 21 in the host node 2, which is used as the main disk before the migration of the VM 3, is adjusted as one logical partition of the second partition of the SSD 2, that is, the logical partition 21 is adjusted as the backup disk of the migrated VM 3. At this time, the first partition of the SSD 1 includes the logical partition 11, the logical partition 12 and the logical partition 13, the second partition of the SSD 1 includes the logical partition 14, the first partition of the SSD 2 includes the logical partition 22, and the second partition of the SSD 2 includes the logical partition 21, the logical partition 23 and the logical partition 24. Finally, the Qos parameters of the first partition and the second partition of the SSD 1 are recalculated, and the Qos parameters of the first partition and the second partition of the SSD 2 are recalculated.
[0093] Step 220: rate limiting the first partition and the second partition of each SSD based on the determined Qos parameters of the first partition and the second partition of each SSD.
[0094] In the embodiments of the present application, when the first partition and the second partition of each SSD are rate limited based on the determined Qos parameters of the first partition and the second partition of each SSD, a preferred implementation is that the first partition and the second partition of each SSD are rate limited based on the determined Qos parameters of the first partition and the second partition of each SSD by using the cgroup technology.
[0095] Further, the Qos parameters of the first partition and the second partition of each SSD can also be dynamically adjusted according to the current service condition of the distributed storage system, that is, the Qos parameters of the first partition and the second partition of each SSD are adjusted by adjusting X1 and / or X2.
[0096] Specifically, in the embodiments of the present application, the bandwidth usage value of the first partition of any SSD is detected based on a preset detection rule; if the bandwidth usage value is less than a set threshold, the Qos parameter of the first partition is reduced, so that each VM deployed on the host node using the second partition of the any SSD as the standby disk preferentially accesses the second partition.
[0097] For example, the io bandwidth sum of the first partition (VM3-SSD (logical partition 21), VM4-SSD (logical partition 22)) of SSD 2 corresponding to host node 2 is detected at regular intervals. When it is lower than the set threshold, X2 is increased, so that the Qos parameter of the second partition of SSD 2 corresponding to host node 2 is increased, and the Qos parameter of the first partition of SSD 1 corresponding to host node 1 is also increased, so that VM1 and VM2 preferentially access. (Increased to a maximum of 2). When it is higher than the set threshold, X2 is decreased until X2min is reached.
[0098] For example, the io bandwidth sum of the first partition (VM1-SSD (logical partition 11), VM2-SSD (logical partition 12)) of SSD 1 corresponding to host node 1 is detected at regular intervals. When it is lower than the set threshold, X1 is increased, so that the Qos parameter of the second partition of SSD1 corresponding to host node 1 is adjusted, and the Qos parameter of the first partition of SSD 2 corresponding to host node 2 is also increased, so that VM3 and VM4 preferentially access. (Increased to a maximum of 6). When it is higher than the set threshold, X1 is decreased until X1min is reached.
[0099] In the embodiments of the present application, when the service demand of each VM deployed on the host node changes, that is, the Qos parameter of each VM changes, the Qos parameters of the first partition and the second partition of each SSD need to be recalculated according to the changed Qos parameters of each VM, and the speed limiting operation is performed according to the recalculated Qos parameters of the first partition and the second partition of each SSD.
[0100] Further, in an optional implementation of the embodiments of the present application, assuming that each host node in the distributed storage system uses two SSDs with the same performance for io caching, the two SSDs can be used as the first partition and the second partition in the above embodiments. The objects of speed limiting are no longer the first partition and the second partition of the logical disk, but the first SSD and the second SSD of the physical disk.
[0101] Further, in the embodiments of the present application, an optional implementation is that a host node in a distributed storage system uses two SSDs with different performance for io caching (for example, the ioPS of SSD A is 50,000, and the ioPS of SSD B is 20,000), and then Qos limiting needs to be converted. Because the high-performance disk can be slowed down, but the low-performance disk cannot be accelerated, the ioPS high SSD A needs to be slowed down. Specifically, the Qos parameter of the first partition (SSD B) of the host node 1 is 6, the Qos parameter of the second partition (SSD A) of the host node 1 is 2 / slowing down coefficient, the Qos parameter of the first partition (SSD B) of the host node 2 is 2, and the Qos parameter of the second partition (SSD A) of the host node 2 is 6 / slowing down coefficient. As can be seen from the above, the slowing down coefficient is 5 / 2=2.5.
[0102] Based on the above embodiments, referring to Figure 5 The embodiments of the present application provide a structure diagram of a service quality control device. The service quality control device is applied to a distributed storage system. The distributed storage system uses an SSD solid state disk caching mode for read and write acceleration. The service quality control device includes a division unit 50, a determination unit 51, and a limiting unit 52. The division unit 50 is configured to divide each SSD corresponding to a host node into a first partition and a second partition. The first partition of each SSD is used as a main disk of the corresponding host node, and the second partition of each SSD is used as a backup disk on other host nodes.
[0103] The determination unit 51 is configured to determine the Qos parameters of the first partition and the second partition of each SSD based on preset service quality Qos parameters of each VM deployed on each host node.
[0104] The limiting unit 52 is configured to limit the first partition and the second partition of each SSD based on the determined Qos parameters of the first partition and the second partition of each SSD.
[0105] The limiting unit 52 is configured to limit the first partition and the second partition of each SSD based on the determined Qos parameters of the first partition and the second partition of each SSD.
[0106] Optionally, when each SSD corresponding to a host node is divided into a first partition and a second partition, the division unit 50 is specifically configured to:
[0107] The division unit 50 is specifically configured to:
[0108] The division unit 50 is specifically configured to:
[0109] determine a target number of VMs deployed on the first host and divide the first partition of the SSD into the first number of logical partitions, the first partition of the SSD being used as a main disk of the first host;
[0110] determine a second number of VMs deployed on the second host and divide the second partition of the SSD into the second number of logical partitions, the second partition of the SSD being used as a backup disk of the second host, one VM corresponding to one logical partition.
[0111] Optionally, each first / second partition is divided into a test logical partition, and the test logical partition of the first partition of one host node and the test logical partition of the second partition of the one host node form a distributed replicated block device (DRBD).
[0112] In the case of determining the Qos parameters of each first / second partition based on the Qos parameters of each VM deployed on each host node, the determining unit 51 is specifically configured to:
[0113] for each first partition, determine a sum of the Qos parameters of each VM deployed on the host node using the first partition as a main disk, and determine a difference between the sum of the Qos parameters and a first DRBD latency as the Qos parameter of the first partition, wherein the first DRBD latency is a latency of a first DRBD formed by the test logical partition of the first partition;
[0114] for each second partition, determine a sum of the Qos parameters of each VM deployed on the host node using the second partition as a backup disk, and determine a sum of second DRBD latencies as the Qos parameter of the second partition, wherein the second DRBD latency is a latency of a second DRBD formed by the test logical partition of the second partition.
[0115] Optionally, in the case of limiting the speed of each first / second partition of each SSD based on the determined Qos parameters of each first / second partition of each SSD, the speed limiting unit 52 is specifically configured to:
[0116] limit the speed of each first / second partition of each SSD based on the determined Qos parameters of each first / second partition of each SSD using cgroup technology.
[0117] Optionally, the apparatus further comprises:
[0118] a detecting unit configured to detect a bandwidth usage value of the first partition of any SSD based on a preset detection rule;
[0119] The adjusting unit reduces the Qos parameter of the first partition if the bandwidth usage value is less than a set threshold, so that each VM deployed on the host node with the second partition of the any SSD as a backup disk preferentially accesses the second partition;
[0120] The adjusting unit increases the Qos parameter of the first partition if the bandwidth usage value is greater than or equal to a set threshold, so that each VM deployed on the host node with the first partition of the any SSD as a main disk preferentially accesses the first partition.
[0121] Further, referring to Figure 6 The service quality control device provided by the application further includes a memory 60 and a processor 61, wherein,
[0122] The memory 60 is configured to store program instructions.
[0123] The processor 61 is configured to invoke the program instructions stored in the memory 60, and execute any of the above method embodiments according to the obtained program.
[0124] Further, the application provides a computer readable storage medium storing computer executable instructions, wherein the computer executable instructions are used to make the computer execute any of the above method embodiments applied to an intelligent network card.
[0125] To sum up, the service quality control method provided by the application is applied to a distributed storage system, the distributed storage system uses an SSD solid state disk cache mode for read-write acceleration, and the method includes the following steps: dividing each SSD corresponding to a host node into a first partition and a second partition, wherein the first partition of each SSD is used as a main disk of the corresponding host node, and the second partition of each SSD is used as a backup disk of other host nodes; determining the Qos parameter of the first partition and the second partition of each SSD based on a preset service quality Qos parameter of each VM deployed on each host node; and limiting the speed of the first partition and the second partition of each SSD based on the determined Qos parameter of the first partition and the second partition of each SSD.
[0126] The service quality control method provided by the application divides each SSD into a partition used as a main disk to provide services for a VM deployed on a local host node and a partition used as a backup disk to provide services for a VM deployed on a remote host node, and according to the Qos parameter of each VM preconfigured according to actual business requirements, the Qos parameter of each partition is counted, and the speed of each partition is limited according to the Qos parameter of each partition, which avoids the problem of system delay jitter and unstable business caused by the contention of each VM for io resources.
[0127] Those skilled in the art will appreciate that embodiments of the application can be readily used as software, hardware, or a combination of software and hardware. In one
[0128] The present application is described in reference to the flow diagrams and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flow diagrams and / or block diagrams, and combinations of blocks in the flow diagrams and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagrams and / or block diagrams in the flow diagrams and / or block diagrams illustrate the architecture, functionality, and operation of possible implementations of apparatuses and computer-program products according to various embodiments of the present application. In this regard, each block in the flow diagrams and / or block diagrams can represent a module, segment, or portion of code, which comprises one or more executable Figure 1 The flow diagrams and / or block diagrams in the flow diagrams and / or block diagrams illustrate the architecture, functionality, and operation of possible implementations of apparatuses and computer-program products according to various embodiments of the present application. In this regard, each block in the flow diagrams and / or block diagrams can represent a module, segment, or portion of code, which comprises one or more executable
[0129] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the Figure 1 The flow diagrams and / or block diagrams in the flow diagrams and / or block diagrams illustrate the architecture, functionality, and operation of possible implementations of apparatuses and computer-program products according to various embodiments of the present application. In this regard, each block in the flow diagrams and / or block diagrams can represent a module, segment, or portion of code, which comprises one or more executable Figure 1 The flow diagrams and / or block diagrams in the flow diagrams and / or block diagrams illustrate the architecture, functionality, and operation of possible implementations of apparatuses and computer-program products according to various embodiments of the present application. In this regard, each block in the flow diagrams and / or block diagrams can represent a module, segment, or portion of code, which comprises one or more executable
[0130] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagrams and / or block diagrams in the flow diagrams and / or block diagrams illustrate the architecture, functionality, and operation of possible implementations of apparatuses and computer-program products according to various embodiments of the present application. In this regard, each block in the flow diagrams and / or block diagrams can represent a module, segment, or portion of code, which comprises one or more executable Figure 1 The flow diagrams and / or block diagrams in the flow diagrams and / or block diagrams illustrate the architecture, functionality, and operation of possible implementations of apparatuses and computer-program products according to various embodiments of the present application. In this regard, each block in the flow diagrams and / or block diagrams can represent a module, segment, or portion of code, which comprises one or more executable
[0131] While preferred embodiments of the application have been described, additional variations and modifications can be made to these embodiments by those skilled in the art once they learn of the basic inventive concepts. Such variations and modifications are also considered to be within the scope of the application as defined by the appended claims.
[0132] It is apparent that a person skilled in the art can make various modifications and variations to the embodiments of the application without departing from the spirit and scope of the application. Therefore, the application is intended to cover the modifications and variations of this application, provided they come within the scope of the claims and their equivalents.
Claims
1. A quality of service control method, characterized by, The method is applied to a distributed storage system which adopts a SSD (Solid State Disk) cache mode for read-write acceleration, and comprises the following steps: Dividing each SSD corresponding to each host node into a first partition and a second partition, wherein the first partition of each SSD is used as a main disk of the corresponding host node, and the second partition of each SSD is used as a backup disk on other host nodes; Determining the Qos parameters of the first partition and the second partition of each SSD based on preset Qos parameters of each VM deployed on each host node; Limiting the speed of the first partition and the second partition of each SSD based on the determined Qos parameters of the first partition and the second partition of each SSD.
2. The method of claim 1, wherein, The step of dividing each SSD corresponding to each host node into a first partition and a second partition comprises: For each SSD corresponding to each host node, the following operations are performed: Dividing the SSD corresponding to one host node into a first partition and a second partition; Determining a first number of VMs deployed on a first host node which uses the first partition of the SSD as a main disk, and dividing the first partition of the SSD into the first number of logical partitions; Determining a second number of VMs deployed on a second host node which uses the second partition of the SSD as a backup disk, and dividing the second partition of the SSD into the second number of logical partitions, wherein one VM corresponds to one logical partition.
3. The method of claim 1 or 2, wherein, Each first / second partition is divided into test logical partitions, and the test logical partitions of the first partition of a main disk of one host node and the test logical partitions of the second partition of a backup disk of the one host node form a distributed replicated block device (DRBD); The step of determining the Qos parameters of the first partition and the second partition of each SSD based on preset Qos parameters of each VM deployed on each host node comprises: For each first partition, determining the sum of the Qos parameters of each VM deployed on a host node which uses the first partition as a main disk, and taking the difference between the sum of the Qos parameters and a first DRBD latency as the Qos parameter of the first partition, wherein the first DRBD latency is the latency between the test logical partition of the first partition and the test logical partition of the second partition included in the first DRBD formed by the first partition; For each second partition, determining the sum of the Qos parameters of each VM deployed on a host node which uses the second partition as a backup disk, and taking the sum of the Qos parameters and a second DRBD latency as the Qos parameter of the second partition, wherein the second DRBD latency is the latency between the test logical partition of the second partition and the test logical partition of the first partition included in the second DRBD formed by the second partition.
4. The method of claim 1, wherein, The step of limiting the speed of the first partition and the second partition of each SSD based on the determined Qos parameters of the first partition and the second partition of each SSD comprises: Based on the determined Qos parameters of the first partition and the second partition of each SSD, the cgroup technology is used to limit the speed of the first partition and the second partition of each SSD.
5. The method of claim 3, wherein, The method further comprises: Detecting the bandwidth usage value of the first partition of any SSD based on a preset detection rule; If the bandwidth usage value is less than a set threshold, a Qos parameter of the first partition is reduced, so that each VM deployed on a host node with the first partition as a main disk of the any SSD preferentially accesses a second partition of the any SSD; If the bandwidth usage value is greater than or equal to the set threshold, the Qos parameter of the first partition is increased, so that each VM deployed on the host node with the first partition as the main disk preferentially accesses the first partition.
6. A quality of service control device, characterized by The application is applied to a distributed storage system which adopts a SSD (Solid State Disk) caching mode to accelerate reading and writing, and the device comprises: a partition unit configured to divide each SSD corresponding to a host node into a first partition and a second partition, wherein the first partition of each SSD is used as a main disk of the corresponding host node, and the second partition of each SSD is used as a backup disk of other host nodes; a determination unit configured to determine Qos parameters of the first partition and the second partition of each SSD based on preset service quality (Qos) parameters of each VM deployed on each host node; a speed limiting unit configured to limit the first partition and the second partition of each SSD based on the determined Qos parameters of the first partition and the second partition of each SSD.
7. The apparatus of claim 6, wherein, When dividing each SSD corresponding to a host node into a first partition and a second partition, the partition unit is specifically configured to: perform the following operations on each SSD corresponding to a host node: divide the SSD corresponding to a host node into a first partition and a second partition; determine a first number of VMs deployed on a first host node with the first partition of the SSD as a main disk, and divide the first partition of the SSD into the first number of logical partitions; determine a second number of VMs deployed on a second host node with the second partition of the SSD as a backup disk, and divide the second partition of the SSD into the second number of logical partitions, wherein one VM corresponds to one logical partition.
8. The apparatus of claim 6 or 7, wherein, Each first / second partition is divided into test logical partitions, and a test logical partition of a first partition of a host node and a test logical partition of a second partition of the host node form a distributed replicated block device (DRBD); When determining the Qos parameters of the first partition and the second partition of each SSD based on the preset service quality (Qos) parameters of each VM deployed on each host node, the determination unit is specifically configured to: for each first partition, determine a sum of Qos parameters of each VM deployed on a host node with the first partition as a main disk, and determine a difference between the sum of the Qos parameters and a first DRBD latency as a Qos parameter of the first partition, wherein the first DRBD latency is a latency between a test logical partition of the first partition and a test logical partition of a second partition included in a first DRBD formed by the first partition; and for each second partition, determine a sum of Qos parameters of each VM deployed on a host node with the second partition as a backup disk, and determine a difference between the sum of the Qos parameters and a second DRBD latency as a Qos parameter of the second partition, wherein the second DRBD latency is a latency between a test logical partition of the second partition and a test logical partition of a first partition included in a second DRBD formed by the second partition. For each second partition, a sum of Qos parameters of each VM deployed on a host node taking the second partition as a backup disk is determined, and the sum of Qos parameters and a sum of second DRBD latencies of the second partition are taken as Qos parameters of the second partition, wherein the second DRBD latency is a latency between a test logical partition of the second partition and a test logical partition of a first partition included in a second DRBD composed of the second partition.
9. The apparatus of claim 6, wherein, In the step of limiting the speed of the first partition and the second partition of each SSD based on the determined Qos parameters of the first partition and the second partition of each SSD, the limiting unit is specifically configured to: In the step of limiting the speed of the first partition and the second partition of each SSD based on the determined Qos parameters of the first partition and the second partition of each SSD, the limiting unit is specifically configured to:
10. The apparatus of claim 8, wherein, The device further comprises: a detecting unit configured to detect a bandwidth usage value of the first partition of any SSD based on a preset detection rule; an adjusting unit configured to, if the bandwidth usage value is less than a set threshold, reduce the Qos parameter of the first partition, so that each VM deployed on a host node taking the second partition of the any SSD as a backup disk has a priority to access the second partition; if the bandwidth usage value is greater than or equal to the set threshold, increase the Qos parameter of the first partition, so that each VM deployed on a host node taking the first partition of the any SSD as a main disk has a priority to access the first partition.
Citation Information
Patent Citations
Apparatus and method for providing quality of service over a virtual interface for solid-state storage
CN110851075A
Shared storage architecture
US20150212760A1