A resource scheduling method, product, device and medium
By dynamically adjusting the resource allocation ratio and priority in the RAID system, the problem that the resource allocation in the existing technology cannot meet the differentiated needs of logical volumes is solved, and the priority reconstruction of critical logical volumes is realized, thereby improving the flexibility and efficiency of the system.
Patent Information
- Application Number
- CN202510947978.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-10
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-07-10
AI Technical Summary
In existing RAID systems, resource allocation during disk failure reconstruction cannot meet the differentiated needs of different logical volumes, resulting in low reconstruction efficiency and impacting system performance and flexibility.
By obtaining the global reconstruction resource ratio and the foreground resource ratio, and combining the resource allocation weight and priority of logical volumes, the resource allocation ratio is dynamically adjusted to ensure that critical logical volumes are reconstructed first, while non-critical logical volumes are reconstructed later or with low resource consumption.
It enables the rational allocation of resources during the reconstruction process, ensures that critical logic volumes are completed first, avoids resource idleness, improves the flexibility and adaptability of the system, and balances the reconstruction process with business operations.
Smart Images

Figure CN120448076B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of storage technology, and in particular to a resource scheduling method, product, device, and medium. Background Technology
[0002] RAID (Redundant Array of Independent Disks) is a technology that combines multiple disks to improve data storage performance, reliability, and fault tolerance. RAID technology is widely used in enterprise-level storage systems, data centers, and high-availability computing environments. RAID 1, RAID 3, RAID 5, and RAID 6 provide data redundancy protection. When a disk in a RAID array fails and is replaced, the system recovers data from the other healthy disks onto the new disk, ensuring the system can continue operating—this is known as disk rebuilding. Taking a RAID 5 array with four disks as an example, if one disk fails, the data on the failed disk can be recovered using the data from the other three healthy disks through an XOR algorithm.
[0003] The rebuild process consumes significant system resources (such as CPU, memory, and I / O bandwidth) and can significantly impact ongoing business I / O operations, leading to system performance degradation. To balance resource competition between the rebuild process and business I / O, RAID systems typically support setting a rebuild rate configuration option. This allows control over resource usage during rebuilding, thus striking a balance between rebuild speed and foreground business performance. However, this approach may result in a less efficient rebuild process.
[0004] It is evident that how to rationally allocate resources to achieve excellent refactoring results and provide system flexibility is a problem that needs to be solved by those skilled in the art. Summary of the Invention
[0005] The purpose of this invention is to provide a resource scheduling method, product, device, and medium that can rationally allocate resources, resulting in excellent reconfiguration process and providing system flexibility.
[0006] Firstly, a resource scheduling method is provided, comprising: during the reconstruction of an independent disk redundant array, obtaining the global reconstruction resource ratio corresponding to the reconstruction resource pool, and obtaining the actual front-end resource ratio corresponding to the service resource pool; determining the available reconstruction resource ratio corresponding to the reconstruction resource pool based on the global reconstruction resource ratio and the front-end resource ratio; obtaining the resource allocation weight of each logical volume of the independent disk redundant array; determining the resource allocation ratio of each logical volume based on the resource allocation weight of each logical volume and the available reconstruction resource ratio; and allocating resources based on the resource allocation ratio of each logical volume.
[0007] In a preferred embodiment, the present invention can be further configured as follows: determining the available reconstruction resource ratio corresponding to the reconstruction resource pool based on the global reconstruction resource ratio and the foreground resource ratio, including: determining the elasticity coefficient and the elastic resource ratio corresponding to the elastic resource pool based on the global reconstruction resource ratio and the foreground resource ratio; and determining the available reconstruction resource ratio corresponding to the reconstruction resource pool based on the global reconstruction resource ratio, the elastic resource ratio, and the elasticity coefficient.
[0008] In a preferred embodiment, the present invention can be further configured to: determine the elasticity coefficient and the elasticity resource ratio corresponding to the elastic resource pool based on the global reconstruction resource ratio and the front-end resource ratio, including: determining the elasticity resource ratio corresponding to the elastic resource pool based on the global reconstruction resource ratio and the front-end resource ratio; determining the maximum resource limit ratio corresponding to the business resource pool based on the global reconstruction resource ratio; and determining the elasticity coefficient based on the maximum resource limit ratio and the front-end resource ratio.
[0009] In a preferred embodiment, the present invention may be further configured to include: limiting the maximum resource ratio of the front-end resource pool corresponding to the front-end business to the maximum resource limit ratio.
[0010] In a preferred embodiment, the present invention can be further configured to: obtain the actual front-end resource ratio corresponding to the service resource pool, including: obtaining the bandwidth utilization rate, cache utilization rate, and computing power utilization rate of the front-end service according to a first period; and performing a weighted calculation based on the bandwidth utilization rate, cache utilization rate, and computing power utilization rate of the front-end service to obtain the actual front-end resource ratio corresponding to the service resource pool.
[0011] In a preferred embodiment, the present invention can be further configured to: obtain the resource allocation weights of each logical volume of the independent disk redundant array, including: obtaining the priority of each logical volume of the independent disk redundant array; calculating the total priority based on the priority of each logical volume; and determining the resource allocation weight of each logical volume based on the priority corresponding to the logical volume and the total priority.
[0012] In a preferred embodiment, the present invention can be further configured to: obtain the priority of each logical volume of the independent disk redundant array, including: obtaining volume information corresponding to each logical volume, the volume information including: data importance, latency sensitivity, and data access popularity; for each logical volume, determining the priority score of the logical volume based on the data importance, latency sensitivity, and data access popularity of the logical volume; and determining the priority of the logical volume based on the preset score range in which the priority score falls.
[0013] In a preferred embodiment, the present invention can be further configured such that: the configuration record of the logical volume is provided with a first custom attribute for storing the priority of the logical volume; and the configuration record of the independent disk redundant array controller is provided with a second custom attribute for storing the global refactoring resource ratio.
[0014] In a preferred embodiment, the present invention may further include: acquiring user demand information; determining the global reconstruction resource ratio corresponding to the user demand information based on the user demand information and a mapping relationship; wherein the mapping relationship is a mapping relationship between the demand information and the global reconstruction resource ratio.
[0015] In a preferred embodiment, the present invention may be further configured to include: during the reconstruction of the independent disk redundant array, obtaining the current service load and load change rate according to the second cycle; if the current service load is greater than a preset load threshold and the load change rate is greater than a preset load change rate, then reducing the available reconstruction resource ratio and adjusting the resource allocation weight of each logical volume.
[0016] In a preferred embodiment, the present invention can be further configured such that the current service load is the current actual service load, or the service load predicted based on historical service load.
[0017] In a preferred embodiment, the present invention can be further configured to: adjust the resource allocation weights of each logical volume, including: increasing the resource allocation weight of a first logical volume by a first ratio to obtain an initial first resource allocation weight; the first logical volume is a logical volume whose resource allocation weight is greater than a first allocation weight threshold; increasing the resource allocation weight of a second logical volume by a second ratio to obtain an initial second resource allocation weight; the second logical volume is a logical volume whose resource allocation weight is greater than the second allocation weight threshold and less than the first allocation weight threshold; the first allocation weight threshold is greater than the second allocation weight threshold; the second ratio is less than the first ratio; using the resource allocation weight of a third logical volume as the corresponding initial third resource allocation weight; the third logical volume is a logical volume whose resource allocation weight is less than the second allocation weight threshold; and determining the adjusted resource allocation weights of each logical volume based on the initial first resource allocation weight, the initial second resource allocation weight, and the initial third resource allocation weight.
[0018] Secondly, a resource scheduling device is provided, comprising: a first acquisition module, configured to acquire, during the reconstruction of an independent disk redundant array, a global reconstruction resource ratio corresponding to a reconstruction resource pool, and an actual front-end resource ratio corresponding to a service resource pool; a first determination module, configured to determine the available reconstruction resource ratio corresponding to the reconstruction resource pool based on the global reconstruction resource ratio and the front-end resource ratio; a second acquisition module, configured to acquire the resource allocation weights of each logical volume of the independent disk redundant array; a second determination module, configured to determine the resource allocation ratio of each logical volume based on the resource allocation weights of each logical volume and the available reconstruction resource ratio; and an allocation module, configured to allocate resources based on the resource allocation ratios of each logical volume.
[0019] Thirdly, an electronic device is provided, the electronic device including a memory and a processor, the memory storing a computer program, the processor executing the method of any one of the first aspects when running the computer program.
[0020] Fourthly, a computer-readable storage medium is provided, wherein at least one piece of program code is stored therein, the program code being loaded and executed by a processor to implement the method as described in any of the first aspects.
[0021] Fifthly, a computer program product is provided, including a computer program or instructions that, when executed by a processor, implement the method as described in any of the first aspects.
[0022] In summary, the method provided by this invention has the following beneficial technical effects:
[0023] During the reconstruction of an independent disk redundant array, the global reconstruction resource ratio corresponding to the reconstruction resource pool and the actual front-end resource ratio corresponding to the business resource pool are first obtained. The global reconstruction resource ratio reflects the minimum resources that can be allocated during the reconstruction process, while the front-end resource ratio reflects the resources currently actually occupied by the business. Based on these two ratios, the available reconstruction resource ratio corresponding to the reconstruction resource pool is determined, enabling the reconstruction resources to be rationally allocated according to the actual business resource usage during the reconstruction process, avoiding resource idleness, and thus ensuring a balance between the reconstruction process and business operation. Furthermore, the available reconstruction resource ratio is allocated based on the resource allocation weight of each logical volume, ensuring that critical logical volumes are reconstructed before non-critical logical volumes during the reconstruction process. This allows for the rational allocation of resources according to the actual business situation and the importance and criticality of logical volumes, resulting in excellent reconstruction performance and providing system flexibility. This invention also provides a resource scheduling device, equipment, and medium, all of which have the above-mentioned technical effects. Attached Figure Description
[0024] 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.
[0025] Figure 1 This is a schematic diagram of a resource scheduling method provided in an embodiment of the present invention.
[0026] Figure 2 This is a schematic diagram of a system resource partitioning provided in an embodiment of the present invention.
[0027] Figure 3 This is a schematic diagram of a hard disk assembly provided in an embodiment of the present invention.
[0028] Figure 4 This is a schematic diagram of a RAID reconfiguration resource scheduling method based on logical volume priority differentiation provided in an embodiment of the present invention.
[0029] Figure 5 This is a schematic diagram of the structure of a resource scheduling device provided in an embodiment of the present invention.
[0030] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0031] 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.
[0032] The terms "comprising" and "having," and any variations thereof, in the specification and accompanying drawings of this invention are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may include steps or units not listed.
[0033] To enable those skilled in the art to better understand the present invention, the following explanations of technical terms are provided.
[0034] RAID (Redundant Array of Independent Disks) is a technology that improves data storage reliability, performance, or capacity by combining multiple physical disks into a single logical unit. It achieves data protection and performance enhancement through redundancy, striping, mirroring, or parity. Common RAID levels include RAID 0 / 1 / 5 / 6 / 10, etc.
[0035] A RAID controller card is a dedicated hardware device used to manage RAID (Redundant Array of Independent Disks). It acts as a bridge between the operating system and the physical disks, enabling unified management of multiple disks, either through hardware or firmware. RAID controller cards can manage disk array creation, data distribution, redundancy checking, performance optimization, and fault recovery, making them a crucial component of enterprise-level storage solutions.
[0036] Rebuild: In a RAID array, after a disk fails and is replaced, the process of restoring data from the failed disk to the new disk using existing redundant data (such as mirroring or parity information).
[0037] A drive group (DG) is a group of multiple hard drives that can be configured with different RAID levels.
[0038] A logical volume (Virtual Drive, VD) is a partition of a volume (DG). A VD can be part of a volume (DG), the entire volume (DG), or span multiple volumes (DG).
[0039] Hot spare refers to a pre-configured but not activated backup hard drive in a RAID system. When one or more hard drives in the array fail, the hot spare hard drive can automatically take over the function of the failed hard drive to ensure data availability and normal system operation.
[0040] Common RAID DDF (Disk Data Format): This specification defines a standard data structure that describes how to format data between disks in a RAID group, supporting local data migration between systems from different vendors.
[0041] Generally, the rebuild process consumes significant system resources (such as CPU, memory, and I / O bandwidth) and can significantly impact ongoing business I / O operations, leading to system performance degradation. To balance resource competition between the rebuild process and business I / O, RAID systems typically support setting a rebuild rate configuration option. By adjusting the rebuild priority, users can control resource usage during the rebuild process, thus striking a trade-off between rebuild speed and foreground business performance. For example, setting a higher rebuild priority can speed up rebuilding but may significantly impact business I / O performance; while setting a lower rebuild priority can reduce the impact on business I / O but prolong rebuild time.
[0042] Existing RAID systems typically allow users to set a global rebuild ratio for the entire RAID array. This means that when a disk in the array fails, the rebuild process for all logical volumes follows the same setting. This global control cannot meet the different rebuild priority requirements of different logical volumes, limiting the flexibility and efficiency of RAID systems when facing complex business needs.
[0043] This invention proposes a RAID reconfiguration resource scheduling method based on logical volume priority differentiation, which allows users to assign different reconfiguration priorities to logical volumes in the same RAID array, so that critical logical volumes can be reconfigured first, while non-critical logical volumes can be reconfigured later or with lower resource usage, thereby improving the flexibility and adaptability of the system.
[0044] 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.
[0045] Next, this embodiment of the invention provides a resource scheduling method, such as... Figure 1 As shown, the method provided in this embodiment of the invention can be executed by an electronic device, which is a server. This server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The resource scheduling method includes: S101, during the reconstruction of an independent disk redundant array, obtaining the global reconstruction resource ratio corresponding to the reconstruction resource pool, and obtaining the actual front-end resource ratio used by the business resource pool.
[0046] In this invention, system resources are partitioned into three zones based on the overall system resources: a reconfigurable resource pool, an elastic resource pool, and a business resource pool for front-end services, such as... Figure 2As shown. The global refactoring resource ratio refers to the initial setting of the resources used for refactoring operations in the entire standalone redundant disk array system relative to the total available resources of the system. It is the global refactoring ratio set by the user (…). ), which are the minimum resources (static guarantees) required for system refactoring: A business resource pool refers to the collection of resources allocated and managed for business I / O operation needs. The actual front-end resource usage ratio refers to the proportion of resources currently used by front-end businesses within the business resource pool relative to the total resources in the pool; it represents the actual resource utilization by front-end businesses.
[0047] Global rebuild rate (rebuild_rate, denoted as...) The minimum refactoring resource ratio (ranging from 0 to 100%) determines the minimum amount of resources the system allocates to refactoring tasks, ensuring that the system allocates at least a certain percentage of resources for refactoring regardless of business load. A higher value indicates a higher overall system resource usage rate for refactoring. Specifically, when foreground business is busy, a global refactoring ratio of 0 means that foreground business I / O is prioritized, and refactoring tasks do not use system resources.
[0048] In one feasible approach, obtaining the actual front-end resource ratio corresponding to the business resource pool includes: obtaining the bandwidth utilization, cache utilization, and computing power utilization of the front-end services according to the first cycle; and performing a weighted calculation based on the bandwidth utilization, cache utilization, and computing power utilization of the front-end services to obtain the actual front-end resource ratio corresponding to the business resource pool. Obtaining the bandwidth utilization, cache utilization, and computing power utilization of the front-end services according to the first cycle and performing a weighted calculation to obtain the actual front-end resource ratio corresponding to the business resource pool comprehensively considers the impact of multiple factors on resource utilization, making the obtained front-end resource ratio more accurate.
[0049] The first cycle is a pre-set fixed time interval used to periodically acquire data, such as every 5 minutes or every 10 minutes. Bandwidth utilization refers to the ratio of the actual network bandwidth used during front-end service operation to the total network bandwidth available from the system. It indicates the degree to which network bandwidth resources are utilized by the front-end service. For example, if the total system bandwidth is 100Mbps and the front-end service actually uses 50Mbps, the bandwidth utilization rate is 50%. Cache utilization rate refers to the ratio of the cache space occupied by the front-end service during operation to the total cache space allocated to that service by the system. It indicates the proportion of cache resources used by the front-end service. For example, if the total cache is 1GB and 500MB is occupied, the cache utilization rate is 50%. Computing power utilization rate refers to the ratio of the computing resources consumed by the front-end service in processing data to the total computing resources available from the system. It indicates the utilization of computing resources by the front-end service. For example, if the total system computing power is 1000GFLOPS and the front-end service uses 300GFLOPS, the computing power utilization rate is 30%. The actual front-end resource utilization ratio refers to the comprehensive bandwidth utilization rate, cache utilization rate, and computing power utilization rate. It is a ratio value that can comprehensively reflect the actual utilization of resources in the business resource pool by the front-end business.
[0050] By acquiring data from multiple metrics such as bandwidth utilization, cache utilization, and computing power utilization, and performing weighted calculations, we can comprehensively consider the impact of different resources on front-end services and obtain a ratio value that truly reflects the resource utilization status of front-end services.
[0051] The ratio of front-end resources actually used by the business Calculation based on real-time monitoring of front-end business resource utilization: Where BW is I / O bandwidth, Cache is cache, and CPU is computing power. , , All of these represent the percentage of current resource usage relative to total resources, specifically bandwidth utilization, cache utilization, and computing power utilization, respectively. Weighting System This is a configurable parameter, typically 0.4, 0.4, or 0.2.
[0052] S102. Determine the available reconstruction resource ratio corresponding to the reconstruction resource pool based on the global reconstruction resource ratio and the front-end resource ratio.
[0053] Among them, the ratio of available reconfigurable resources corresponding to the reconfigurable resource pool. It is the available ratio during the actual refactoring process, and this ratio is not less than the global refactoring resource ratio.
[0054] S103. Obtain the resource allocation weights of each logical volume in the independent disk redundant array.
[0055] In a RAID card, multiple physical disks can be grouped into a single hard drive group, which can then be configured using a specific RAID level. This allows for more flexible user requirements, such as... Figure 3 As shown, a hard disk group can be divided into multiple or one logical volume. Users can use different logical volumes for different purposes and store different data. Different logical volumes correspond to different resource allocation weights W, which can be specified by the user or calculated by an algorithm; this embodiment of the invention does not limit this.
[0056] S104. Determine the resource allocation ratio of each logical volume based on the resource allocation weight and available reconfigurable resource ratio of each logical volume.
[0057] S105. Allocate resources according to the resource allocation ratio of each logical volume.
[0058] Logical volume resource allocation basis Wherein, the resource allocation weight of logical volume i is The resource allocation ratio of logical volume i is ; and then based on Allocate resources to each logical volume.
[0059] As can be seen, in this embodiment of the invention, during the reconstruction of an independent disk redundant array, the global reconstruction resource ratio corresponding to the reconstruction resource pool and the actual front-end resource ratio corresponding to the business resource pool are first obtained. The global reconstruction resource ratio reflects the minimum resources that can be invested during the reconstruction process, and the front-end resource ratio reflects the resources currently actually occupied by the business. Based on these two ratios, the available reconstruction resource ratio corresponding to the reconstruction resource pool is determined, so that reconstruction resources can be reasonably allocated according to the actual business resource usage during the reconstruction process, avoiding resource idleness, thereby ensuring the balance between the reconstruction process and business operation. Furthermore, the available reconstruction resource ratio is allocated based on the resource allocation weight of each logical volume, so that critical logical volumes are reconstructed first than non-critical logical volumes during the reconstruction process. Resources can be reasonably allocated according to the actual business situation and the importance and criticality of logical volumes, resulting in excellent reconstruction process and providing system flexibility.
[0060] In one possible implementation of this invention, S102 determines the available reconstruction resource ratio corresponding to the reconstruction resource pool based on the global reconstruction resource ratio and the foreground resource ratio. This includes: determining the elasticity coefficient and the elastic resource ratio corresponding to the elastic resource pool based on the global reconstruction resource ratio and the foreground resource ratio; and determining the available reconstruction resource ratio corresponding to the reconstruction resource pool based on the global reconstruction resource ratio, the elastic resource ratio, and the elasticity coefficient. The elastic resource ratio can be dynamically adjusted based on the global reconstruction resource ratio, the elastic resource ratio, and the elasticity coefficient, making the determination of the available reconstruction resource ratio more flexible and accurate.
[0061] Specifically, the elasticity coefficient and the elasticity resource ratio corresponding to the elastic resource pool are determined based on the global reconstruction resource ratio and the front-end resource ratio. This includes: determining the elasticity resource ratio corresponding to the elastic resource pool based on the global reconstruction resource ratio and the front-end resource ratio; determining the maximum resource limit ratio corresponding to the business resource pool based on the global reconstruction resource ratio; and determining the elasticity coefficient based on the maximum resource limit ratio and the front-end resource ratio.
[0062] Specifically, the front-end business resource pool is used to process business data. This represents the maximum resource limit available to the front-end business, i.e.: The elastic resource pool consists of unused portions of the business resource pool and other idle resources, which can be dynamically allocated to refactoring tasks. The elastic resource ratio... The calculation method is as follows: Update the elasticity coefficient based on the front-end resource ratio under real-time load. This affects the allocation of resources during logical volume reconstruction. , This is the elasticity coefficient. The reconfigurable resource ratio (...) This indicates that at a specific moment, the RAID card can allocate a total of resources to the reconstruction task, which equals the reconstruction resource pool and the preemptible elastic resources. .
[0063] One possible implementation of this invention is to limit the maximum resource ratio of the front-end resource pool corresponding to the front-end business to the maximum resource limit ratio. This clearly defines the upper limit of business resource usage, preventing the business from consuming system resources without restriction during operation, thus reserving necessary resource space for resource pool reconstruction.
[0064] One possible implementation of this invention involves obtaining the resource allocation weights of each logical volume in a redundant array of independent disks, including: obtaining the priority of each logical volume in the redundant array of independent disks; calculating the total priority based on the priority of each logical volume; and determining the resource allocation weight of each logical volume based on its corresponding priority and the total priority.
[0065] Among them, the priority of logical volume reconstruction (vd_rebuild_priority, denoted as...) The priority attribute (which can be a positive integer from 0 to 100) is the priority of each logical volume and can be configured manually or calculated dynamically. The larger the value, the higher the priority.
[0066] Based on the logical volume priority, the amount of resources allocated to each logical volume during the refactoring process is dynamically adjusted. Higher-priority logical volumes will receive more resources to accelerate the refactoring process; lower-priority logical volumes will receive fewer resources to reduce the impact on business I / O. The resource allocation weights for logical volumes are as follows: .
[0067] By determining resource allocation weights based on priority and overall priority, it is possible to ensure that logical volumes with high importance and urgent resource needs receive more resources, thus achieving differentiated resource allocation.
[0068] One possible implementation of this invention involves obtaining the priority of each logical volume in an independent disk redundant array, including: obtaining volume information corresponding to each logical volume, the volume information including: data importance, latency sensitivity, and data access frequency; for each logical volume, determining the priority score of the logical volume based on the data importance, latency sensitivity, and data access frequency of the logical volume; and determining the priority of the logical volume based on the preset score range in which the priority score falls.
[0069] Data importance refers to the degree of importance of data to business operations, system stability, and data security. Users can customize the data importance of each logical volume, with a value range of 0-100. The higher the value, the more important the data in the logical volume. Latency sensitivity refers to the sensitivity of data access in a logical volume to response time. For example, transaction data requires rapid response and is very sensitive to latency; excessive latency may affect the normal operation of transactions. Offline data used for data analysis has relatively lower latency requirements, and users can customize the latency sensitivity of each logical volume, with a value range of 0-100. The higher the value, the more sensitive the data in the logical volume to latency. Data access frequency refers to the frequency of data access within a certain period. Frequently accessed data has higher access frequency, with a value range of 0-100. The higher the value, the higher the data frequency of the logical volume. Considering these three factors—data importance, latency sensitivity, and data access frequency—a numerical value is calculated using a specific method to quantify the priority of a logical volume; a higher score indicates a higher priority. A preset score range refers to a series of pre-defined score intervals, each corresponding to a priority level. For example, 0-60 points might be set as the third priority range, 61-150 points as the second priority range, and 151-300 points as the first priority range. Priority refers to the order in which logical volumes are allocated resources, processed data, etc. Higher priority logical volumes will receive more resources.
[0070] As can be seen, in this embodiment of the invention, logical volumes can be allocated and processed differently based on priority. By comprehensively considering three key factors—data importance, latency sensitivity, and data access frequency—the importance of logical volumes in the system can be reflected more accurately.
[0071] In one possible implementation of this invention, the configuration record of the logical volume is set with a first custom attribute to store the priority of the logical volume; the configuration record of the independent disk redundant array controller is set with a second custom attribute to store the global reconfiguration resource ratio. In this embodiment of the invention, it is necessary to save the reconfiguration priority attribute of the logical volume. The DDF protocol specifies the saving format of RAID card attributes, and the reconfiguration priority attribute can be added to the logical volume attributes of the DDF protocol.
[0072] The Virtual Disk Configuration Record structure specified in the DDF protocol reserves a vendor-specific Scratch Space to set the first custom attribute, as shown in Table 1.
[0073] Table 1. DDF Protocol Table for Logical Volumes
[0074]
[0075] Use the vendor-defined space and add a logical volume priority attribute, i.e., the first custom attribute, as shown in Table 2.
[0076] Table 2. Contents of vendor-specific spaces for logical volumes' DDF protocols.
[0077]
[0078] The controller attributes in the DDF protocol are shown in Table 3.
[0079] Table 3. Controller DDF Protocol Table
[0080]
[0081] Add a global refactoring ratio attribute for the controller, i.e., the second custom attribute, to Vendor_Unique_Controller_Data, as shown in Table 4.
[0082] Table 4. Contents of the vendor-specific space for the controller's DDF protocol.
[0083]
[0084] One possible implementation of this invention further includes: obtaining user demand information; determining the global reconstruction resource ratio corresponding to the user demand information based on the user demand information and the mapping relationship; the mapping relationship is a mapping relationship between the demand information and the global reconstruction resource ratio.
[0085] User demand information represents the specific requirements that users have for system resources. The mapping relationship can include: if business priority is given, the global reconstruction resource ratio is 0; if reconstruction priority is given, the global reconstruction resource ratio is 100% or a first preset value; if it is a normal setting, the global reconstruction resource ratio is a second preset value, which is less than the first preset value.
[0086] As can be seen, in this embodiment of the invention, by establishing a mapping relationship between user demand information and global reconstruction resource ratio, the system can respond more intelligently to the needs of different users, thereby improving the system's adaptability and flexibility.
[0087] One possible implementation of this invention further includes: during the reconstruction of an independent disk redundant array, obtaining the current service load and load change rate according to a second cycle; if the current service load is greater than a preset load threshold and the load change rate is greater than a preset load change rate, then reducing the available reconstruction resource ratio and adjusting the resource allocation weight of each logical volume.
[0088] The second cycle, preset load threshold, and preset load change rate can be customized, and are not limited in this embodiment of the invention. The current business load includes, but is not limited to, one or more of the following: I / O throughput (e.g., MB / s), IOPS, queue depth, CPU utilization, and memory usage; the load change rate is the percentage increase in load per unit time.
[0089] If the current business load exceeds the preset load threshold and the load change rate exceeds the preset load change rate, the global reconfiguration resource ratio can be reduced. The reduction can be achieved by decreasing the available reconfiguration resource ratio by 10% for every 10% exceeding the preset load threshold. At the same time, it is necessary to ensure that the available reconfiguration resource ratio is at least equal to the global reconfiguration resource ratio.
[0090] During the reconstruction of the independent disk redundant array, the current service load and load change rate are obtained according to the second cycle. When the current service load is greater than the preset load threshold and the load change rate is greater than the preset load change rate, the ratio of available reconstruction resources is reduced and the resource allocation weight of each logical volume is adjusted; so that when the service load is too high and changes drastically, resource allocation can be adjusted in a timely manner to ensure the stable operation of the service.
[0091] In one feasible approach, the current service load is either the actual current service load or the service load predicted based on historical service loads. A prediction model is trained using historical load data to estimate future load trends and obtain the projected current service load.
[0092] One possible implementation of this invention involves adjusting the resource allocation weights of each logical volume, including: increasing the resource allocation weight of a first logical volume by a first ratio to obtain an initial first resource allocation weight; the first logical volume is a logical volume whose resource allocation weight is greater than a first allocation weight threshold; increasing the resource allocation weight of a second logical volume by a second ratio to obtain an initial second resource allocation weight; the second logical volume is a logical volume whose resource allocation weight is greater than the second allocation weight threshold but less than the first allocation weight threshold; the first allocation weight threshold is greater than the second allocation weight threshold; the second ratio is less than the first ratio; using the resource allocation weight of a third logical volume as the corresponding initial third resource allocation weight; the third logical volume is a logical volume whose resource allocation weight is less than the second allocation weight threshold; and determining the adjusted resource allocation weights of each logical volume based on the initial first resource allocation weight, the initial second resource allocation weight, and the initial third resource allocation weight.
[0093] The adjustment rules are as follows: First logical volume (high priority): Weight > First assigned weight threshold ( According to the first ratio ( Increase weight. Second logical volume (medium priority): Second allocation weight threshold ( ) < weight ≤ According to the second ratio ( Increase weight () Third logical volume (low priority): weight ≤ The weights remain unchanged. The ultimate goal is to generate adjusted resource allocation weights to ensure that high-priority volumes receive more resources while preventing low-priority volumes from being over-compressed.
[0094] First Logical Volume: Initial First Resource Allocation Weight = Current Weight × ( Example: Current weight = 90%, R1 = 20% → Adjusted weight = 90 × 1.2 = 108%. Second logical volume: Initial second resource allocation weight = current weight × ( Third Logical Volume: Initial third resource allocation weight = current weight (remains unchanged).
[0095] Since increasing the weights may cause the sum to exceed the system resource limit (e.g., 100%), all weights need to be normalized. Calculate the total weights: , .
[0096] The resource allocation weight of the first logical volume is greater than the first allocation weight threshold, so the weight is increased by a larger first ratio to ensure that important logical volumes receive more resources; the resource allocation weight of the second logical volume is between the two thresholds, so the weight is increased by a smaller second ratio to give appropriate consideration to logical volumes of medium importance; the resource allocation weight of the third logical volume is less than the second allocation weight threshold, so the weight remains unchanged; the differentiated adjustment method can reasonably allocate resources according to the importance of logical volumes, thereby improving the rationality of resource allocation.
[0097] One possible implementation of this invention further includes: triggering a resource release process after a logical volume reconstruction is completed; identifying logical volumes whose reconstruction completion rate has reached a preset completion rate, keeping their allocated resources unchanged to reduce the impact of resource fluctuations; re-determining available reconstruction resources, and for the remaining logical volumes, re-determining the resource allocation weights based on priority, and reallocating resources accordingly. Specifically, when the system detects that the reconstruction operation of any logical volume is completed (via a status flag or event notification), it immediately triggers a resource release process; before triggering, it verifies the current completion rate of all logical volumes; it aggregates the released resources into the global resource pool; for logical volumes whose completion rate has reached a preset threshold, it keeps their original resource allocation unchanged to avoid performance fluctuations caused by reallocation. After re-determining the resources that need to be added to the remaining logical volumes, it gradually adds resources to avoid instantaneous performance fluctuations.
[0098] Based on any of the above embodiments, this invention proposes a RAID reconfiguration resource scheduling method based on logical volume priority differentiation. This method allows users to assign different reconfiguration priorities to logical volumes within the same RAID array, enabling critical logical volumes to complete reconfiguration first, while non-critical logical volumes can be reconfigured later or with lower resource usage, thereby improving system flexibility and adaptability. See also Figure 4 The specific implementation is as follows: Step 1, during system initialization, use a custom configuration command to set the reconstruction priority attributes, including the global reconstruction ratio and logical volume-based priority attributes. Alternatively, it can be loaded by reading DDF configuration information; Step 2, store the reconstruction priority attributes set in Step 1 in a custom DDF structure and save them to persistent media such as disk; Step 3, continuously monitor the triggering of reconstruction events; Step 4, after a reconstruction event is triggered, initialize the resource pool and divide the system resources into: a reconstruction resource pool, an elastic resource pool, and a front-end business resource pool. The reconstruction resource pool contains the global reconstruction ratio set by the user, the front-end business resource pool contains all other resources, and the elastic resource pool is 0; Step 5, monitor the front-end business load in real time, and every... Time-based calculation of bandwidth, cache, and CPU resource utilization; weighted calculation of front-end service resource utilization. The weights are taken as typical values. Then update the elasticity coefficient; step six, calculate the total available reconfigurable resources according to the above formula. Step 7: Calculate and reconstruct logical volume resources based on logical volume priority and weighting. Step 8: Update the resource allocation table and dynamically adjust resource allocation according to... Adjust the I / O scheduling weights and resource quotas for each logical volume.
[0099] As can be seen, the present invention relates to a reconstruction method based on RAID card logical volumes. By independently setting reconstruction priority parameters for multiple logical volumes, the hardware resources such as I / O bandwidth, cache, and computing occupied by reconstruction tasks are dynamically allocated, thereby performing differentiated reconstruction operations and enabling high-priority logical volumes to complete data recovery first.
[0100] By prioritizing refactoring at the logical volume level, the system meets diverse user needs and enhances system flexibility and adaptability. When facing complex business requirements, users can more flexibly set priorities according to the criticality of business operations on logical volumes, ensuring rapid recovery of critical business data. Independent refactoring priority parameters are configured for multiple logical volumes within the same RAID group on the RAID card, including custom parameter setting commands and metadata storage structures. Resources used for refactoring tasks are dynamically allocated based on the logical volume's refactoring priority parameters, and total refactoring resources are allocated to each logical volume. Resource utilization is optimized, balancing performance and efficiency. Flexible system resource scheduling avoids increased risk of data loss due to refactoring halts during peak business periods, while improving resource utilization during off-peak periods to prevent resource waste. The elastic resource pool design can handle sudden business traffic surges, preventing refactoring tasks from impacting core business operations.
[0101] The following describes a device provided by an embodiment of the present invention. The device described below can be referred to in correspondence with the method described above. The device of this embodiment is installed in an electronic device. Figure 5 , Figure 5 This is a structural block diagram of an apparatus according to one embodiment of the present invention, comprising: a first acquisition module 210, configured to acquire the global reconstruction resource ratio corresponding to the reconstruction resource pool and the actual front-end resource ratio corresponding to the service resource pool during independent disk redundant array reconstruction; a first determination module 220, configured to determine the available reconstruction resource ratio corresponding to the reconstruction resource pool based on the global reconstruction resource ratio and the front-end resource ratio; a second acquisition module 230, configured to acquire the resource allocation weight of each logical volume of the independent disk redundant array; a second determination module 240, configured to determine the resource allocation ratio of each logical volume based on the resource allocation weight of each logical volume and the available reconstruction resource ratio; and an allocation module 250, configured to allocate resources based on the resource allocation ratio of each logical volume.
[0102] In one possible implementation, the first determining module 220 is configured to: determine the elasticity coefficient and the elasticity ratio corresponding to the elastic resource pool based on the global reconstruction resource ratio and the front-end resource ratio; and determine the available reconstruction resource ratio corresponding to the reconstruction resource pool based on the global reconstruction resource ratio, the elasticity ratio, and the elasticity coefficient.
[0103] In one possible implementation, the first determining module 220 is configured to: determine the elastic resource ratio corresponding to the elastic resource pool based on the global reconstruction resource ratio and the front-end resource ratio; determine the maximum resource limit ratio corresponding to the business resource pool based on the global reconstruction resource ratio; and determine the elastic coefficient based on the maximum resource limit ratio and the front-end resource ratio.
[0104] In one possible implementation, the first determining module 220 is further configured to: limit the maximum resource ratio of the front-end resource pool corresponding to the front-end business to the maximum resource limit ratio.
[0105] In one possible implementation, the first acquisition module 210 is used to: acquire the bandwidth utilization rate, cache utilization rate, and computing power utilization rate of the front-end service according to the first cycle; and perform weighted calculation based on the bandwidth utilization rate, cache utilization rate, and computing power utilization rate of the front-end service to obtain the actual front-end resource ratio used by the service resource pool.
[0106] In one possible implementation, the second acquisition module 230 is configured to: acquire the priority of each logical volume of the independent disk redundant array; calculate the total priority based on the priority of each logical volume; and determine the resource allocation weight of each logical volume based on the priority of the logical volume and the total priority.
[0107] In one possible implementation, the second acquisition module 230 is used to: acquire volume information corresponding to each logical volume, the volume information including: data importance, latency sensitivity, and data access popularity; for each logical volume, determine the priority score of the logical volume based on the data importance, latency sensitivity, and data access popularity of the logical volume; and determine the priority of the logical volume based on the preset score range in which the priority score falls.
[0108] In one possible implementation, the configuration record of the logical volume has a first custom attribute set to store the logical volume's priority; the configuration record of the standalone redundant disk array controller has a second custom attribute set to store the global refactoring resource ratio.
[0109] In one possible implementation, the first acquisition module 210 is used to: acquire user demand information; determine the global reconstruction resource ratio corresponding to the user demand information based on the user demand information and the mapping relationship; the mapping relationship is the mapping relationship between the demand information and the global reconstruction resource ratio.
[0110] In one possible implementation, the system further includes an adjustment module, which, during the reconstruction of the independent disk redundant array, acquires the current business load and load change rate according to a second cycle; if the current business load is greater than a preset load threshold and the load change rate is greater than a preset load change rate, then the available reconstruction resource ratio is reduced, and the resource allocation weight of each logical volume is adjusted.
[0111] In one feasible approach, the current service load is the actual current service load, or the service load predicted based on historical service loads.
[0112] In one implementable manner, the adjustment module is configured to: increase the resource allocation weight of a first logical volume by a first ratio to obtain an initial first resource allocation weight; the first logical volume is a logical volume whose resource allocation weight is greater than the first allocation weight threshold; increase the resource allocation weight of a second logical volume by a second ratio to obtain an initial second resource allocation weight; the second logical volume is a logical volume whose resource allocation weight is greater than the second allocation weight threshold but less than the first allocation weight threshold; the first allocation weight threshold is greater than the second allocation weight threshold; the second ratio is less than the first ratio; use the resource allocation weight of a third logical volume as the corresponding initial third resource allocation weight; the third logical volume is a logical volume whose resource allocation weight is less than the second allocation weight threshold; and determine the adjusted resource allocation weights of each logical volume based on the initial first resource allocation weight, the initial second resource allocation weight, and the initial third resource allocation weight.
[0113] Figure 6 A structural diagram of an electronic device provided in an embodiment of the present invention, such as... Figure 6 As shown, the electronic device includes: a memory 60 for storing computer programs;
[0114] The processor 61 is configured to perform the steps of the method as described in the above embodiments when executing a computer program.
[0115] The processor 61 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 61 may be implemented using at least one hardware form selected from Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 61 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 61 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 61 may also include an Artificial Intelligence (AI) processor, which handles computational operations related to machine learning.
[0116] The memory 60 may include one or more computer-readable storage media, which may be non-transitory. The memory 60 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 60 is used to store at least the following computer program 601, which, after being loaded and executed by the processor 61, is capable of implementing the relevant steps of the method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 60 may also include an operating system 602 and data 603, etc., and the storage method may be temporary storage or permanent storage. The operating system 602 may include Windows, Unix, Linux, etc.
[0117] In some embodiments, the electronic device may further include a display screen 62, an input / output interface 63, a communication interface 64, a power supply 65, and a communication bus 66.
[0118] Those skilled in the art will understand that the structures shown in the figures do not constitute a limitation on the electronic device and may include more or fewer components than those shown.
[0119] 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 current technology, 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 in the various embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, magnetic disks, or optical disks, and other media capable of storing program code.
[0120] Based on this, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method described above.
[0121] Based on this, embodiments of the present invention also provide a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the above-described method.
[0122] The resource scheduling method, product, device, and medium provided by the embodiments of the present invention have been described in detail above. The various embodiments in the specification are described in a progressive manner, with each embodiment focusing on the 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 the method section.
[0123] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0124] The resource scheduling method, product, device, and medium provided by this invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this invention. It should be noted that those skilled in the art can make several improvements and modifications to this invention without departing from the principles of this invention, and these improvements and modifications also fall within the protection scope of this invention.
Claims
1. A resource scheduling method, characterized in that, include: During the reconstruction of the independent disk redundant array, the global reconstruction resource ratio corresponding to the reconstruction resource pool and the actual front-end resource ratio corresponding to the business resource pool are obtained; among them, the resource partitions that divide the overall system resources include: reconstruction resource pool, elastic resource pool, and business resource pool of front-end business. Based on the global reconstruction resource ratio and the front-end resource ratio, determine the available reconstruction resource ratio corresponding to the reconstruction resource pool; Obtain the resource allocation weights of each logical volume in the independent disk redundant array; The resource allocation ratio of each logical volume is determined based on the resource allocation weight of each logical volume and the available reconfigurable resource ratio. Resource allocation is performed based on the resource allocation ratio of each logical volume; the available reconstruction resource ratio corresponding to the reconstruction resource pool is determined based on the global reconstruction resource ratio and the foreground resource ratio, including: Based on the global reconstruction resource ratio and the front-end resource ratio, determine the elasticity coefficient and the elasticity resource ratio corresponding to the elastic resource pool; The available reconstruction resource ratio corresponding to the reconstruction resource pool is determined based on the global reconstruction resource ratio, the elastic resource ratio, and the elasticity coefficient. Based on the global reconstruction resource ratio and the front-end resource ratio, determine the elasticity coefficient and the elasticity resource ratio corresponding to the elastic resource pool, including: Based on the global reconstruction resource ratio and the front-end resource ratio, determine the elastic resource ratio corresponding to the elastic resource pool; Based on the global reconstruction resource ratio, determine the maximum resource limit ratio corresponding to the business resource pool; and determine the elasticity coefficient based on the maximum resource limit ratio and the front-end resource ratio.
2. The resource scheduling method according to claim 1, characterized in that, Also includes: The maximum resource ratio of the front-end resource pool corresponding to the front-end business is limited to the maximum resource limit ratio.
3. The resource scheduling method according to claim 1, characterized in that, Obtain the actual usage ratio of front-end resources corresponding to the business resource pool, including: According to the first cycle, obtain the bandwidth utilization, cache usage, and computing power utilization of the front-end business; The actual ratio of front-end resources used by the business resource pool is obtained by weighting the bandwidth utilization, cache utilization, and computing power utilization of the front-end business.
4. The resource scheduling method according to claim 1, characterized in that, Obtaining the resource allocation weights of each logical volume in the independent disk redundant array includes: Obtain the priority of each logical volume in the independent disk redundant array; Calculate the total priority based on the priority of each logical volume; For each logical volume, the resource allocation weight of the logical volume is determined based on the priority of the logical volume and the total priority.
5. The resource scheduling method according to claim 4, characterized in that, Obtaining the priority of each logical volume in the independent disk redundancy array includes: Obtain the volume information corresponding to each logical volume, including: data importance, latency sensitivity, and data access frequency; For each logical volume, a priority score is determined based on the data importance, latency sensitivity, and data access frequency of the logical volume; the priority of the logical volume is determined based on the preset score range in which the priority score falls.
6. The resource scheduling method according to claim 1, characterized in that, The configuration record of the logical volume has a first custom attribute set to store the priority of the logical volume; the configuration record of the independent disk redundant array controller has a second custom attribute set to store the global refactoring resource ratio.
7. The resource scheduling method according to claim 1, characterized in that, Also includes: Obtain user demand information; The global reconfiguration resource ratio corresponding to the user demand information is determined based on the user demand information and the mapping relationship; the mapping relationship is the mapping relationship between the demand information and the global reconfiguration resource ratio.
8. The resource scheduling method according to claim 7, characterized in that, Also includes: During the reconstruction of the independent disk redundant array, the current business load and load change rate are obtained according to the second cycle; If the current business load is greater than the preset load threshold and the load change rate is greater than the preset load change rate, then the available reconfigurable resource ratio will be reduced, and the resource allocation weight of each logical volume will be adjusted.
9. The resource scheduling method according to claim 8, characterized in that, The current service load refers to the actual current service load, or the service load predicted based on historical service loads.
10. The resource scheduling method according to claim 8, characterized in that, Adjust the resource allocation weights of each logical volume, including: The resource allocation weight of the first logical volume is increased by a first ratio to obtain an initial first resource allocation weight; the first logical volume is a logical volume whose resource allocation weight is greater than the first allocation weight threshold. The resource allocation weight of the second logical volume is increased according to the second ratio to obtain the initial second resource allocation weight; the second logical volume is a logical volume whose resource allocation weight is greater than the second allocation weight threshold and less than the first allocation weight threshold; the first allocation weight threshold is greater than the second allocation weight threshold; the second ratio is less than the first ratio; The resource allocation weight of the third logical volume is used as the corresponding initial third resource allocation weight; the third logical volume is a logical volume whose resource allocation weight is less than the second allocation weight threshold. Based on the initial first resource allocation weight, the initial second resource allocation weight, and the initial third resource allocation weight, the adjusted resource allocation weights for each logical volume are determined.
11. A computer program product, comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements the steps of the resource scheduling method as described in any one of claims 1 to 10.
12. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the resource scheduling method as described in any one of claims 1 to 10.
13. 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 resource scheduling method as described in any one of claims 1 to 10.
Citation Information
Patent Citations
Method and system for task allocation of reconfigurable processing system
CN108363615A
Data storage system rebuild
WO2015114643A1