A method and apparatus for setting a volume cap for a roll, and a medium
Patent Information
- Application Number
- CN202310686124.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-09
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2043-06-09
AI Technical Summary
如果需要调整,就需要对每个卷再次设置QoS,当卷数量很多时,需要单独识别每个卷上承载的业务然后进行设置,整个流程会非常繁琐
[0033] This invention provides a method for setting the upper limit of volume traffic. First, it obtains the resource information of a storage resource pool. Then, based on this information, it sets the total upper limit of traffic for the storage resource pool, thereby preventing the storage resource pool and volumes from bearing excessive traffic. Next, it determines the capacity of each volume in the storage resource pool and proportionally allocates the upper limit of traffic to each volume according to their capacity. This unified allocation eliminates the need for individual settings for each volume, avoiding the cumbersome setup process of the original solution and making it simpler and more effective. This solution sets the upper limit of traffic for different volumes based on the capacity of all business volumes within the entire storage resource pool, ensuring the rationality of the storage resources allocated to each volume and improving the stability of the storage system.
Smart Images

Figure CN116679882B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of storage technology, and in particular to a method, apparatus, and medium for setting a volume's maximum traffic capacity. Background Technology
[0002] In block storage scenarios, volumes bear the primary responsibility for functional implementation and business output. Since each volume carries different business functions, resource contention is common. In severe cases, a volume with particularly high throughput can cause significant delays in other services, severely impacting user experience. Therefore, resource control for volumes is essential. By configuring the maximum Quality of Service (QoS) on logical volumes, a maximum limit on business throughput is essentially set. This resource allocation effectively prevents business delays.
[0003] However, as business scale increases, the number of volumes in the entire storage resource pool is constantly increasing. Current solutions set maximum QoS at the volume level, and each volume limits its workload based on its own QoS settings during the input / output (IO) process. If adjustments are needed, the QoS needs to be reconfigured for each volume. When the number of volumes is large, it's necessary to individually identify the services carried on each volume and then configure them, making the entire process extremely cumbersome.
[0004] Therefore, simplifying the process of setting the upper limit of volume traffic is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] The purpose of this invention is to provide a method, apparatus, and medium for setting the upper limit of volume traffic, so as to simplify the process of setting the upper limit of volume traffic.
[0006] To solve the above technical problems, the present invention provides a method for setting the upper limit of the traffic volume of a volume, comprising:
[0007] Obtain resource information from the storage resource pool;
[0008] Set the total service volume limit of the storage resource pool based on the resource information;
[0009] Determine the capacity of each volume in the storage resource pool;
[0010] The total traffic limit is allocated proportionally to the traffic limit corresponding to each volume based on the volume's capacity.
[0011] On one hand, after allocating the total traffic limit proportionally to the traffic limit corresponding to each volume based on the volume's capacity, the method further includes:
[0012] When the number or capacity of the volumes changes, return to the step of determining the capacity of each volume in the storage resource pool.
[0013] On the other hand, changes in the number of volumes include at least the following situations: volume creation and volume deletion;
[0014] The changes in the volume capacity include at least the following situations: volume expansion and volume reduction.
[0015] On the other hand, after setting the total service volume limit of the storage resource pool based on the resource information, the method further includes:
[0016] Identify the key business volumes that require separate limits on their own business volume.
[0017] Set the corresponding service volume limit for the critical service volume according to the instructions.
[0018] On the other hand, the step of allocating the total traffic limit proportionally to the traffic limit corresponding to each volume based on the volume's capacity includes:
[0019] Obtain the difference in business volume between the total business volume limit and the business volume limit of the critical business volume;
[0020] The traffic volume difference is proportionally allocated to the traffic volume caps of the other volumes besides the critical traffic volume, based on the volume's capacity.
[0021] On the other hand, the resource information includes: the performance and number of storage resource pool nodes, and the performance and number of disks.
[0022] On the other hand, the volume's traffic capacity limits include: a maximum number of read / write operations per second and / or a maximum bandwidth.
[0023] To address the aforementioned technical problems, the present invention also provides a device for setting the upper limit of a volume's traffic, comprising:
[0024] The acquisition module is used to acquire resource information from the storage resource pool;
[0025] The setting module is used to set the total service volume limit of the storage resource pool according to the resource information;
[0026] A determination module is used to determine the capacity of each volume in the storage resource pool;
[0027] The allocation module is used to allocate the total service volume limit proportionally to the service volume limit corresponding to each of the volumes according to the volume capacity.
[0028] On the other hand, the device for setting the upper limit of the volume's traffic further includes a return module, which is used to return to the step of determining the capacity of each volume in the storage resource pool when the number of volumes or the capacity of the volumes change after the total upper limit of traffic is allocated proportionally to the upper limit of traffic corresponding to each volume according to the capacity of the volume.
[0029] On the other hand, the device for setting the volume's service volume limit further includes: a second determining module, used to determine key service volumes that need to have their own service volume limits set separately after the total service volume limit of the storage resource pool is set according to the resource information; and a setting module, used to set the corresponding service volume limit for the key service volumes according to the instructions.
[0030] To solve the above-mentioned technical problems, the present invention also provides a device for setting the upper limit of volume traffic, comprising: a memory for storing a computer program;
[0031] A processor, used to implement the steps of setting the above-mentioned volume's traffic limit when executing a computer program.
[0032] To address the aforementioned technical problems, the present invention also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the method for setting the upper limit of the volume's traffic.
[0033] This invention provides a method for setting the upper limit of volume traffic. First, it obtains the resource information of a storage resource pool. Then, based on this information, it sets the total upper limit of traffic for the storage resource pool, thereby preventing the storage resource pool and volumes from bearing excessive traffic. Next, it determines the capacity of each volume in the storage resource pool and proportionally allocates the upper limit of traffic to each volume according to their capacity. This unified allocation eliminates the need for individual settings for each volume, avoiding the cumbersome setup process of the original solution and making it simpler and more effective. This solution sets the upper limit of traffic for different volumes based on the capacity of all business volumes within the entire storage resource pool, ensuring the rationality of the storage resources allocated to each volume and improving the stability of the storage system.
[0034] The present invention also provides a device for setting the upper limit of volume traffic and a computer-readable storage medium, which correspond to the above method and therefore have the same beneficial effects as the above method. Attached Figure Description
[0035] To more clearly illustrate the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 A flowchart illustrating a method for setting a volume traffic limit according to an embodiment of the present invention;
[0037] Figure 2 A structural diagram of a device for setting the upper limit of volume traffic provided in an embodiment of the present invention;
[0038] Figure 3 A structural diagram of a device for setting the upper limit of volume traffic provided in another embodiment of the present invention. Detailed Implementation
[0039] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.
[0040] The core of this invention is to provide a method, apparatus, and medium for setting the upper limit of volume traffic, so as to simplify the process of setting the upper limit of volume traffic.
[0041] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0042] In the context of digital transformation, the volume of data is constantly growing, and distributed storage systems have become widely used. A distributed storage system typically consists of a master server, storage servers, and multiple clients. Essentially, it distributes a large number of files evenly across multiple storage servers, featuring high scalability and high reliability. At the same time, distributed storage systems can be applied to various scenarios, and driven by commercialization models, the requirements for distributed storage systems are becoming increasingly stringent. In particular, the stability of storage services is crucial, as the stability of backend storage directly impacts the performance of frontend services.
[0043] For customers, block storage can be formatted and used with any file system, just like a physical hard drive. Therefore, block storage is suitable for data storage in most common business scenarios and has seen increasingly widespread application. In block storage scenarios, volumes bear the main responsibility for functional implementation and business output. In cloud and virtualization scenarios, volumes are often accessed via multi-path methods to improve business stability and performance. Since each volume carries different business, resource contention is common. In severe cases, a volume with particularly high throughput can cause serious lag in other services, severely impacting user experience. Therefore, resource control for volumes is essential. Configuring the maximum QoS on a logical volume is equivalent to setting an upper limit on the business volume. This resource allocation can effectively avoid the above situation. However, as the business scale increases, the number of volumes in the entire storage resource pool continues to increase, but the total throughput provided by the storage server remains unchanged. With the horizontal and vertical expansion of the business, an unchanging QoS policy cannot support the stable operation of storage services. In practical applications, if it is necessary to adjust the service limit of a volume, QoS needs to be set for each volume again. When there are many volumes, it is necessary to identify the services carried on each volume individually and then set them one by one, which is a very cumbersome process.
[0044] To address the problems existing in the current solution, embodiments of the present invention provide a method for setting the upper limit of volume traffic. Figure 1 A flowchart illustrating a method for setting a volume traffic limit according to an embodiment of the present invention; as shown. Figure 1 As shown, the method includes the following steps:
[0045] S10: Obtain resource information of the storage resource pool.
[0046] S11: Set the upper limit of the total business volume of the storage resource pool based on the resource information.
[0047] S12: Determine the capacity of each volume in the storage resource pool.
[0048] S13: Allocate the total traffic limit to the corresponding traffic limit of each volume proportionally according to the volume's capacity.
[0049] The core of the solution provided in this invention lies in allocating the QoS (i.e., the upper limit of traffic) of dynamic volumes according to capacity. This solution can be developed using C++ and implemented in the block storage layer of a distributed storage system. First, the function of allocating the upper limit of traffic according to volume capacity needs to be enabled. The total throughput of the storage resource pool (equivalent to the total upper limit of traffic) is set based on resource information such as the performance and number of storage resource pool nodes, disk performance and number, etc., for example, the number of read / write operations per second (IOPS), bandwidth, etc. Subsequently, the block storage layer will allocate the upper limit of traffic proportionally according to the current capacity ratio of volumes within the storage pool.
[0050] Furthermore, after allocating the total workload limit proportionally to the workload limit of each volume based on the volume capacity, if the number or capacity of volumes changes, it is necessary to redetermine the capacity of each volume in the storage resource pool and then re-allocate the total workload limit proportionally to the workload limit of each volume based on the volume capacity. Changes in the number or capacity of volumes include at least the following scenarios: volume creation, volume deletion, volume expansion, and volume shrinkage. In actual business scenarios, customers may need to specify the workload limit of a specific volume based on its business type. Therefore, after setting the total workload limit of the storage resource pool based on resource information, it is also possible to identify critical business volumes that require separate workload limits, and then set the corresponding workload limits for these critical business volumes according to customer instructions. After setting the workload limit for critical business volumes separately, the total workload limit that the remaining volumes can handle changes. Therefore, the workload difference between the total workload limit and the workload limit of the critical business volumes can be obtained. The calculated workload difference is the total workload limit for the remaining volumes, and then the workload difference is proportionally allocated to the workload limits of the volumes other than the critical business volumes based on their capacity.
[0051] The following describes one specific implementation of the present invention, specifically a dynamic volume QoS setting scheme based on capacity allocation. The process is explained as follows:
[0052] 1) The block storage layer receives instructions to set the overall QoS policy for the storage pool (wherein, the QoS policy includes the traffic limit for each volume):
[0053] a) Parse creation commands (number of read / write operations per second, bandwidth).
[0054] b) Record the QoS policy in the metadata of the storage pool.
[0055] 2) Block storage layer receive settings for QoS function switch based on capacity:
[0056] a) Save the switch state to the metadata in 1)b).
[0057] b) Only if the switch status recorded in the metadata is "On", and there is a configured overall QoS policy for the storage pool (QoS) total The capacity-based QoS allocation function is only activated when [the specified condition is met].
[0058] 3) The block storage layer allocates QoS policies for each volume:
[0059] a) When the block storage layer receives a change in the metadata in 1)b), it determines whether to trigger the next QoS allocation process based on the conditions in 2)b).
[0060] b) Get the current total capacity of the storage pool, the number of volumes that have been created, and the allocated capacity of each volume.
[0061] c) Allocate the QoS policy of the entire storage pool proportionally based on the allocated capacity of each volume, and write the QoS share allocated to each volume into the default QoS policy of each volume.
[0062] d) When the number or capacity of volumes in the storage resource pool changes (corresponding to volume creation, volume deletion, volume expansion, and volume shrinkage), the dynamic adjustment process in 3)c) is triggered again, the QoS share of each volume is refreshed again, and all access points are notified to update the QoS policy.
[0063] e) The QoS share for each volume must not exceed the single-volume QoS share cap. max This ensures that there is no waste of QoS quota when the number of volumes in the storage pool is small (in practical applications, it is also possible not to set a single volume QoS quota limit).
[0064] 4) Configure QoS separately for critical service volumes:
[0065] a) Set a separate QoS1 quota for the volume carrying critical services and write the QoS1 quota into the high priority QoS policy of the volume.
[0066] b) When setting limits on the number of read / write operations per second and bandwidth, the high-priority QoS policy will be prioritized. In this scenario, the number of read / write operations and bandwidth of critical business volumes per second will be limited according to the high-priority QoS policy.
[0067] c) Update the total QoS share of the storage pool recorded in the metadata of 1)b), QoS total新 =QoS total原 -QoS1.
[0068] d) Trigger the dynamic adjustment process in 3)c) again to refresh the QoS share of each volume.
[0069] This invention employs a scheme that dynamically allocates volume QoS settings based on capacity. The QoS policies of all volumes in the entire storage resource pool are automatically updated. As the number and capacity of volumes in the storage resource pool change, the QoS of each volume is dynamically adjusted, and the updated QoS policy takes effect dynamically without interrupting services. Furthermore, this solution supports customized QoS policies for volumes carrying critical services, automating and diversifying the allocation of IO capabilities across the entire storage resource pool. This better ensures the stability of core services and aligns with the current concepts of fast and efficient storage.
[0070] This invention first requires enabling the function of allocating a service volume cap based on volume capacity. The total service volume cap for the storage resource pool is set based on resource information such as the performance and number of storage resource pool nodes and the performance and number of disks. Subsequently, the block storage layer will proportionally allocate the service volume cap based on the total number and capacity ratio of volumes in the current storage pool. Afterwards, whenever there are changes to volume resources in the storage resource pool, such as the creation or deletion of volumes, the service volume caps for all volumes within the same storage resource pool will be automatically and dynamically adjusted. It also supports setting high-priority service volume caps at the individual volume level, allowing customers to specify QoS policies for individual volumes based on service type while allocating by capacity. This balances the service quality of critical services with the dynamic adaptation of other volume services, better ensuring the stability of storage services.
[0071] The method for setting the upper limit of volume traffic provided by the embodiments of the present invention has been described in detail above. Specific examples have been used to illustrate the principle and implementation of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core idea of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation and application scope based on the idea of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
[0072] This invention provides a method for setting the upper limit of volume traffic. First, it obtains the resource information of a storage resource pool. Then, based on the obtained resource information, it sets the total upper limit of traffic for the storage resource pool, thereby preventing the storage resource pool and volumes from bearing excessive traffic. Next, it determines the capacity of each volume in the storage resource pool and proportionally allocates the upper limit of traffic to the corresponding volume based on the volume's capacity. This unified allocation eliminates the need for individual settings for each volume, avoiding the cumbersome setup process of the original solution, making it simpler and more effective. This solution sets the upper limit of traffic for different volumes based on the capacity of all business volumes within the entire storage resource pool, ensuring the rationality of the storage resources allocated to each volume and improving the stability of the storage system.
[0073] As mentioned in the above embodiments, after setting the total workload limit of the storage resource pool and the capacity of each volume in the storage resource pool, the total workload limit is proportionally allocated to the workload limit corresponding to each volume based on the volume capacity. However, in actual implementation, the number and capacity of volumes may change. Changes in the number of volumes include at least the following scenarios: volume creation and deletion; changes in volume capacity include at least the following scenarios: volume expansion and volume shrinkage. Furthermore, after setting the workload limit for critical business volumes separately, the number of volumes and the total capacity will also change. In this case, the previously set workload limits for each volume are no longer applicable, and the workload limits for each volume need to be updated. Therefore, after proportionally allocating the total workload limit to the workload limit corresponding to each volume based on the volume capacity, if the number and capacity of volumes change, it is necessary to redetermine the capacity of each volume in the storage resource pool and redistribute the total workload limit proportionally to the workload limit corresponding to each volume based on the volume capacity, i.e., return to the step of determining the capacity of each volume in the storage resource pool.
[0074] In real-world business scenarios, customers may need to specify a separate workload limit for a particular volume based on its business type. Therefore, after setting the total workload limit for the storage resource pool based on resource information, it's possible to identify critical business volumes that require separate workload limits. Then, based on customer instructions, the corresponding workload limits are set for these critical business volumes. After setting separate workload limits for critical business volumes, these volumes no longer participate in the overall workload allocation of the storage resource pool; only the remaining volumes are allocated workload limits proportionally. Furthermore, the total workload limit that the remaining volumes can handle also changes. Therefore, it's possible to first obtain the workload difference between the total workload limit and the workload limit of the critical business volumes, i.e., the QoS (Quality of Service). total新 =QoS total原 -QoS1, where QoS total原 The original total traffic limit, QoS total新 The resulting difference in traffic volume is equivalent to the new total traffic volume cap. Then, based on the volume capacity, this difference is proportionally allocated to the corresponding traffic volume caps of all volumes except for critical traffic volumes.
[0075] Furthermore, this invention does not limit the type and quantity of resource information, nor does it limit the specific content of the upper limit of the business volume. In some embodiments, resource information includes the performance and quantity of storage resource pool nodes and the performance and quantity of disks. The upper limit of the volume's business volume may include: the upper limit of the number of read / write operations per second and / or the upper limit of bandwidth.
[0076] Block storage refers to a system where a controller adds a group of disk drives to an independent Redundant Array of Independent Disks (RAID) and provides fixed-size independent RAID blocks as Logical Unit Numbers (LUNs) for volumes. Block storage primarily maps entire raw disk spaces to the host for use. For example, if a RAID array has 5 hard drives (assuming each is 1GB for simplicity), it can be logically partitioned into N logical hard drives (assuming there are also 5 logical drives, each 1GB, but these 5 1GB logical drives have completely different meanings from the original 5 physical hard drives. For example, in the first logical hard drive A, the first 200MB might come from physical hard drive 1, the second 200MB from physical hard drive 2, so logical hard drive A is a logically virtual hard drive created from multiple physical hard drives). Block storage then maps these logical drives to the host. The operating system on the host will recognize 5 hard drives, but it cannot distinguish between logical and physical drives; it only considers them as 5 raw physical hard drives, no different from physical hard drives directly mounted to the operating system. A distributed storage architecture consists of three parts: clients, a metadata server, and a data server. Clients are responsible for sending read and write requests and caching file metadata and file data. The metadata server manages metadata and processes client requests, making it the core component of the entire system. The data server stores file data, ensuring its availability and integrity. The advantage of this architecture is that performance and capacity can be scaled simultaneously, resulting in strong system scalability. A storage volume directly binds a directory on the host machine's local file system to a directory on the container's internal file system. This means that when data is written to a directory within the container, the container directly writes its contents to the host machine's directory that is bound to that container.
[0077] To address the issue of individually adjusting the workload limit for each volume in the original solution, this invention provides an optimized approach. This allows setting the total workload limit for the entire storage resource pool based on its capacity, and then dynamically allocating and adjusting the workload limit for each volume based on the number and capacity of volumes, ensuring the overall stability of the storage system and preventing overload. Furthermore, this invention also supports customizing the workload limit for high-priority volumes, balancing stability and performance. Specifically, this invention first requires enabling the function of allocating workload limits based on volume capacity. The total workload limit for the storage resource pool is set based on resource information such as the performance and number of storage resource pool nodes and disk performance and quantity. Subsequently, the block storage layer will proportionally allocate the workload limit based on the total number and capacity ratio of volumes in the current storage pool. Afterwards, whenever there are changes to volume resources in the storage resource pool, such as the creation or deletion of volumes, the workload limits for all volumes within the same storage resource pool will be automatically and dynamically adjusted. It also supports setting high-priority workload limits at the individual volume level, allowing customers to specify QoS policies for individual volumes based on service type, while still allocating workloads by capacity. It also balances the quality of service for critical business operations with the dynamic adaptation of other volume services, thus better ensuring the stability of storage services.
[0078] In the above embodiments, the method for setting the volume traffic limit has been described in detail. This invention also provides embodiments corresponding to a device for setting the volume traffic limit. It should be noted that this invention describes the device portion from two perspectives: one based on functional modules, and the other based on hardware.
[0079] From the perspective of functional modules, this embodiment provides a device for setting the upper limit of volume traffic. Figure 2 A structural diagram of the device for setting the upper limit of volume traffic provided in an embodiment of the present invention is shown below. Figure 2 As shown, the device includes:
[0080] Module 10 is used to obtain resource information of the storage resource pool;
[0081] Setting module 11 is used to set the total business volume limit of the storage resource pool according to resource information;
[0082] The first determining module 12 is used to determine the capacity of each volume in the storage resource pool;
[0083] The allocation module 13 is used to allocate the total traffic limit to the corresponding traffic limit of each volume according to the volume capacity.
[0084] Since the embodiments of the apparatus and the embodiments of the method correspond to each other, please refer to the description of the embodiments of the method for the embodiments of the apparatus, which will not be repeated here.
[0085] In some embodiments, the volume capacity setting device further includes a return module, configured to return to the step of determining the capacity of each volume in the storage resource pool when the number of volumes or their capacity changes after the total capacity limit is allocated proportionally to the capacity limit of each volume according to the volume capacity.
[0086] In some embodiments, the device for setting the volume's service capacity limit further includes: a second determining module, configured to determine critical service volumes that require separate service capacity limits after setting the total service capacity limit of the storage resource pool based on resource information; and a setting module, configured to set corresponding service capacity limits for the critical service volumes according to instructions.
[0087] The volume traffic limit setting device provided in this embodiment first acquires the resource information of the storage resource pool using an acquisition module. Then, a setting module sets the total traffic limit of the storage resource pool based on the acquired resource information, thereby preventing the storage resource pool and volumes from bearing excessive traffic. Next, a first determining module determines the capacity of each volume in the storage resource pool, and an allocation module proportionally allocates the total traffic limit to the corresponding traffic limit of each volume based on the volume capacity. This unified allocation eliminates the need for individual settings for each volume, avoiding the cumbersome setting process of the original solution, making it simpler and more effective. This solution sets the traffic limit of different volumes based on the capacity of all business volumes within the entire storage resource pool, ensuring the rationality of the storage resources allocated to each volume and improving the stability of the storage system.
[0088] From a hardware perspective, this embodiment provides another device for setting the maximum traffic capacity of a volume. Figure 3 A structural diagram of a volume traffic limit setting device provided in another embodiment of the present invention is shown below. Figure 3 As shown, the device for setting the upper limit of volume traffic includes: a memory 20 for storing a computer program;
[0089] The processor 21 is configured to implement, when executing a computer program, the steps of setting the volume traffic limit as described in the above embodiments.
[0090] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one of the following hardware forms: Digital Signal Processor (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an Artificial Intelligence (AI) processor, which is used to handle computational operations related to machine learning.
[0091] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 20 is used to store at least the following computer program 201, which, after being loaded and executed by the processor 21, is capable of implementing the relevant steps of the method for setting the volume traffic limit disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, and the storage method may be temporary or permanent storage. The operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include, but is not limited to, the data involved in the method for setting the volume traffic limit.
[0092] In some embodiments, the device for setting the volume's maximum traffic limit may further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
[0093] Those skilled in the art will understand that the structure shown in the figure does not constitute a limitation on the setting device for the upper limit of the volume's traffic capacity, and may include more or fewer components than shown.
[0094] The volume traffic limit setting device provided in this embodiment of the invention includes a memory and a processor. When the processor executes a program stored in the memory, it can implement the following method: a method for setting the volume traffic limit.
[0095] The volume traffic limit setting device provided in this embodiment first obtains the resource information of the storage resource pool, and then sets the total traffic limit of the storage resource pool based on the obtained resource information, thereby avoiding excessive traffic load on the storage resource pool and volumes. Next, it determines the capacity of each volume in the storage resource pool and allocates the total traffic limit proportionally to the corresponding traffic limit of each volume according to the volume capacity. This unified allocation eliminates the need for individual settings for each volume, avoiding the cumbersome setting process of the original solution, making it simpler and more effective. This solution sets the traffic limit of different volumes based on the capacity of all business volumes in the entire storage resource pool, ensuring the rationality of the storage resources allocated to each volume and improving the stability of the storage system.
[0096] Finally, the present invention also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, performs the steps described in the above method embodiments.
[0097] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0098] The computer-readable storage medium provided in this embodiment first acquires the resource information of the storage resource pool, and then sets the total workload limit of the storage resource pool based on the acquired resource information, thereby avoiding excessive workload on the storage resource pool and volumes. Next, it determines the capacity of each volume in the storage resource pool and allocates the total workload limit proportionally to the corresponding workload limit of each volume according to the volume capacity. This unified allocation eliminates the need for individual settings for each volume, avoiding the cumbersome setup process of the original solution, making it simpler and more effective. This solution sets the workload limit of different volumes based on the capacity of all business volumes within the entire storage resource pool, ensuring the rationality of the storage resources allocated to each volume and improving the stability of the storage system.
[0099] The foregoing has provided a detailed description of a method, apparatus, and medium for setting a volume's service capacity limit according to the present invention. The various embodiments in the specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make various improvements and modifications to the present invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
[0100] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the aforementioned element.
Claims
1. A method for setting the upper limit of traffic volume for a volume, characterized in that, include: Obtain resource information from the storage resource pool; Set the total service volume limit of the storage resource pool based on the resource information; Determine the capacity of each volume in the storage resource pool; The total traffic limit is allocated proportionally to the traffic limit corresponding to each volume based on the volume's capacity; wherein, the block storage layer allocates the traffic limit proportionally based on the current capacity ratio of volumes in the storage pool.
2. The method for setting the upper limit of volume traffic according to claim 1, characterized in that, After allocating the total traffic limit proportionally to the traffic limit corresponding to each volume based on the volume's capacity, the method further includes: When the number or capacity of the volumes changes, return to the step of determining the capacity of each volume in the storage resource pool.
3. The method for setting the upper limit of volume traffic according to claim 2, characterized in that, The change in the number of volumes includes at least the following situations: volume creation and volume deletion; The changes in the volume capacity include at least the following situations: volume expansion and volume reduction.
4. The method for setting the upper limit of volume traffic according to claim 1, characterized in that, After setting the total service volume limit of the storage resource pool based on the resource information, the method further includes: Identify the key business volumes that require separate limits on their own business volume. Set the corresponding service volume limit for the critical service volume according to the instructions.
5. The method for setting the upper limit of volume traffic according to claim 4, characterized in that, The step of allocating the total traffic limit proportionally to the traffic limit corresponding to each volume based on the volume's capacity includes: Obtain the difference in business volume between the total business volume limit and the business volume limit of the critical business volume; The traffic volume difference is proportionally allocated to the traffic volume caps of the other volumes besides the critical traffic volume, based on the volume's capacity.
6. The method for setting the upper limit of volume traffic according to any one of claims 1 to 5, characterized in that, The resource information includes: the performance and number of storage resource pool nodes, and the performance and number of disks.
7. The method for setting the upper limit of volume traffic according to claim 1, characterized in that, The maximum capacity of the volume includes: the maximum number of read / write operations per second and / or the maximum bandwidth.
8. A device for setting the upper limit of the volume of traffic, characterized in that, include: The acquisition module is used to acquire resource information from the storage resource pool; The setting module is used to set the total service volume limit of the storage resource pool according to the resource information. The first determining module is used to determine the capacity of each volume in the storage resource pool; The allocation module is used to allocate the total service volume limit proportionally to the service volume limit corresponding to each volume according to the capacity of the volume; wherein, the block storage layer allocates the service volume limit proportionally according to the capacity ratio of the volumes in the current storage pool.
9. A device for setting the upper limit of traffic volume for a volume, characterized in that, Includes memory used to store computer programs; A processor, configured to implement the steps of setting the volume traffic limit method as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method for setting the volume traffic limit as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for allocating capacity of storage pool
CN104731517A
Method, device for customizing volume QoS (Quality of Service) by multiple clients, and equipment and readable medium
CN113672177A