A logical volume management method, apparatus, device, and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-27
- Publication Date
- 2026-08-14
AI Technical Summary
[0003]然而,上述多控存储系统的逻辑卷管理方式由于没有考虑逻辑卷的访问频度、写放大(WA,Write Amplification)等因素,常常使得domain间的负载不均衡,如由于存在写放大问题导致实际写入逻辑卷的数据大于用户需要写入逻辑卷的数据,从而影响了多控存储系统的性能
[0039] As can be seen, when this application detects that a user is creating a new logical volume, it first obtains the read/write access frequency and write amplification index of all logical volumes in each domain of the current multi-controller storage system to obtain the domain read/write access frequency and domain write amplification index. Then, it counts the number of all logical volumes in each domain to obtain the total number of logical volumes corresponding to each domain. Next, it calculates the ratio of the domain read/write access frequency and the domain write amplification index to the corresponding total number of logical volumes to obtain the volume average access frequency and volume average write amplification index of each domain. Then, it calculates the sum of the volume average access frequency and volume average write amplification index of each domain to obtain the volume average load balancing index of each domain. Finally, it determines the minimum value from all the volume average load balancing indices and distributes the new logical volume on the domain corresponding to the minimum value so as to manage the new logical volume through the domain corresponding to the minimum value. When distributing new logical volumes, this application considers two factors affecting storage system performance: read/write access frequency and write amplification index. It uses the sum of the average volume access frequency and average volume write amplification index for each domain as the average volume load balancing index for each domain. Compared to directly distributing new logical volumes to the domain with the fewest logical volumes, this application, by considering the additional data written to logical volumes during garbage collection and the access frequency (i.e., the busy level) of each logical volume, can more accurately determine the load situation of each domain. This results in a more balanced load across domains in a multi-controller storage system, thereby improving storage space utilization and enhancing the performance of the multi-controller storage system.
Smart Images

Figure CN117193663B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a logical volume management method, apparatus, device, and storage medium. Background Technology
[0002] A multi-controller storage system is a storage system composed of multiple storage devices. Each storage device may include one or more controllers and uses solid-state drives (SSDs) to store data. The SSDs use NandFlash (a non-volatile random access storage medium) as the storage medium. Currently, multi-controller storage systems typically divide all storage nodes into multiple domains for management and allocate storage space to users in real time through user-created logical volumes (LVs). When a user creates a logical volume, the multi-controller storage system first determines whether the available storage space in the current storage pool meets the user's needs. If so, it assigns a logical volume number to the storage space. Then, it counts the number of logical volumes managed by each domain in the multi-controller storage system, sorts these logical volumes, and finally selects the domain with the fewest logical volumes, assigning the user's newly created logical volume to that domain for management.
[0003] However, the logical volume management method of the aforementioned multi-controller storage system often leads to unbalanced load between domains because it does not take into account factors such as the access frequency and write amplification (WA) of the logical volume. For example, due to the write amplification problem, the actual data written to the logical volume is greater than the data that the user needs to write to the logical volume, thus affecting the performance of the multi-controller storage system. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a logical volume management method, apparatus, device, and storage medium that can more evenly distribute the load across domains in a multi-controller storage system, improve storage space utilization, and enhance the performance of the multi-controller storage system. The specific solution is as follows:
[0005] Firstly, this application discloses a logical volume management method, including:
[0006] When a user creates a new logical volume, the read / write access frequency and write amplification index of all logical volumes in each domain of the current multi-controller storage system are obtained to obtain the domain read / write access frequency and domain write amplification index.
[0007] Count the number of all logical volumes in each domain to obtain the total number of logical volumes corresponding to each domain.
[0008] Calculate the ratio of the domain read / write access frequency and the domain write amplification index to the total number of corresponding logical volumes, respectively, to obtain the volume average access frequency and volume average write amplification index for each domain;
[0009] The average volume access frequency and the average volume write amplification index of each domain are calculated separately to obtain the average volume load balancing index of each domain.
[0010] The minimum value is determined from all the volume average load balancing indices, and the new logical volume is distributed on the domain corresponding to the minimum value so as to manage the new logical volume through the domain corresponding to the minimum value.
[0011] Optionally, the logical volume management method further includes:
[0012] The write amplification index of each logical volume within each domain is calculated separately to obtain multiple volume write amplification indices for each domain.
[0013] The sum of the write amplification indices of all volumes in each domain is calculated to obtain the write amplification index of all logical volumes in each domain.
[0014] Optionally, the step of separately calculating the write amplification index for each logical volume within each of the domains includes:
[0015] The amount of data currently written by the user to each logical volume in the domain and the amount of data migrated into the corresponding logical volume in the domain during garbage collection operations are counted separately to obtain the amount of data written by the user and the amount of data migrated.
[0016] Calculate the sum of the user-written data volume and the migration data volume for each logical volume within the domain to obtain the actual written data volume;
[0017] Calculate the ratio of the actual written data volume to the user written data volume for each logical volume within the domain to obtain the write amplification index for each logical volume within the domain.
[0018] Optionally, before separately calculating the amount of data currently written by the user to each logical volume within the domain and the amount of data migrated into the corresponding logical volume within the domain during garbage collection, the method further includes:
[0019] The system calculates the current free storage space of the multi-controller storage system and determines whether the free storage space is less than a preset threshold.
[0020] If the free storage space is less than the preset threshold, the garbage collection operation is triggered.
[0021] Optionally, after distributing the new logical volume on the domain corresponding to the minimum value, the method further includes:
[0022] Count the number of all logical volumes and the frequency of read / write access within the domain corresponding to the current minimum value to obtain the current number of logical volumes and the current frequency of read / write access;
[0023] Calculate the ratio of the current read / write access frequency to the current number of logical volumes to obtain the average volume access frequency of the domain corresponding to the minimum value.
[0024] Optionally, after distributing the new logical volume on the domain corresponding to the minimum value, the method further includes:
[0025] The write amplification index is obtained by calculating the write amplification index of all logical volumes contained in the domain corresponding to the current minimum value.
[0026] Calculate the ratio of the current write amplification index to the current number of logical volumes to obtain the volume average write amplification index of the domain corresponding to the minimum value.
[0027] Optionally, determining the minimum value from all said volume average load balancing indices includes:
[0028] Sort all the volume average load balancing indices to obtain the sorted average load balancing indices.
[0029] The minimum value is determined from the sorted average load balancing index.
[0030] Secondly, this application discloses a logical volume management device, comprising:
[0031] The information acquisition module is used to obtain the read and write access frequency and write amplification index of all logical volumes in each domain of the current multi-controller storage system when it detects that a user is creating a new logical volume, so as to obtain the domain read and write access frequency and domain write amplification index.
[0032] The quantity statistics module is used to count the number of all logical volumes in each domain, and to obtain the total number of logical volumes corresponding to each domain.
[0033] The ratio calculation module is used to calculate the ratio of the domain read / write access frequency and the domain write amplification index to the corresponding total number of logical volumes, respectively, to obtain the volume average access frequency and volume average write amplification index of each domain.
[0034] The calculation module is used to calculate the sum of the volume average access frequency and the volume average write amplification index for each domain, so as to obtain the volume average load balancing index for each domain.
[0035] The minimum value determination module is used to determine the minimum value from all the volume average load balancing indices;
[0036] The logical volume distribution module is used to distribute the new logical volume on the domain corresponding to the minimum value, so as to manage the new logical volume through the domain corresponding to the minimum value.
[0037] Thirdly, this application discloses an electronic device, including a processor and a memory; wherein, when the processor executes a computer program stored in the memory, it implements the aforementioned logical volume management method.
[0038] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned logical volume management method.
[0039] As can be seen, when this application detects that a user is creating a new logical volume, it first obtains the read / write access frequency and write amplification index of all logical volumes in each domain of the current multi-controller storage system to obtain the domain read / write access frequency and domain write amplification index. Then, it counts the number of all logical volumes in each domain to obtain the total number of logical volumes corresponding to each domain. Next, it calculates the ratio of the domain read / write access frequency and the domain write amplification index to the corresponding total number of logical volumes to obtain the volume average access frequency and volume average write amplification index of each domain. Then, it calculates the sum of the volume average access frequency and volume average write amplification index of each domain to obtain the volume average load balancing index of each domain. Finally, it determines the minimum value from all the volume average load balancing indices and distributes the new logical volume on the domain corresponding to the minimum value so as to manage the new logical volume through the domain corresponding to the minimum value. When distributing new logical volumes, this application considers two factors affecting storage system performance: read / write access frequency and write amplification index. It uses the sum of the average volume access frequency and average volume write amplification index for each domain as the average volume load balancing index for each domain. Compared to directly distributing new logical volumes to the domain with the fewest logical volumes, this application, by considering the additional data written to logical volumes during garbage collection and the access frequency (i.e., the busy level) of each logical volume, can more accurately determine the load situation of each domain. This results in a more balanced load across domains in a multi-controller storage system, thereby improving storage space utilization and enhancing the performance of the multi-controller storage system. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0041] Figure 1This application discloses a flowchart of a logical volume management method.
[0042] Figure 2 This is a schematic diagram of a specific logical volume distribution disclosed in this application;
[0043] Figure 3 This application discloses a flowchart of a specific logical volume management method.
[0044] Figure 4 This is a schematic diagram of the structure of a logic volume management device disclosed in this application;
[0045] Figure 5 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0046] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0047] This application discloses a logical volume management method. See also Figure 1 As shown, the method includes:
[0048] Step S11: When a user creates a new logical volume, obtain the read / write access frequency and write amplification index of all logical volumes in each domain of the current multi-controller storage system to obtain the domain read / write access frequency and domain write amplification index.
[0049] The logical volume management scheme proposed in this application is applied to a multi-controller storage system. When a user creates a new logical volume, the read / write access frequency and write amplification index of all logical volumes in each domain of the current system are first obtained. This yields the read / write access frequency (accessCount_0, accessCount_1, accessCount_2, accessCount_3, ..., accessCount_K) and write amplification index (WA_1, WA_2, WA_3, ..., WA_K) for each domain, i.e., the domain read / write access frequency and the domain write amplification index. Here, K is the total number of domains in the multi-controller storage system.
[0050] It should be noted that before obtaining the read / write access frequency and write amplification index of all logical volumes in each domain of the current multi-controller storage system, the process specifically includes: calculating the write amplification index of each logical volume in each domain to obtain multiple volume write amplification indices for each domain; and calculating the sum of the write amplification indices of all volumes in each domain to obtain the write amplification index of all logical volumes in each domain. In this embodiment, the multi-controller storage system statistically analyzes the write amplification index of each logical volume in each domain in real time, obtaining multiple volume write amplification indices wa_0, wa_1, wa_2, ..., wa_k for each domain. Then, it calculates the sum of the write amplification indices of all volumes in each domain, i.e., WA_i = wa_1 + wa_2 + ... + wa_k, where k is the total number of logical volumes in the i-th domain. This yields the write amplification index of all logical volumes in each domain. In other words, the write amplification index of each logical volume in a single domain is calculated first, and then the write amplification indices of all logical volumes in a single domain are summed. In this way, when a user creates a new logical volume, the read / write access frequency and write amplification index of all logical volumes in the current domain can be directly read.
[0051] Specifically, the step of separately calculating the write amplification index of each logical volume in each domain may include: separately calculating the amount of data currently written by the user to each logical volume in the domain and the amount of data migrated into the corresponding logical volume in the domain during garbage collection operations, to obtain the amount of user-written data and the amount of migrated data; and separately calculating the sum of the amount of user-written data and the amount of migrated data for each logical volume in the domain to obtain the actual amount of written data.
[0052] Calculate the ratio of the actual written data volume to the user written data volume for each logical volume within the domain to obtain the write amplification index for each logical volume within the domain.
[0053] In this embodiment, considering the write amplification problem caused by garbage collection during the operation of a multi-controller storage system, which results in additional data being written to the logical volume during garbage collection, the actual data written to the logical volume exceeds the data that the user needs to write. To address this issue, this embodiment first calculates the amount of data currently written by the user to each logical volume within the domain and the amount of data migrated into the corresponding logical volume within the domain during garbage collection, obtaining the user-written data amount and the migrated data amount. Then, it calculates the sum of the user-written data amount and the migrated data amount for each logical volume within the domain to obtain the actual data written to each logical volume. Finally, it calculates the ratio of the actual data written to each logical volume within the domain to the user-written data amount, thereby obtaining the write amplification index for each logical volume within the domain. The specific calculation formula is: wa_k = (data written to the volume by the user + data written to the logical volume during garbage collection) / data written to the volume by the user).
[0054] It is understood that before separately calculating the amount of data currently written by the user to each logical volume in the domain and the amount of data migrated into the corresponding logical volume in the domain during garbage collection, the method further includes: calculating the free storage space of the current multi-controller storage system and determining whether the free storage space is less than a preset threshold; if the free storage space is less than the preset threshold, then the garbage collection operation is triggered.
[0055] In this embodiment, the multi-controller storage system will count the free storage space in the current system in real time during operation and determine whether the free storage space is less than a preset threshold. If the free storage space in the current system is less than the preset threshold, a garbage collection operation will be triggered.
[0056] Step S12: Count the number of all logical volumes in each domain to obtain the total number of logical volumes corresponding to each domain.
[0057] In this embodiment, the read / write access frequency and write amplification index of all logical volumes in each domain of the current multi-controller storage system are obtained respectively. After obtaining the domain read / write access frequency and domain write amplification index, the number of all logical volumes contained in each of the above domains is counted to obtain the total number of logical volumes corresponding to each domain, disk_count_i.
[0058] Step S13: Calculate the ratio of the domain read / write access frequency and the domain write amplification index to the total number of corresponding logical volumes, respectively, to obtain the volume average access frequency and volume average write amplification index of each domain.
[0059] In this embodiment, after obtaining the domain read / write access frequency, the domain write amplification index, and the total number of logical volumes for each domain, the ratio of the domain read / write access frequency to the corresponding total number of logical volumes, and the ratio of the domain write amplification index to the corresponding total number of logical volumes are further calculated. That is, the average volume access frequency and volume write amplification index for each domain are calculated, thereby obtaining the average volume access frequency avg_accessCount_i and the average volume write amplification index avgWA_i for each domain. Specifically, the formula for calculating the average volume access frequency avg_accessCount_i is: avg_accessCount_i = accessCount_i / disk_count_i, i = 0, 1, 2, 3…; the formula for calculating the average volume write amplification index avgWA_i is: avgWA_i = WA_i / disk_count_i, i = 0, 1, 2, 3….
[0060] Step S14: Calculate the sum of the volume average access frequency and the volume average write amplification index for each domain to obtain the volume average load balancing index for each domain.
[0061] In this embodiment, after obtaining the average volume access frequency and average volume write amplification index for each domain, the average volume access frequency and average volume write amplification index for each domain are summed, and the summation result is used as the average volume load balancing index Balance_i for each domain. Specifically, the formula for calculating the average volume load balancing index Balance_i is: Balance_i = avg_accessCount_i + avgWA_i.
[0062] Step S15: Determine the minimum value from all the volume average load balancing indices, and distribute the new logical volume on the domain corresponding to the minimum value, so as to manage the new logical volume through the domain corresponding to the minimum value.
[0063] In this embodiment, after obtaining the volume average load balancing index of each domain, the minimum value among the volume average load balancing indices is determined, that is, the domain with the lowest current load. Then, the new logical volumes are distributed on the domains corresponding to the minimum value, thereby managing the new logical volumes through the domains corresponding to the minimum value.
[0064] Specifically, determining the minimum value from all the volume average load balancing indices and distributing the new logical volumes on the domain corresponding to the minimum value may include: determining the minimum value among all the volume average load balancing indices, numbering the new logical volumes to obtain numbered new logical volumes; and distributing the numbered new logical volumes on the domain corresponding to the minimum value. For example, see... Figure 2 As shown, the load balancing index for each domain is calculated, and then the domain with the lowest load balancing index (domain 1) is selected. Next, the new logical volume is numbered. Since volumes 0, 1, 2, and 3 already exist, the new logical volume can be numbered as volume 4, and distributed across domain 1. That is, volume 4 is created on domain 1, and the new logical volume is distributed across this volume. Numbering the new logical volumes facilitates subsequent management of logical volumes within each domain of the multi-controller storage system.
[0065] As can be seen, in this embodiment of the application, when a user creates a new logical volume, the read / write access frequency and write amplification index of all logical volumes in each domain of the current multi-controller storage system are first obtained to obtain the domain read / write access frequency and domain write amplification index. Then, the number of all logical volumes in each domain is counted to obtain the total number of logical volumes corresponding to each domain. Next, the ratio of the domain read / write access frequency and the domain write amplification index to the corresponding total number of logical volumes is calculated to obtain the volume average access frequency and volume average write amplification index of each domain. Then, the sum of the volume average access frequency and volume average write amplification index of each domain is calculated to obtain the volume average load balancing index of each domain. Finally, the minimum value is determined from all the volume average load balancing indices, and the new logical volume is distributed on the domain corresponding to the minimum value so as to manage the new logical volume through the domain corresponding to the minimum value. In this embodiment, when distributing new logical volumes, both read / write access frequency and write amplification index, which affect storage system performance, are considered. The sum of the average volume access frequency and average volume write amplification index of each domain is used as the average volume load balancing index of each domain. Compared to directly distributing new logical volumes on the domain with the fewest logical volumes, this embodiment, by considering the additional data written to logical volumes during garbage collection and the access frequency (i.e., the busy level) of each logical volume, can more accurately determine the load of each domain. This makes the load of each domain in the multi-controller storage system more balanced, thereby improving the utilization of storage space and enhancing the performance of the multi-controller storage system.
[0066] This application discloses a specific logical volume management method. See also Figure 3 As shown, the method includes:
[0067] Step S201: When a user creates a new logical volume, obtain the read / write access frequency and write amplification index of all logical volumes in each domain of the current multi-controller storage system to obtain the domain read / write access frequency and domain write amplification index.
[0068] Step S202: Count the number of all logical volumes in each domain to obtain the total number of logical volumes corresponding to each domain.
[0069] Step S203: Calculate the ratio of the domain read / write access frequency and the domain write amplification index to the total number of corresponding logical volumes, respectively, to obtain the volume average access frequency and volume average write amplification index of each domain.
[0070] Step S204: Calculate the sum of the volume average access frequency and the volume average write amplification index for each domain to obtain the volume average load balancing index for each domain.
[0071] Step S205: Sort all the volume average load balancing indices to obtain the sorted average load balancing indices.
[0072] In this embodiment, after calculating the sum of the volume average access frequency and the volume average write amplification index of each domain to obtain the volume average load balancing index of each domain, all the above-mentioned volume average load balancing indices are sorted, such as sorting all domains in ascending order according to the volume average load balancing index of each domain to obtain the sorted average load balancing index.
[0073] Step S206: Determine the minimum value from the sorted average load balancing index, and distribute the new logical volume on the domain corresponding to the minimum value, so as to manage the new logical volume through the domain corresponding to the minimum value.
[0074] In this embodiment, after sorting all the volume average load balancing indices, the minimum value is determined from the sorted average load balancing indices, that is, the domain with the lowest current load. Then, the new logical volumes are distributed on the domains corresponding to the minimum value, thereby managing the new logical volumes through the domains corresponding to the minimum value.
[0075] Step S207: Count the number of all logical volumes and the frequency of read / write access within the domain corresponding to the current minimum value to obtain the current number of logical volumes and the current frequency of read / write access.
[0076] Furthermore, after the new logical volume is distributed on the domain corresponding to the minimum value, since a new logical volume has been added to the domain corresponding to the minimum value, that is, the number of logical volumes has changed. Therefore, the average access frequency of the volumes in the domain corresponding to the minimum value has also changed. Specifically, the number of logical volumes and the read / write access frequency of all logical volumes contained in the domain corresponding to the minimum value are counted to obtain the current number of logical volumes and the current read / write access frequency.
[0077] Step S208: Calculate the ratio of the current read / write access frequency to the current number of logical volumes to obtain the average volume access frequency of the domain corresponding to the minimum value.
[0078] In this embodiment, after counting the number of all logical volumes and their read / write access frequencies within the domain corresponding to the current minimum value, the ratio of the current read / write access frequency to the current number of logical volumes is calculated to obtain the average access frequency (avg_accessCount) of the domain corresponding to the minimum value. For example, when the domain corresponding to the minimum value is domain 1, then avg_accessCount = access_count_1 / (disk_count_1 + 1).
[0079] Step S209: Calculate the write amplification index of all logical volumes contained in the domain corresponding to the current minimum value to obtain the current write amplification index.
[0080] Understandably, when the number of logical volumes changes, the average write amplification index of the domain corresponding to the current minimum value also changes. Specifically, the write amplification index of all logical volumes contained in the domain corresponding to the current minimum value is calculated to obtain the current write amplification index avgWA_1. For example, when the domain corresponding to the minimum value is domain 1, then avgWA_1 = WA_1 / (disk_count_1 + 1).
[0081] Step S210: Calculate the ratio of the current write amplification index to the current number of logical volumes to obtain the volume average write amplification index of the domain corresponding to the minimum value.
[0082] In this embodiment, after calculating the write amplification index of all logical volumes contained in the domain corresponding to the current minimum value to obtain the current write amplification index, the ratio of the current write amplification index to the current number of logical volumes is further calculated to obtain the volume average write amplification index of the domain corresponding to the minimum value.
[0083] For more detailed processing procedures of steps S21 to S24, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.
[0084] As can be seen, in the embodiments of this application, during the process of users writing data, the multi-controller storage system counts the access frequency and write amplification index of each logical volume in each domain in real time. When users create new logical volumes, the multi-controller storage system calculates the volume average access frequency and volume average write amplification index of each domain, and calculates the volume average load balancing index of each domain accordingly. Then, the volume average load balancing index of each domain is sorted, and the new logical volumes are distributed to the domain with the smallest volume average load balancing index, thereby making the load of each domain more balanced, improving the utilization of storage space, and making more effective use of storage space.
[0085] Accordingly, embodiments of this application also disclose a logical volume management device, see [link to relevant documentation]. Figure 4As shown, the device includes:
[0086] Information acquisition module 11 is used to acquire the read and write access frequency and write amplification index of all logical volumes in each domain of the current multi-controller storage system when it detects that a user is creating a new logical volume, so as to obtain the domain read and write access frequency and domain write amplification index.
[0087] The quantity statistics module 12 is used to count the number of all logical volumes in each domain, and to obtain the total number of logical volumes corresponding to each domain.
[0088] The ratio calculation module 13 is used to calculate the ratio of the domain read / write access frequency and the domain write amplification index to the corresponding total number of logical volumes, respectively, to obtain the volume average access frequency and volume average write amplification index of each domain.
[0089] The calculation module 14 is used to calculate the sum of the volume average access frequency and the volume average write amplification index for each domain, so as to obtain the volume average load balancing index for each domain.
[0090] Minimum value determination module 15 is used to determine the minimum value from all the volume average load balancing indices;
[0091] The logical volume distribution module 16 is used to distribute the new logical volume on the domain corresponding to the minimum value, so as to manage the new logical volume through the domain corresponding to the minimum value.
[0092] The specific workflow of each of the above modules can be found in the relevant content disclosed in the foregoing embodiments, and will not be repeated here.
[0093] As can be seen, in this embodiment of the application, when a user creates a new logical volume, the read / write access frequency and write amplification index of all logical volumes in each domain of the current multi-controller storage system are first obtained to obtain the domain read / write access frequency and domain write amplification index. Then, the number of all logical volumes in each domain is counted to obtain the total number of logical volumes corresponding to each domain. Next, the ratio of the domain read / write access frequency and the domain write amplification index to the corresponding total number of logical volumes is calculated to obtain the volume average access frequency and volume average write amplification index of each domain. Then, the sum of the volume average access frequency and volume average write amplification index of each domain is calculated to obtain the volume average load balancing index of each domain. Finally, the minimum value is determined from all the volume average load balancing indices, and the new logical volume is distributed on the domain corresponding to the minimum value so as to manage the new logical volume through the domain corresponding to the minimum value. In this embodiment, when distributing new logical volumes, both read / write access frequency and write amplification index, which affect storage system performance, are considered. The sum of the average volume access frequency and average volume write amplification index of each domain is used as the average volume load balancing index of each domain. Compared to directly distributing new logical volumes on the domain with the fewest logical volumes, this embodiment, by considering the additional data written to logical volumes during garbage collection and the access frequency (i.e., the busy level) of each logical volume, can more accurately determine the load of each domain. This makes the load of each domain in the multi-controller storage system more balanced, thereby improving the utilization of storage space and enhancing the performance of the multi-controller storage system.
[0094] In some specific embodiments, the logical volume management device may further include:
[0095] The first statistical unit is used to calculate the write amplification index of each logical volume in each domain, thereby obtaining multiple volume write amplification indices for each domain.
[0096] The first sum calculation unit is used to calculate the sum of the write amplification indices of all volumes in each of the domains, so as to obtain the write amplification index of all logical volumes in each domain.
[0097] In some specific embodiments, the first statistical unit may specifically include:
[0098] The second statistical unit is used to count the amount of data currently written by the user to each logical volume in the domain and the amount of data migrated into the corresponding logical volume in the domain during garbage collection operations, so as to obtain the amount of data written by the user and the amount of data migrated.
[0099] The second sum calculation unit is used to calculate the sum of the user-written data volume and the migration data volume corresponding to each logical volume in the domain, respectively, to obtain the actual written data volume.
[0100] The first ratio calculation unit is used to calculate the ratio of the actual written data volume to the user written data volume for each logical volume in the domain, so as to obtain the write amplification index for each logical volume in the domain.
[0101] In some specific embodiments, the system may further include the following before the second statistical unit:
[0102] The third statistical unit is used to count the free storage space of the current multi-controller storage system.
[0103] The judgment unit is used to determine whether the free storage space is less than a preset threshold.
[0104] The garbage collection unit is used to trigger the garbage collection operation if the free storage space is less than the preset threshold.
[0105] In some specific embodiments, after the logical volume distribution module 16, the system may further include:
[0106] The fourth statistical unit is used to count the number of all logical volumes and the frequency of read / write access within the domain corresponding to the current minimum value, so as to obtain the current number of logical volumes and the current frequency of read / write access.
[0107] The second ratio calculation unit is used to calculate the ratio of the current read / write access frequency to the current number of logical volumes, and to obtain the average volume access frequency of the domain corresponding to the minimum value.
[0108] In some specific embodiments, after the logical volume distribution module 16, the system may further include:
[0109] The fifth statistical unit is used to calculate the write amplification index of all logical volumes contained in the domain corresponding to the current minimum value, and obtain the current write amplification index.
[0110] The third ratio calculation unit is used to calculate the ratio of the current write amplification index to the current number of logical volumes, and to obtain the volume average write amplification index of the field corresponding to the minimum value.
[0111] In some specific embodiments, the minimum value determination module 15 may specifically include:
[0112] A sorting unit is used to sort all the volume average load balancing indices to obtain the sorted average load balancing indices.
[0113] The minimum value determination unit is used to determine the minimum value from the sorted average load balancing index.
[0114] Furthermore, embodiments of this application also disclose an electronic device, Figure 5This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0115] Figure 5 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the logical volume management method disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0116] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0117] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0118] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the logical volume management method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.
[0119] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed logical volume management method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0120] The various embodiments in this 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.
[0121] 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 implementation should not be considered beyond the scope of this application.
[0122] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0123] Finally, it should be noted that in this document, 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 said element.
[0124] The above provides a detailed description of a logical volume management method, apparatus, device, and medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A logical volume management method, characterized in that, include: When a user creates a new logical volume, the read / write access frequency and write amplification index of all logical volumes in each domain of the current multi-controller storage system are obtained to obtain the domain read / write access frequency and domain write amplification index. Count the number of all logical volumes in each domain to obtain the total number of logical volumes corresponding to each domain. Calculate the ratio of the domain read / write access frequency and the domain write amplification index to the total number of corresponding logical volumes, respectively, to obtain the volume average access frequency and volume average write amplification index for each domain; The average volume access frequency and the average volume write amplification index of each domain are calculated separately to obtain the average volume load balancing index of each domain. The minimum value is determined from all the volume average load balancing indices, and the new logical volume is distributed on the domain corresponding to the minimum value so as to manage the new logical volume through the domain corresponding to the minimum value.
2. The logical volume management method according to claim 1, characterized in that, Also includes: The write amplification index of each logical volume within each domain is calculated separately to obtain multiple volume write amplification indices for each domain. The sum of the write amplification indices of all volumes in each domain is calculated to obtain the write amplification index of all logical volumes in each domain.
3. The logical volume management method according to claim 2, characterized in that, The step of separately calculating the write amplification index for each logical volume within each of the domains includes: The amount of data currently written by the user to each logical volume in the domain and the amount of data migrated into the corresponding logical volume in the domain during garbage collection operations are counted separately to obtain the amount of data written by the user and the amount of data migrated. Calculate the sum of the user-written data volume and the migration data volume for each logical volume within the domain to obtain the actual written data volume; Calculate the ratio of the actual written data volume to the user written data volume for each logical volume within the domain to obtain the write amplification index for each logical volume within the domain.
4. The logical volume management method according to claim 3, characterized in that, Before separately calculating the amount of data currently written by the user to each logical volume within the domain and the amount of data migrated into the corresponding logical volume within the domain during garbage collection, the method further includes: The system calculates the current free storage space of the multi-controller storage system and determines whether the free storage space is less than a preset threshold. If the free storage space is less than the preset threshold, the garbage collection operation is triggered.
5. The logical volume management method according to claim 1, characterized in that, After distributing the new logical volume on the domain corresponding to the minimum value, the method further includes: Count the number of all logical volumes and the frequency of read / write access within the domain corresponding to the current minimum value to obtain the current number of logical volumes and the current frequency of read / write access; Calculate the ratio of the current read / write access frequency to the current number of logical volumes to obtain the average volume access frequency of the domain corresponding to the minimum value.
6. The logical volume management method according to claim 5, characterized in that, After distributing the new logical volume on the domain corresponding to the minimum value, the method further includes: The write amplification index is obtained by calculating the write amplification index of all logical volumes contained in the domain corresponding to the current minimum value. Calculate the ratio of the current write amplification index to the current number of logical volumes to obtain the volume average write amplification index of the domain corresponding to the minimum value.
7. The logical volume management method according to any one of claims 1 to 6, characterized in that, The step of determining the minimum value from all said volume average load balancing indices includes: Sort all the volume average load balancing indices to obtain the sorted average load balancing indices. The minimum value is determined from the sorted average load balancing index.
8. A logical volume management device, characterized in that, include: The information acquisition module is used to obtain the read and write access frequency and write amplification index of all logical volumes in each domain of the current multi-controller storage system when it detects that a user is creating a new logical volume, so as to obtain the domain read and write access frequency and domain write amplification index. The quantity statistics module is used to count the number of all logical volumes in each domain, and to obtain the total number of logical volumes corresponding to each domain. The ratio calculation module is used to calculate the ratio of the domain read / write access frequency and the domain write amplification index to the corresponding total number of logical volumes, respectively, to obtain the volume average access frequency and volume average write amplification index of each domain. The calculation module is used to calculate the sum of the volume average access frequency and the volume average write amplification index for each domain, so as to obtain the volume average load balancing index for each domain. The minimum value determination module is used to determine the minimum value from all the volume average load balancing indices; The logical volume distribution module is used to distribute the new logical volume on the domain corresponding to the minimum value, so as to manage the new logical volume through the domain corresponding to the minimum value.
9. An electronic device, characterized in that, It includes a processor and a memory; wherein, when the processor executes a computer program stored in the memory, it implements the logical volume management method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the logical volume management method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Storage space management method and system, electronic equipment and storage medium
CN111124283A
Storage logical volume management method and device and related component
CN112269543A