Bandwidth resource allocation method, device, equipment and storage medium of storage system

文档序号:1860764 发布日期:2021-11-19 浏览:4次 中文

阅读说明:本技术 存储系统的带宽资源分配方法、装置、设备及存储介质 (Bandwidth resource allocation method, device, equipment and storage medium of storage system ) 是由 王勇 于 2021-07-15 设计创作,主要内容包括:本申请公开了一种存储系统的带宽资源分配方法,将存储系统的带宽资源在多个逻辑卷之间进行有效的分配,首先为每个逻辑卷设置对应的预设比例,在分配带宽资源时,如果逻辑卷的需求大,则无论系统繁忙或者空闲都保证该逻辑卷得到不低于预设比例的带宽资源,相反,如果逻辑卷的需求较小或者无需求,则把这部分空闲带宽资源给分配其他有需求的逻辑卷,最终达到尽可能的将可用带宽资源分配给有实际需求的逻辑卷的目的,保证有需求的逻辑卷能够得到足够的带宽资源,同时显著提升存储系统带宽资源的利用率,减少系统带宽资源的闲置。此外,本申请还提供了一种存储系统的带宽资源分配装置、设备及可读存储介质,其技术效果与上述方法的技术效果相对应。(The application discloses a bandwidth resource allocation method of a storage system, which is characterized in that bandwidth resources of the storage system are effectively allocated among a plurality of logical volumes, a corresponding preset proportion is firstly set for each logical volume, when the bandwidth resources are allocated, if the demand of the logical volumes is large, the logical volumes are guaranteed to obtain the bandwidth resources which are not lower than the preset proportion no matter the system is busy or idle, on the contrary, if the demand of the logical volumes is small or no demand exists, the idle bandwidth resources are distributed to other logical volumes with demands, and finally, the purpose of allocating the available bandwidth resources to the logical volumes with actual demands as far as possible is achieved, the logical volumes with demands can obtain enough bandwidth resources, meanwhile, the utilization rate of the bandwidth resources of the storage system is obviously improved, and the idle of the bandwidth resources of the system is reduced. In addition, the application also provides a bandwidth resource allocation device, equipment and a readable storage medium of the storage system, and the technical effect corresponds to that of the method.)

1. A method for allocating bandwidth resources of a storage system, comprising:

setting a corresponding preset proportion for each logical volume of the storage system;

determining the bandwidth resources of the preset proportion which are expected to be allocated to each logical volume according to the preset proportion and the available bandwidth resources of the storage system in unit time;

when bandwidth resources are allocated to a logical volume of bandwidth resources to be occupied, judging whether the bandwidth resources in the preset proportion meet the requirements of the logical volume;

if yes, allocating the bandwidth resources with the preset proportion to the logical volume;

and if the bandwidth resources do not meet the requirement, allocating the bandwidth resources with the preset proportion and the bandwidth resources of the target logical volume to the logical volume so as to meet the requirement of the logical volume, wherein the target logical volume is a logical volume which borrows the bandwidth resources of the logical volume in the last T units of time and/or a logical volume which does not occupy the bandwidth resources in the longest time in the last T units of time.

2. The method according to claim 1, wherein the allocating the preset ratio of the bandwidth resource to the target logical volume to meet the demand of the logical volume, wherein the target logical volume is a logical volume borrowed from the logical tape bandwidth resource in the past T units of time and/or a logical volume not occupying the bandwidth resource for the longest time in the past T units of time, comprises:

judging whether a first target logical volume exists, wherein the first target logical volume is a logical volume borrowing the logical tape bandwidth resource in the past T unit time;

if a first target logical volume exists, allocating the bandwidth resources of the preset proportion and the bandwidth resources of the first target logical volume to the logical volume so as to meet the requirement of the logical volume;

if a first target logical volume does not exist or the bandwidth resources in the preset proportion and the bandwidth resources of the first target logical volume cannot meet the requirement of the logical volume, judging whether a second target logical volume exists, wherein the second target logical volume is a logical volume which does not occupy the bandwidth resources for the longest time within the past T unit time;

if a second target logical volume exists, allocating the bandwidth resource of the preset proportion and the bandwidth resource of the second target logical volume to the logical volume, or allocating the bandwidth resource of the preset proportion, the bandwidth resource of the first target logical volume and the bandwidth resource of the second target logical volume to the logical volume, so as to meet the requirement of the logical volume.

3. The method of claim 2, wherein after the determining whether the first target logical volume exists, further comprising:

if a plurality of first target logical volumes exist, sequentially selecting the first target logical volumes from the plurality of first target logical volumes according to the borrowing time from morning to evening, and allocating the bandwidth resources of the selected first target logical volume to the logical volume until the demand of the logical volume is met or the first target logical volume which is not selected does not exist.

4. The method according to claim 2, wherein after allocating the preset proportion of the bandwidth resource and the bandwidth resource of the second target logical volume to the logical volume, or allocating the preset proportion of the bandwidth resource, the bandwidth resource of the first target logical volume and the bandwidth resource of the second target logical volume to the logical volume, the method further comprises:

generating a borrowing record between the logical volume and the second target logical volume;

correspondingly, after allocating the bandwidth resource of the preset proportion and the bandwidth resource of the first target logical volume to the logical volume, the method further includes:

and canceling the account of the borrowing record between the logical volume and the first target logical volume.

5. The method of claim 4, wherein after the generating the borrowing record between the logical volume and the second target logical volume, further comprising:

and when the existence time of the borrowing record exceeds T unit time, the borrowing record is cancelled.

6. The method according to any one of claims 1 to 6, wherein when allocating bandwidth resources for the logical volume of bandwidth resources to be occupied, further comprising:

acquiring a target queue, and determining a logical volume located at the head of the target queue to serve as a logical volume of a next bandwidth resource to be allocated, wherein the target queue is used for recording the logical volume of the bandwidth resource to be occupied, and the arrangement sequence of the logical volumes in the target queue is as follows: the logical volume borrowed with the bandwidth resource is in front, and the logical volume occupying the bandwidth resource is in back due to self requirements.

7. The method according to claim 6, wherein if there are a plurality of the logical volumes borrowed with bandwidth resources or a plurality of the logical volumes waiting to occupy bandwidth resources due to their own needs, then the logical volumes are arranged in the target queue in the order of: the longer the past T units of time without occupied bandwidth resources, the earlier.

8. A bandwidth resource allocation apparatus of a storage system, comprising:

the proportion setting module is used for setting a corresponding preset proportion for each logical volume of the storage system;

a quasi-allocation module, configured to determine, according to the preset proportion and available bandwidth resources of the storage system in unit time, bandwidth resources of the preset proportion that are expected to be allocated to each logical volume;

the judging module is used for judging whether the bandwidth resources in the preset proportion meet the requirements of the logical volume when the bandwidth resources are allocated to the logical volume of the bandwidth resources to be occupied;

the first allocation module is used for allocating the bandwidth resources in the preset proportion to the logical volume when the bandwidth resources in the preset proportion meet the requirements of the logical volume;

and a second allocating module, configured to allocate, when the bandwidth resource in the preset proportion does not meet the requirement of the logical volume, the bandwidth resource in the preset proportion and a bandwidth resource of a target logical volume to meet the requirement of the logical volume, where the target logical volume is a logical volume that has borrowed the logical tape bandwidth resource in the past T units of time and/or a logical volume that has not occupied the bandwidth resource for the longest time in the past T units of time.

9. A bandwidth resource allocation apparatus of a storage system, comprising:

a memory: for storing a computer program;

a processor: for executing the computer program to implement the bandwidth resource allocation method of the storage system according to any one of claims 1 to 7.

10. A readable storage medium for storing a computer program which, when executed by a processor, is adapted to implement the method of allocating bandwidth resources of a storage system according to any one of claims 1 to 7.

Technical Field

The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a readable storage medium for allocating bandwidth resources of a storage system.

Background

The bandwidth of the storage system belongs to shared resources, which generally need to be allocated among a plurality of logical volumes, and meanwhile, the bandwidth resources have a time-efficient property, and each unit time has a certain total amount of bandwidth, which can only be consumed at that time. In order to ensure that each logical volume can occupy system bandwidth resources, a common allocation means is a mode of limiting the maximum usage amount, so as to avoid that other logical volumes cannot occupy the bandwidth resources due to excessive consumption of the bandwidth resources by individual logical volumes, but the allocation formula can limit the maximum usage amount of the system bandwidth resources on one hand, and cannot ensure that each logical volume can occupy sufficient bandwidth resources when needed on the other hand.

It is therefore an urgent need to solve the above-mentioned problems by providing a scheme for allocating bandwidth resources in a storage system, which avoids the above-mentioned disadvantages.

Disclosure of Invention

The present application aims to provide a method, an apparatus, a device and a readable storage medium for allocating bandwidth resources of a storage system, so as to solve the problem that the current bandwidth resource allocation scheme not only limits the maximum utilization rate of the bandwidth resources, but also cannot ensure that a logical volume in need of the bandwidth resources obtains sufficient bandwidth resources. The specific scheme is as follows:

in a first aspect, the present application provides a method for allocating bandwidth resources of a storage system, including:

setting a corresponding preset proportion for each logical volume of the storage system;

determining the bandwidth resources of the preset proportion which are expected to be allocated to each logical volume according to the preset proportion and the available bandwidth resources of the storage system in unit time;

when bandwidth resources are allocated to a logical volume of bandwidth resources to be occupied, judging whether the bandwidth resources in the preset proportion meet the requirements of the logical volume;

if yes, allocating the bandwidth resources with the preset proportion to the logical volume;

and if the bandwidth resources do not meet the requirement, allocating the bandwidth resources with the preset proportion and the bandwidth resources of the target logical volume to the logical volume so as to meet the requirement of the logical volume, wherein the target logical volume is a logical volume which borrows the bandwidth resources of the logical volume in the last T units of time and/or a logical volume which does not occupy the bandwidth resources in the longest time in the last T units of time.

Optionally, the allocating the bandwidth resource of the preset ratio and the bandwidth resource of the target logical volume to the logical volume to meet the requirement of the logical volume, where the target logical volume is a logical volume that has borrowed the bandwidth resource of the logical volume in the last T units of time and/or a logical volume that has not occupied the bandwidth resource for the longest time in the last T units of time, includes:

judging whether a first target logical volume exists, wherein the first target logical volume is a logical volume borrowing the logical tape bandwidth resource in the past T unit time;

if a first target logical volume exists, allocating the bandwidth resources of the preset proportion and the bandwidth resources of the first target logical volume to the logical volume so as to meet the requirement of the logical volume;

if a first target logical volume does not exist or the bandwidth resources in the preset proportion and the bandwidth resources of the first target logical volume cannot meet the requirement of the logical volume, judging whether a second target logical volume exists, wherein the second target logical volume is a logical volume which does not occupy the bandwidth resources for the longest time within the past T unit time;

if a second target logical volume exists, allocating the bandwidth resource of the preset proportion and the bandwidth resource of the second target logical volume to the logical volume, or allocating the bandwidth resource of the preset proportion, the bandwidth resource of the first target logical volume and the bandwidth resource of the second target logical volume to the logical volume, so as to meet the requirement of the logical volume.

Optionally, after the determining whether the first target logical volume exists, the method further includes:

if a plurality of first target logical volumes exist, sequentially selecting the first target logical volumes from the plurality of first target logical volumes according to the borrowing time from morning to evening, and allocating the bandwidth resources of the selected first target logical volume to the logical volume until the demand of the logical volume is met or the first target logical volume which is not selected does not exist.

Optionally, after allocating the bandwidth resource of the preset proportion and the bandwidth resource of the second target logical volume to the logical volume, or allocating the bandwidth resource of the preset proportion, the bandwidth resource of the first target logical volume, and the bandwidth resource of the second target logical volume to the logical volume, the method further includes:

generating a borrowing record between the logical volume and the second target logical volume;

correspondingly, after allocating the bandwidth resource of the preset proportion and the bandwidth resource of the first target logical volume to the logical volume, the method further includes:

and canceling the account of the borrowing record between the logical volume and the first target logical volume.

Optionally, after the generating the borrowing record between the logical volume and the second target logical volume, the method further includes:

and when the existence time of the borrowing record exceeds T unit time, the borrowing record is cancelled.

Optionally, when allocating bandwidth resources to a logical volume of bandwidth resources to be occupied, the method further includes:

acquiring a target queue, and determining a logical volume located at the head of the target queue to serve as a logical volume of a next bandwidth resource to be allocated, wherein the target queue is used for recording the logical volume of the bandwidth resource to be occupied, and the arrangement sequence of the logical volumes in the target queue is as follows: the logical volume borrowed with the bandwidth resource is in front, and the logical volume occupying the bandwidth resource is in back due to self requirements.

Optionally, if there are a plurality of the logical volumes borrowed with the bandwidth resource or a plurality of the logical volumes waiting for occupying the bandwidth resource due to their own needs, the order of arrangement of the logical volumes in the target queue is: the longer the past T units of time without occupied bandwidth resources, the earlier.

In a second aspect, the present application provides a bandwidth resource allocation apparatus for a storage system, including:

the proportion setting module is used for setting a corresponding preset proportion for each logical volume of the storage system;

a quasi-allocation module, configured to determine, according to the preset proportion and available bandwidth resources of the storage system in unit time, bandwidth resources of the preset proportion that are expected to be allocated to each logical volume;

the judging module is used for judging whether the bandwidth resources in the preset proportion meet the requirements of the logical volume when the bandwidth resources are allocated to the logical volume of the bandwidth resources to be occupied;

the first allocation module is used for allocating the bandwidth resources in the preset proportion to the logical volume when the bandwidth resources in the preset proportion meet the requirements of the logical volume;

and a second allocating module, configured to allocate, when the bandwidth resource in the preset proportion does not meet the requirement of the logical volume, the bandwidth resource in the preset proportion and a bandwidth resource of a target logical volume to meet the requirement of the logical volume, where the target logical volume is a logical volume that has borrowed the logical tape bandwidth resource in the past T units of time and/or a logical volume that has not occupied the bandwidth resource for the longest time in the past T units of time.

In a third aspect, the present application provides a bandwidth resource allocation device of a storage system, including:

a memory: for storing a computer program;

a processor: for executing the computer program to implement the bandwidth resource allocation method of the storage system as described above.

In a fourth aspect, the present application provides a readable storage medium for storing a computer program for implementing a method for allocating bandwidth resources of a storage system as described above when the computer program is executed by a processor.

The application provides a bandwidth resource allocation method of a storage system, which comprises the following steps: setting a corresponding preset proportion for each logical volume of the storage system; determining bandwidth resources with preset proportion which are expected to be allocated to each logical volume according to the preset proportion and available bandwidth resources of the storage system in unit time; when bandwidth resources are allocated to a logical volume of bandwidth resources to be occupied, whether the bandwidth resources in a preset proportion meet the requirements of the logical volume is judged; if yes, allocating bandwidth resources with a preset proportion to the logical volume; if the bandwidth resources do not meet the requirement, allocating the bandwidth resources with the preset proportion and the bandwidth resources of the target logical volume to the logical volume so as to meet the requirement of the logical volume, wherein the target logical volume is a logical volume which borrows the bandwidth resources of the logical volume in the last T units of time and/or a logical volume which does not occupy the bandwidth resources in the longest time in the last T units of time.

It can be seen that, the method effectively allocates bandwidth resources of a storage system among a plurality of logical volumes, and firstly sets a corresponding preset proportion for each logical volume, when allocating bandwidth resources, if the demand of a logical volume is large, it is guaranteed that the logical volume obtains bandwidth resources not lower than the preset proportion no matter the system is busy or idle, conversely, if the demand of a logical volume is small or no demand exists, the spare bandwidth resources are allocated to other logical volumes with demands, and finally the purpose of allocating available bandwidth resources to logical volumes with actual demands as much as possible is achieved, it is guaranteed that the logical volumes with demands can obtain enough bandwidth resources, and at the same time, the utilization rate of the bandwidth resources of the storage system is significantly improved, and the idle of the system bandwidth resources is reduced.

In addition, the present application also provides a bandwidth resource allocation apparatus, a device and a readable storage medium of a storage system, and the technical effect thereof corresponds to the technical effect of the above method, and is not described herein again.

Drawings

For a clearer explanation of the embodiments or technical solutions of the prior art of the present application, the drawings needed for the description of the embodiments or prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.

Fig. 1 is a flowchart of a first embodiment of a method for allocating bandwidth resources of a storage system according to the present application;

fig. 2 is a flowchart of a second embodiment of a method for allocating bandwidth resources of a storage system according to the present application;

FIG. 3 is a functional block diagram of an embodiment of a bandwidth resource allocation apparatus of a storage system provided in the present application;

fig. 4 is a schematic structural diagram of an embodiment of a bandwidth resource allocation apparatus of a storage system provided in the present application.

Detailed Description

In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

The core of the application is to provide a method, a device, equipment and a readable storage medium for allocating bandwidth resources of a storage system, on one hand, a logical volume with a large demand can be allocated with bandwidth resources not lower than a preset proportion, and on the other hand, idle bandwidth resources of a logical volume with a small demand or without demand are allocated to a logical volume with an actual demand, so that the utilization rate of the system bandwidth is improved as much as possible, and the waste of the system bandwidth resources is avoided.

Referring to fig. 1, a first embodiment of a method for allocating bandwidth resources of a storage system provided in the present application is described below, where the first embodiment includes:

s11, setting corresponding preset proportion for each logic volume of the storage system;

s12, determining the bandwidth resources with the preset proportion which are expected to be allocated to each logic volume according to the preset proportion and the available bandwidth resources of the storage system in unit time;

s13, when allocating bandwidth resources for the logical volume of the bandwidth resources to be occupied, judging whether the bandwidth resources in the preset proportion meet the requirements of the logical volume; if yes, entering S14, otherwise entering S15;

s14, allocating bandwidth resources with a preset proportion to the logical volume;

and S15, allocating the bandwidth resources of the preset proportion and the bandwidth resources of the target logical volume to the logical volume to meet the requirement of the logical volume, wherein the target logical volume is a logical volume which borrows the bandwidth resources of the logical volume in the last T units of time and/or a logical volume which does not occupy the bandwidth resources in the longest time in the last T units of time.

In this embodiment, bandwidth resource allocation is abstracted, and it is considered that the storage system can only provide a certain amount of bandwidth resources in a unit time, and the bandwidth resources in the unit time are allocated to the logical volume each time. The method comprises the steps of firstly respectively setting a preset proportion (the logical volumes correspond to the preset proportion one by one) for each logical volume of the storage system according to experience, then determining available bandwidth resources of the storage system in unit time, and further determining bandwidth resources of the preset proportion which are expected to be allocated to each logical volume, wherein the bandwidth resources of the part are bandwidth resources which can be occupied by the logical volume in unit time. It should be noted that here, only the allocation is intended, and bandwidth resources are not actually allocated to the logical volume.

When bandwidth resources are really allocated, firstly, a logical volume of the bandwidth resources to be occupied is determined, then, bandwidth resources in a preset proportion and the requirements of the logical volume corresponding to the logical volume are determined, whether the bandwidth resources in the preset proportion meet the requirements of the logical volume is judged, and if yes, the bandwidth resources in the preset proportion are allocated to the logical volume; if not, in addition to allocating the preset proportion of bandwidth resources to the logical volume, allocating the bandwidth resources of the target logical volume to the logical volume to meet the requirement of the logical volume. In order to ensure the maximization of the utilization rate of the bandwidth resources, the target logical volume in this embodiment refers specifically to: and borrowing the logical volume of the logical tape width resource in the past T units of time and/or not occupying the logical volume of the tape width resource in the past T units of time. The value of T here can be set or adjusted by itself according to actual requirements, which is not limited in this embodiment.

Therefore, the concepts of bandwidth resource borrowing, bandwidth resource returning and borrowing expiration are introduced into the embodiment. The bandwidth resource borrowing means that the present embodiment allows a logical volume to borrow bandwidth resources of other logical volumes when the own requirements cannot be met; the returning of the bandwidth resources refers to that the borrower returns the bandwidth resources to the borrowed party which is not satisfied with the demand, and it is worth mentioning that the returned bandwidth resources are not the same as the previously borrowed bandwidth resources because the bandwidth resources have a time attribute; the borrowing expiration means that once the borrowing relationship exceeds T unit time, the borrowing record is paid out, the borrowing relationship is considered to be no longer existed, and at the moment, even if the demand of the borrowed party is not met, the bandwidth resource cannot be preferentially obtained from the borrower party.

As a specific implementation manner, when bandwidth resource borrowing occurs, a borrowing record can be generated; when the bandwidth resource returning occurs, the borrowing records are cancelled; when the existence time of the borrowing record exceeds T unit time, the borrowing record is also cancelled.

In this embodiment, only the logical volume occupies the bandwidth resource of the storage system for description, and actually, the resource allocation logic of this embodiment may be further applied to other scenarios, such as that the logical volume occupies the resource of the storage system IOPS (Input/Output Operations Per Second), the object read/write occupies the bandwidth resource of the storage system, and the object read/write occupies the resource of the storage system IOPS.

The bandwidth resource allocation method for the storage system provided in this embodiment effectively allocates the bandwidth resources of the storage system among the plurality of logical volumes, and first sets a corresponding preset proportion for each logical volume, when allocating the bandwidth resources, if the demand of the logical volume is large, it is guaranteed that the logical volume obtains bandwidth resources not lower than the preset proportion no matter the system is busy or idle, and conversely, if the demand of the logical volume is small or no demand exists, the spare bandwidth resources are allocated to other logical volumes with demands, so as to finally achieve the purpose of allocating available bandwidth resources to logical volumes with actual demands as much as possible, ensure that the logical volumes with demands can obtain sufficient bandwidth resources, and at the same time, significantly improve the utilization rate of the bandwidth resources of the storage system, and reduce the idle of the bandwidth resources of the system.

The second embodiment of the bandwidth resource allocation method for a storage system provided by the present application is described in detail below, and the second embodiment is implemented based on the first embodiment and is expanded to a certain extent on the basis of the first embodiment.

Specifically, when allocating bandwidth resources to the logical volumes, the allocation order of each pair of logical volumes is optimized in the embodiment.

Referring to fig. 2, the second embodiment specifically includes:

s201, setting a corresponding preset proportion for each logical volume of the storage system;

s202, determining the bandwidth resources with the preset proportion which are expected to be allocated to each logical volume according to the preset proportion and the available bandwidth resources of the storage system in unit time;

s203, acquiring a target queue, and determining a logical volume positioned at the head of the target queue to be used as a logical volume of the next bandwidth resource to be allocated;

the target queue is used for recording the logical volume of the bandwidth resource to be occupied, and the arrangement sequence of the logical volume in the target queue is as follows: the logical volume borrowed with the bandwidth resource is in front, and the logical volume occupying the bandwidth resource is in back due to self requirements.

If a plurality of logical volumes borrowed by the bandwidth resources or a plurality of logical volumes waiting for occupying the bandwidth resources due to self requirements exist, the arrangement sequence of the logical volumes in the target queue is as follows: the longer the past T units of time without occupied bandwidth resources, the earlier.

S204, judging whether the bandwidth resources with the preset proportion meet the requirements of the logical volume; if yes, entering S205, otherwise entering S206;

s205, allocating bandwidth resources with a preset proportion to the logical volume;

s206, allocating bandwidth resources with a preset proportion to the logical volume, and judging whether a first target logical volume exists, wherein the first target logical volume is a logical volume which borrows the bandwidth resources of the logical volume in the past T unit time; if yes, entering S207, otherwise entering S209;

s207, further allocating bandwidth resources of a first target logical volume for the logical volume, and performing account cancellation on the borrowing records between the logical volume and the first target logical volume;

specifically, if the number of the first target logical volume is one, allocating the bandwidth resource of the first target logical volume to the logical volume; if the number of the first target logical volumes is multiple, sequentially selecting the first target logical volumes from the multiple first target logical volumes according to the borrowing time from morning to evening, and allocating the bandwidth resources of the selected first target logical volume to the logical volume until the demand of the logical volume is met or the first target logical volume which is not selected does not exist.

S208, judging whether the requirement of the logical volume is met or not at present, if so, not processing, and otherwise, entering S209;

s209, judging whether a second target logical volume exists, wherein the second target logical volume is a logical volume which does not occupy bandwidth resources within the longest time within the past T unit time; if yes, entering S210, and if not, not processing;

s210, further allocating bandwidth resources of a second target logical volume to the logical volume, and generating a borrowing record between the logical volume and the second target logical volume;

and S211, when the borrowing record is not cancelled when the unit time exceeds T units, cancelling the borrowing record.

Based on the second embodiment, the following describes the implementation process of the present embodiment by taking practical application as an example.

Assuming that the available bandwidth resource supply amount of the storage system per unit time is M, which needs to be occupied by N logical volumes according to a preset proportion, and M is to be allocated to each logical volume according to the preset proportion, the bandwidth resources that are expected to be occupied by each logical volume per unit time are M1, M2, …, mn, respectively.

When bandwidth resources are allocated to a logical volume, if the bandwidth resource amount in a preset proportion can meet the requirement of the logical volume, only the bandwidth resource amount in the preset proportion is allocated to the logical volume, and if the bandwidth resource amount in the preset proportion cannot meet the requirement of the logical volume, the bandwidth resources of a target logical volume are allocated in addition to the bandwidth resources in the preset proportion. Specifically, bandwidth resources are preferentially acquired from the logical volume borrowed with the logical tape width resource, and when there are a plurality of logical volumes borrowed with the logical tape width resource, bandwidth resources are sequentially acquired from the logical volume that has the earliest borrowing relationship, and if the demand of the logical volume cannot be satisfied, resources are borrowed from the logical volume that has not been occupied by bandwidth resources for the longest time within the past T unit times.

When the logical volume acquires the returned bandwidth resources from the borrower, the corresponding borrowing records need to be debited, and the debiting is started from the earliest borrowing in T unit time. It should be noted that, when bandwidth resource borrowing occurs, only borrowing occurring within T unit times is calculated, and borrowing exceeding T unit times is directly cancelled out.

When a plurality of logical volumes wait to occupy the bandwidth resources, preferentially selecting the logical volumes borrowed by other logical volumes to allocate, if a plurality of logical volumes borrowed by the bandwidth resources exist, selecting the logical volumes which do not occupy the bandwidth resources for the longest time in the past T unit time from the logical volumes to allocate, and if the logical volumes borrowed by the bandwidth resources do not exist, selecting the logical volumes which do not occupy the bandwidth resources for the longest time in the past T unit time from the logical volumes waiting to occupy the bandwidth to allocate.

Once the logical volume occupies the bandwidth resource, or the logical volume which has the borrowing relationship borrows the bandwidth resource by other logical volumes, the occupied time of the bandwidth resource is calculated as the last occupied time point of the bandwidth resource.

It is worth mentioning that when the logical volume needs to occupy the bandwidth resource, the maximum amount of the single occupied bandwidth resource is the product of T unit times and the unit time allocation amount thereof, and by this way, it is avoided that there is no new allocation scheduling process for a long time due to the single occupied bandwidth resource being too much.

In the following, the bandwidth resource allocation apparatus of the storage system provided in the embodiment of the present application is introduced, and the bandwidth resource allocation apparatus of the storage system described below and the bandwidth resource allocation method of the storage system described above may be referred to correspondingly.

As shown in fig. 3, the bandwidth resource allocation apparatus of the storage system of this embodiment includes:

a proportion setting module 31, configured to set a corresponding preset proportion for each logical volume of the storage system;

a quasi-allocation module 32, configured to determine, according to the preset proportion and available bandwidth resources of the storage system in a unit time, bandwidth resources of the preset proportion that are expected to be allocated to each logical volume;

the judging module 33 is configured to, when allocating bandwidth resources to a logical volume of bandwidth resources to be occupied, judge whether the bandwidth resources in the preset proportion meet the requirement of the logical volume;

a first allocating module 34, configured to allocate the bandwidth resources in the preset proportion to the logical volume when the bandwidth resources in the preset proportion meet the requirement of the logical volume;

the second allocating module 35 is configured to allocate, when the bandwidth resource in the preset proportion does not meet the requirement of the logical volume, the bandwidth resource in the preset proportion and the bandwidth resource of a target logical volume to meet the requirement of the logical volume, where the target logical volume is a logical volume that has borrowed the logical tape bandwidth resource in the past T units of time and/or a logical volume that has not occupied the bandwidth resource for the longest time in the past T units of time.

The bandwidth resource allocation apparatus of the storage system of the present embodiment is configured to implement the foregoing bandwidth resource allocation method of the storage system, and therefore a specific implementation of the apparatus may be seen in the foregoing portions of the embodiment of the bandwidth resource allocation method of the storage system, for example, the proportion setting module 31, the pseudo-allocation module 32, the determination module 33, the first allocation module 34, and the second allocation module 35, which are respectively configured to implement steps S11, S12, S13, S14, and S15 in the foregoing bandwidth resource allocation method of the storage system. Therefore, specific embodiments thereof may be referred to in the description of the corresponding respective partial embodiments, and will not be described herein.

In addition, since the bandwidth resource allocation apparatus of the storage system of this embodiment is used to implement the foregoing bandwidth resource allocation method of the storage system, its role corresponds to that of the foregoing method, and details are not described here again.

In addition, the present application also provides a bandwidth resource allocation device of a storage system, as shown in fig. 4, including:

the memory 100: for storing a computer program;

the processor 200: for executing the computer program to implement the bandwidth resource allocation method of the storage system as described above.

Finally, the present application provides a readable storage medium for storing a computer program for implementing a bandwidth resource allocation method of a storage system as described above when executed by a processor.

The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.

The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

The above detailed descriptions of the solutions provided in the present application, and the specific examples applied herein are set forth to explain the principles and implementations of the present application, and the above descriptions of the examples are only used to help understand the method and its core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:流处理系统的数据读写方法和流处理系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类