CN103440113A - Disk IO (Input/output) resource allocation method and device - Google Patents

Disk IO (Input/output) resource allocation method and device Download PDF

Info

Publication number
CN103440113A
CN103440113A CN2013104220542A CN201310422054A CN103440113A CN 103440113 A CN103440113 A CN 103440113A CN 2013104220542 A CN2013104220542 A CN 2013104220542A CN 201310422054 A CN201310422054 A CN 201310422054A CN 103440113 A CN103440113 A CN 103440113A
Authority
CN
China
Prior art keywords
disk
group
token
strategy
resource
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2013104220542A
Other languages
Chinese (zh)
Other versions
CN103440113B (en
Inventor
栾利刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sohu New Media Information Technology Co Ltd
Original Assignee
Beijing Sohu New Media Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sohu New Media Information Technology Co Ltd filed Critical Beijing Sohu New Media Information Technology Co Ltd
Priority to CN201310422054.2A priority Critical patent/CN103440113B/en
Publication of CN103440113A publication Critical patent/CN103440113A/en
Application granted granted Critical
Publication of CN103440113B publication Critical patent/CN103440113B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a disk IO (Input/output) resource allocation method and device. The method comprises the steps: presetting at least one strategy group which comprises at least one disk partition; firstly, respectively allocating the number of tokens and strategy modes for all strategy groups; secondly, receiving any one disk IO request which comprises a disk partition identification; acquiring the strategy group corresponding to the disk partition identification; finally, judging whether the number of the tokens of the strategy group is greater than zero, if so, allocating a resource of the strategy group for the disk IO request, and reducing the number of the tokens of the strategy group according to the strategy mode of the strategy group; if not, executing the issue of new tokens when meeting the issue conditions of new tokens. According to the disk IO resource allocation method and device, the waste of disk IO resource in the resource allocation process can be avoided by adopting the new token allocation mode, in addition, the blocking of the disk IO requests can be reduced by adopting a strategy grouping mode, and the utilization rate of the disk IO resources can be increased.

Description

A kind of disk I/O resource allocation methods and device
Technical field
The present invention relates to technical field of data processing, be specifically related to a kind of disk I/O resource allocation methods and device.
Background technology
In recent years, along with the continuous maturation of the continuous lifting of the performance of physical machine unit and Intel Virtualization Technology, the user can dispose many virtual machines above physical machine at one, enable the application of a plurality of types.System is averagely allocated to each virtual machine by resource, and can't be that virtual machine carries out rationally effectively resource distribution according to the real resource demand of application service.In practical application, for the distribution of disk I/O resource, be exactly the mode that adopts above-mentioned mean allocation.
Usually, after system receives the disk I/O request, according to the disk I/O request, after determining that this IO asks required disk partition, directly the resource of this disk partition is distributed to this IO request.Visible, this resource method is to take disk partition as control object, and when there are not available resources in this demand disk partition, this disk I/O request can not get response.
So above-mentioned resource allocation methods can cause blocking up of disk I/O request, can not effectively utilize resource simultaneously.
Summary of the invention
In order to take full advantage of idling-resource, thereby improve resource utilization, the invention provides a kind of resource regulating method and device based on the IaaS platform.
The invention provides a kind of disk I/O resource allocation methods, described method comprises:
Set in advance at least one tactful group, described tactful group comprises at least one disk partition;
For each strategy group is distributed respectively token number and strategy pattern;
Receive arbitrary disk I/O request, described disk I/O request comprises the disk partition sign, and described disk partition sign is for the unique identification disk partition;
Obtain described disk partition and identify corresponding tactful group;
Whether the token number that judges described strategy group is greater than zero, if so, is the resource that described disk I/O request distributes described strategy group, and reduces the token number of described strategy group according to the strategy pattern of described strategy group; If not,, when meeting new round token granting condition, carry out the granting of new round token.
Preferably, described when meeting new round token granting condition, execution new round token is provided, and comprising:
When meeting new round token granting condition, the token number of All Policies group is increased to default number.
Preferably, described method also comprises:
For described disk I/O request distributes the resource of described strategy group, and reduce described token number according to the strategy pattern of described strategy group.
Preferably, describedly obtain described disk partition and identify corresponding tactful group, comprising:
Obtain the disk partition sign in described disk I/O request;
Search corresponding disk partition according to described disk partition sign;
Obtain corresponding tactful group of described disk partition.
Preferably, described when meeting new round token granting condition, execution new round token is provided, and comprising:
When the token number of All Policies group is zero, carry out the granting of new round token;
Perhaps,
When the token number of All Policies group is not all zero, judge that strategy group that the token number is maximum, whether in default busy state, if not, carries out the granting of new round token.
Preferably, described method also comprises:
Duration every predeterminated frequency obtains first resource distribution daily record;
Distribute daily record according to described resource, for each strategy group is distributed respectively token number and strategy pattern.
The present invention also provides a kind of disk I/O resource allocation system, and described system comprises:
Setting unit, for setting in advance at least one tactful group, described tactful group comprises at least one disk partition;
The first allocation units, be used to each strategy group to distribute respectively token number and strategy pattern;
Receiving element, for receiving arbitrary disk I/O request, described disk I/O request comprises the disk partition sign, described disk partition sign is for the unique identification disk partition;
The first acquiring unit, identify corresponding tactful group for obtaining described disk partition;
Whether judging unit, be greater than zero for the token number that judges described strategy group;
The second allocation units, when being, be the resource that described disk I/O request distributes described strategy group for the result at described judging unit, and reduce the token number of described strategy group according to the strategy pattern of described strategy group;
Token is provided unit, for the result at described judging unit, is no, and when meeting new round token and providing condition, carries out the granting of new round token.
Preferably, described token is provided unit, comprising:
First provides subelement, for when meeting new round token granting condition, the token number of All Policies group is increased to default number.
Preferably, described system also comprises:
The 3rd allocation units, be used to described disk I/O request to distribute the resource of described strategy group, and reduce described token number according to the strategy pattern of described strategy group.
Preferably, described the first acquiring unit comprises:
First obtains subelement, for obtaining the disk partition sign of described disk I/O request;
Search subelement, for according to described disk partition sign, searching corresponding disk partition;
Second obtains subelement, for obtaining corresponding tactful group of described disk partition.
Preferably, described token is provided unit, comprising:
Second provides subelement, while for the token number when the All Policies group, being zero, carries out the granting of new round token;
Perhaps,
Judgment sub-unit, while for the token number when the All Policies group, being not all zero, judge that whether strategy group that the token number is maximum is in default busy state;
The 3rd provides subelement, while being no for the result in described judgment sub-unit, carries out the granting of new round token.
Preferably, described system also comprises:
Second acquisition unit, obtain first resource for the duration every predeterminated frequency and distribute daily record;
The 4th allocation units, for according to described resource, distributing daily record, for each strategy group is distributed respectively token number and strategy pattern.
The present invention sets in advance at least one tactful group, and described tactful group comprises at least one disk partition; At first, distribute respectively token number and strategy pattern for each strategy group; Secondly, receive arbitrary disk I/O request, described disk I/O request comprises the disk partition sign; And obtain described disk partition and identify corresponding tactful group; Finally, judging whether the token number of described strategy group is greater than zero, if so, is the resource that described disk I/O request distributes described strategy group, and reduces the token number of described strategy group according to the strategy pattern of described strategy group; If not,, when meeting new round token granting condition, carry out the granting of new round token.The present invention has adopted new token allocation scheme, avoided the waste of disk I/O resource in the resource allocation process, simultaneously, owing to having adopted tactful packet mode, divide and mix more flexibly and can distribute the disk I/O resource for a virtual machine in the disk I/O resource, also can allow the virtual machine of several deployment related application share certain proportion disk I/O resource, reduce blocking up of disk I/O request, improve the utilization factor of disk I/O resource.
The accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present application, in below describing embodiment, the accompanying drawing of required use is briefly described, apparently, accompanying drawing in the following describes is only some embodiment of the application, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
The disk I/O resource allocation methods process flow diagram that Fig. 1 provides for the embodiment of the present invention one;
The method flow diagram that Fig. 2 provides for the execution new round token that the embodiment of the present invention one provides;
Fig. 3 is the embodiment of the present invention two disk I/O resource allocation device structural drawing.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present application, the technical scheme in the embodiment of the present application is clearly and completely described, obviously, described embodiment is only the application's part embodiment, rather than whole embodiment.Embodiment based in the application, those of ordinary skills are not making under the creative work prerequisite the every other embodiment obtained, and all belong to the scope of the application's protection.
The embodiment of the present invention has adopted the token allocation scheme of science more, can solve the system resource waste problem of prior art, thereby can more rationally use efficiently system resource.Simultaneously, the present invention has also adopted tactful packet mode, the associative disk subregion can be joined to a strategy group the inside, the strategy group comprises 1 or a plurality of disk partition, and then be tactful set of allocation policies, be that control object of the present invention is not disk partition but tactful group, carry out disk I/O allocated bandwidth and control from overall angle for each virtual machine, thereby can support the virtual machine for having a plurality of subregions to distribute a certain proportion of disk I/O bandwidth, and support a plurality of virtual machines to share the certain proportion bandwidth.
Embodiment mono-
With reference to figure 1, Fig. 1 is the disk I/O resource allocation methods process flow diagram that the present embodiment provides, and specifically can comprise:
Step 101: set in advance at least one tactful group, described tactful group comprises at least one disk partition;
In the present embodiment, disk comprises several disk partition, and several disk partition form one tactful group.The present embodiment sets in advance several tactful group, and each tactful group comprises at least one disk partition.The control object of the present embodiment is not disk partition but tactful group.
Step 102: for each strategy group is distributed respectively token number and strategy pattern;
In the present embodiment, arranging after several tactful group, for the All Policies group is distributed respectively token number and tactful mode.
Wherein, can join weight coefficient for each tactful component, join the token number according to the weight coefficient of each strategy group for each tactful component, for example, set in advance two strategy group A and B, the basic token pond that will include 2048 tokens is that strategy group A and B are distributed, and the weight coefficient of strategy group A and B is respectively 80% and 20%, for the disk I/O resource of strategy group A distribution 80%, corresponding token number is: 2048*80%=1638; For the disk I/O resource of strategy group B distribution 20%, corresponding token number is: 2048*20%=410.
In addition, for each strategy group is distributed respectively a kind of strategy pattern, concrete, strategy pattern can comprise weight and two kinds of patterns of sector-weight, wherein, the weight pattern is indifferent to the size of the sector that the disk I/O request will ask, and for the loss of any one disk I/O request, is a token; And the sector-weight pattern can be carried out the corresponding token of loss according to the size of disk I/O request sector, the corresponding token of 512 bytes in sector, that is to say, when the resource of disk I/O request needs is not more than 512 byte, the loss of a disk I/O request is a token, corresponding, when the resource of disk I/O request needs is greater than 512 bytes and is not more than 1024 byte, the loss of a disk I/O request is two tokens, and the rest may be inferred.The user can select any of two kinds of patterns for each tactful set of allocation policies pattern the time, and simultaneously, strategy pattern also is not limited only to above-mentioned two kinds of patterns.
Step 103: receive arbitrary disk I/O request, described disk I/O request comprises the disk partition sign, and described disk partition sign is for the unique identification disk partition;
In the present embodiment, receive any one disk I/O request, described disk I/O request is used to the orders such as input and output that disk resource is provided, wherein, the disk I/O request can comprise the disk partition sign, the disk partition sign for the unique identification disk partition, that is to say, can identify unique definite disk partition according to disk partition.
Step 104: obtain described disk partition and identify corresponding tactful group;
In the present embodiment, because the disk partition sign can be for unique definite disk partition, any one tactful group comprises several disk partition simultaneously, the strategy group has corresponding relation with disk partition, so, at first can determine disk partition according to disk partition sign, secondly can determine tactful group of this disk partition place according to disk partition.
In practical operation, obtaining the method that disk partition identifies corresponding strategy group can comprise:
At first, obtain the disk partition sign in described disk I/O request;
Secondly, search corresponding disk partition according to described disk partition sign;
Finally, obtain corresponding tactful group of described disk partition.
Step 105: whether the token number that judges described strategy group is greater than zero, if so, enters step 106, if not, enters step 107.
In the present embodiment, after the strategy group that need to access in the disk I/O request is determined, at first judge whether the token number that this strategy group is held is greater than zero, if the token number that this strategy group is held is greater than zero, enters step 106, otherwise, step 107 entered.
Wherein, the token that the disk I/O request that application program is sent can be held by institute's request strategy group carries out the disk I/O operation, and consumes corresponding token.That is to say, the increase and decrease by the token number can embody the situation of the disk resource that this strategy group holds.
Step 106: for described disk I/O request distributes the resource of described strategy group, and reduce the token number of described strategy group according to the strategy pattern of described strategy group;
In the present embodiment, when the tactful group of token number of holding need to accessing when this disk I/O request is greater than zero, for this disk I/O request distributes the resource of this strategy group, thereby application program corresponding to this disk I/O request can normally be moved.And, reduce according to the strategy pattern of this strategy group the token number that this strategy group is held, that is to say, the resource that embodies this strategy group by reducing token number that this strategy group holds is assigned with.For example, when the strategy pattern of this strategy group is the weight pattern, if the token number that this strategy group is held is greater than zero, the token number that this strategy group is held reduces 1.If be less than 0 after subtracting, this strategy group is set, and to hold token number be 0.
Step 107: when meeting new round token granting condition, carry out the granting of new round token.
Because token is used up, can not submit for a long time new disk I/O request for the avoidance strategy group to, and cause system resource waste and service extremely, the token that the present embodiment can be provided a new round is used for the All Policies group.
In the present embodiment, the tactful group of token number of holding need to accessing when this disk I/O request is not more than zero, while equalling zero, judges whether current state meets new round token and provide condition, if meet, carries out the granting of new round token.
When if current state does not meet new round token granting condition, current disk I/O request can be put into to this strategy and organize corresponding block_bios queue, wherein, the disk I/O request that this block_bios queue can not responded according to the time sequencing storage of disk I/O request, during the response condition of the disk I/O request in meeting the block_bios queue, according to the request time order, the disk I/O request in this block_bios queue is responded.
In practical operation, the operation of carrying out the granting of new round token is mainly manifested in: when meeting new round token granting condition, the token number of All Policies group is increased to default number.That is to say, after the tactful group of token number of holding increased, this strategy group just has the ability of processing the disk I/O request accordingly.Wherein, the granting of new round token is also according to the strategy pre-established, in the token of a new round distributes, the weight coefficient of supposing strategy group A and B still is respectively 80% and 20%, strategy group A will increase by 1638 on the basis of the token number of originally holding, and strategy group B will increase by 410 on the token number of originally holding.
With reference to figure 2, the method flow diagram that Fig. 2 provides for carrying out new round token specifically can comprise:
Step 201: whether the token number that judges the All Policies group is zero, if not, enters step 202, if so, enters step 203.
Step 202: judge that strategy group that the token number is maximum, whether in default busy state, if so, enters step 204, if not, enter step 203.
Step 203: carry out the granting of new round token.
Step 204: the disk I/O request is added to the queue of current strategies group, wait for processed.
In practical operation, new round token is provided condition can exist two kinds of methods to set up, and first condition is: when the token number of All Policies group is zero, carry out the granting of new round token; Second condition is: when the token number of All Policies group is not all zero, judge that strategy group that the token number is maximum, whether in default busy state, if not, carries out the granting of new round token.If hold maximum tactful group of token, its IO request is also very busy, can not distribute new round token, preferentially guarantees to hold maximum tactful group of token and carries out the disk IO read-write operation.The present embodiment can be in meeting above-mentioned two conditions any one the time, carry out the granting of new round token.The setting of concrete condition is not limited to above-mentioned two kinds.
Wherein, the standard of default busy state can be: in 5 minutes, IO request number and All Policies group that the current strategies group is submitted to submit to IO to ask the ratio of total number whether to be greater than the ratio of current strategies group original allocation token number and All Policies group original allocation token number, if be greater than, illustrate this current tactful group in busy state.
Further, after carrying out the granting of new round token, the present embodiment can be to being the disk I/O request Resources allocation of response, concrete:
For described disk I/O request distributes the resource of described strategy group, and reduce described token number according to the strategy pattern of described strategy group.
In addition, the present embodiment can distribute daily record to user feedback disk I/O resource, the user can set in advance needs Gains resources to distribute the frequency of daily record, and the disk I/O operation information to each strategy group is added up, the number and the read-write disk space that for example comprise read-write IO in the predeterminated frequency section are always big or small, carried out how many wheel tokens and distributed, wherein can comprise that the how many times token has affluence, the how many times token is not enough etc.According to predefined frequency, regularly resource is distributed daily record to be transferred to application layer by the netlink mode, so that the user analyzes judgement, thereby can recognize more really each strategy group disk I/O resource service condition.
Concrete, the present embodiment can obtain every the duration of predeterminated frequency first resource and distribute daily record; Distribute daily record according to described resource, for each strategy group is distributed respectively token number and strategy pattern.
The present embodiment sets in advance at least one tactful group, and described tactful group comprises at least one disk partition; At first, distribute respectively token number and strategy pattern for each strategy group; Secondly, receive arbitrary disk I/O request, described disk I/O request comprises the disk partition sign; And obtain described disk partition and identify corresponding tactful group; Finally, judging whether the token number of described strategy group is greater than zero, if so, is the resource that described disk I/O request distributes described strategy group, and reduces the token number of described strategy group according to the strategy pattern of described strategy group; If not,, when meeting new round token granting condition, carry out the granting of new round token.The present embodiment has adopted new token allocation scheme, avoided the waste of disk I/O resource in the resource allocation process, simultaneously, owing to having adopted tactful packet mode, divide and mix more flexibly and can distribute the disk I/O resource for a virtual machine in the disk I/O resource, also can allow the virtual machine of several deployment related application share certain proportion disk I/O resource, reduce blocking up of disk I/O request, improve the utilization factor of disk I/O resource.
Embodiment bis-
With reference to figure 3, the disk I/O resource allocation device structural drawing that Fig. 3 provides for the present embodiment, described device can comprise:
Setting unit 301, for setting in advance at least one tactful group, described tactful group comprises at least one disk partition;
The first allocation units 302, be used to each strategy group to distribute respectively token number and strategy pattern;
Receiving element 303, for receiving arbitrary disk I/O request, described disk I/O request comprises the disk partition sign, described disk partition sign is for the unique identification disk partition;
The first acquiring unit 304, identify corresponding tactful group for obtaining described disk partition;
Whether judging unit 305, be greater than zero for the token number that judges described strategy group;
The second allocation units 306, when being, be the resource that described disk I/O request distributes described strategy group for the result at described judging unit, and reduce the token number of described strategy group according to the strategy pattern of described strategy group;
Token is provided unit 307, for the result at described judging unit, is no, and when meeting new round token and providing condition, carries out the granting of new round token.
Wherein, described token is provided unit, can comprise:
First provides subelement, for when meeting new round token granting condition, the token number of All Policies group is increased to default number.
Wherein, described system can also comprise:
The 3rd allocation units, be used to described disk I/O request to distribute the resource of described strategy group, and reduce described token number according to the strategy pattern of described strategy group.
Concrete, described the first acquiring unit can comprise:
First obtains subelement, for obtaining the disk partition sign of described disk I/O request;
Search subelement, for according to described disk partition sign, searching corresponding disk partition;
Second obtains subelement, for obtaining corresponding tactful group of described disk partition.
Concrete, described token is provided unit, can comprise:
Second provides subelement, while for the token number when the All Policies group, being zero, carries out the granting of new round token;
Perhaps,
Judgment sub-unit, while for the token number when the All Policies group, being not all zero, judge that whether strategy group that the token number is maximum is in default busy state;
The 3rd provides subelement, while being no for the result in described judgment sub-unit, carries out the granting of new round token.
Further, described system can also comprise:
Second acquisition unit, obtain first resource for the duration every predeterminated frequency and distribute daily record;
The 4th allocation units, for according to described resource, distributing daily record, for each strategy group is distributed respectively token number and strategy pattern.
The principle of work of the disk I/O resource allocation device that the present embodiment provides is:
Setting unit sets in advance at least one tactful group, and described tactful group comprises at least one disk partition; The first allocation units distribute respectively token number and strategy pattern for each strategy group; Receiving element receives arbitrary disk I/O request, and described disk I/O request comprises the disk partition sign, and described disk partition sign is for the unique identification disk partition; The first acquiring unit obtains described disk partition and identifies corresponding tactful group; Whether the token number of the described strategy group of judgment unit judges is greater than zero; The second allocation units, are the resource that described disk I/O request distributes described strategy group, and reduce the token number of described strategy group according to the strategy pattern of described strategy group when being in the result of described judging unit; It is no in the result of described judging unit that token is provided unit, and when meeting new round token and providing condition, carries out the granting of new round token.
Wherein, described token is provided unit and is comprised the first granting subelement, and when meeting new round token granting condition, first provides subelement increases default number by All Policies group token number.Described system can also comprise the 3rd allocation units, and the 3rd allocation units are the resource that described disk I/O request distributes described strategy group, and reduces described token number according to the strategy pattern of described strategy group.
Concrete, described the first acquiring unit comprises that first obtains subelement, first obtains subelement obtains the disk partition sign in described disk I/O request; Search subelement and search corresponding disk partition according to described disk partition sign; Second obtains subelement obtains corresponding tactful group of described disk partition.
Concrete, described token is provided unit and is comprised, and when the token number of All Policies group is zero, second provides subelement carries out the granting of new round token; Perhaps, when the token number of All Policies group is not all zero, judgment sub-unit judges that whether strategy group that the token number is maximum is in default busy state; In the result of described judgment sub-unit, while being no, the 3rd provides subelement carries out the granting of new round token.
Further, described system comprises second acquisition unit and the 4th allocation units, and second acquisition unit obtains first resource distribution daily record every the duration of predeterminated frequency; The 4th allocation units distribute daily record according to described resource, for each strategy group is distributed respectively token number and strategy pattern.
The present embodiment sets in advance at least one tactful group, and described tactful group comprises at least one disk partition; At first, distribute respectively token number and strategy pattern for each strategy group; Secondly, receive arbitrary disk I/O request, described disk I/O request comprises the disk partition sign; And obtain described disk partition and identify corresponding tactful group; Finally, judging whether the token number of described strategy group is greater than zero, if so, is the resource that described disk I/O request distributes described strategy group, and reduces the token number of described strategy group according to the strategy pattern of described strategy group; If not,, when meeting new round token granting condition, carry out the granting of new round token.The present embodiment has adopted new token allocation scheme, avoided the waste of disk I/O resource in the resource allocation process, simultaneously, owing to having adopted tactful packet mode, divide and mix more flexibly and can distribute the disk I/O resource for a virtual machine in the disk I/O resource, also can allow the virtual machine of several deployment related application share certain proportion disk I/O resource, reduce blocking up of disk I/O request, improve the utilization factor of disk I/O resource.
For system embodiment, because it corresponds essentially to embodiment of the method, so relevant part gets final product referring to the part explanation of embodiment of the method.System embodiment described above is only schematic, the wherein said unit as the separating component explanation can or can not be also physically to separate, the parts that show as unit can be or can not be also physical locations, can be positioned at a place, or also can be distributed on a plurality of network element.Can select according to the actual needs some or all of module wherein to realize the purpose of the present embodiment scheme.Those of ordinary skills in the situation that do not pay creative work, can understand and implement. 
It should be noted that, in this article, relational terms such as the first and second grades only is used for an entity or operation are separated with another entity or operational zone, and not necessarily requires or imply between these entities or operation the relation of any this reality or sequentially of existing.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby make the process, method, article or the equipment that comprise a series of key elements not only comprise those key elements, but also comprise other key elements of clearly not listing, or also be included as the intrinsic key element of this process, method, article or equipment.In the situation that not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises described key element and also have other identical element.
Above disk I/O resource allocation methods and the device that the embodiment of the present invention is provided is described in detail, applied specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment is just for helping to understand method of the present invention and core concept thereof; , for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention simultaneously.

Claims (12)

1. a disk I/O resource allocation methods, is characterized in that, described method comprises:
Set in advance at least one tactful group, described tactful group comprises at least one disk partition;
For each strategy group is distributed respectively token number and strategy pattern;
Receive arbitrary disk I/O request, described disk I/O request comprises the disk partition sign, and described disk partition sign is for the unique identification disk partition;
Obtain described disk partition and identify corresponding tactful group;
Whether the token number that judges described strategy group is greater than zero, if so, is the resource that described disk I/O request distributes described strategy group, and reduces the token number of described strategy group according to the strategy pattern of described strategy group; If not,, when meeting new round token granting condition, carry out the granting of new round token.
2. method according to claim 1, is characterized in that, described when meeting new round token granting condition, execution new round token is provided, and comprising:
When meeting new round token granting condition, the token number of All Policies group is increased to default number.
3. method according to claim 2, is characterized in that, described method also comprises:
For described disk I/O request distributes the resource of described strategy group, and reduce described token number according to the strategy pattern of described strategy group.
4. method according to claim 1, is characterized in that, describedly obtains described disk partition and identify corresponding tactful group, comprising:
Obtain the disk partition sign in described disk I/O request;
Search corresponding disk partition according to described disk partition sign;
Obtain corresponding tactful group of described disk partition.
5. method according to claim 1, is characterized in that, described when meeting new round token granting condition, execution new round token is provided, and comprising:
When the token number of All Policies group is zero, carry out the granting of new round token;
Perhaps,
When the token number of All Policies group is not all zero, judge that strategy group that the token number is maximum, whether in default busy state, if not, carries out the granting of new round token.
6. according to arbitrary described method in claim 1-5, it is characterized in that, described method also comprises:
Duration every predeterminated frequency obtains first resource distribution daily record;
Distribute daily record according to described resource, for each strategy group is distributed respectively token number and strategy pattern.
7. a disk I/O resource allocation system, is characterized in that, described system comprises:
Setting unit, for setting in advance at least one tactful group, described tactful group comprises at least one disk partition;
The first allocation units, be used to each strategy group to distribute respectively token number and strategy pattern;
Receiving element, for receiving arbitrary disk I/O request, described disk I/O request comprises the disk partition sign, described disk partition sign is for the unique identification disk partition;
The first acquiring unit, identify corresponding tactful group for obtaining described disk partition;
Whether judging unit, be greater than zero for the token number that judges described strategy group;
The second allocation units, when being, be the resource that described disk I/O request distributes described strategy group for the result at described judging unit, and reduce the token number of described strategy group according to the strategy pattern of described strategy group;
Token is provided unit, for the result at described judging unit, is no, and when meeting new round token and providing condition, carries out the granting of new round token.
8. system according to claim 7, is characterized in that, described token is provided unit, comprising:
First provides subelement, for when meeting new round token granting condition, the token number of All Policies group is increased to default number.
9. system according to claim 8, is characterized in that, described system also comprises:
The 3rd allocation units, be used to described disk I/O request to distribute the resource of described strategy group, and reduce described token number according to the strategy pattern of described strategy group.
10. system according to claim 7, is characterized in that, described the first acquiring unit comprises:
First obtains subelement, for obtaining the disk partition sign of described disk I/O request;
Search subelement, for according to described disk partition sign, searching corresponding disk partition;
Second obtains subelement, for obtaining corresponding tactful group of described disk partition.
11. system according to claim 7, is characterized in that, described token is provided unit, comprising:
Second provides subelement, while for the token number when the All Policies group, being zero, carries out the granting of new round token;
Perhaps,
Judgment sub-unit, while for the token number when the All Policies group, being not all zero, judge that whether strategy group that the token number is maximum is in default busy state;
The 3rd provides subelement, while being no for the result in described judgment sub-unit, carries out the granting of new round token.
12. according to arbitrary described system in claim 7-11, it is characterized in that, described system also comprises:
Second acquisition unit, obtain first resource for the duration every predeterminated frequency and distribute daily record;
The 4th allocation units, for according to described resource, distributing daily record, for each strategy group is distributed respectively token number and strategy pattern.
CN201310422054.2A 2013-09-16 2013-09-16 A kind of disk I/O resource allocation methods and device Active CN103440113B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310422054.2A CN103440113B (en) 2013-09-16 2013-09-16 A kind of disk I/O resource allocation methods and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310422054.2A CN103440113B (en) 2013-09-16 2013-09-16 A kind of disk I/O resource allocation methods and device

Publications (2)

Publication Number Publication Date
CN103440113A true CN103440113A (en) 2013-12-11
CN103440113B CN103440113B (en) 2016-09-14

Family

ID=49693804

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310422054.2A Active CN103440113B (en) 2013-09-16 2013-09-16 A kind of disk I/O resource allocation methods and device

Country Status (1)

Country Link
CN (1) CN103440113B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103729145A (en) * 2013-12-19 2014-04-16 华为技术有限公司 IO (input output) request processing method and device
CN104468836A (en) * 2014-12-29 2015-03-25 成都致云科技有限公司 Virtual disk creating method and device and distributed storage system
CN106155764A (en) * 2015-04-23 2016-11-23 阿里巴巴集团控股有限公司 The method and device of scheduling virtual machine input and output resource
US10838842B2 (en) 2015-04-30 2020-11-17 Alibaba Group Holding Limited Method and system of monitoring a service object
US11068586B2 (en) 2015-05-06 2021-07-20 Alibaba Group Holding Limited Virtual host isolation

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102270105A (en) * 2011-08-08 2011-12-07 东软集团股份有限公司 Independent disc array as well as method and system for processing network acquired data

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102270105A (en) * 2011-08-08 2011-12-07 东软集团股份有限公司 Independent disc array as well as method and system for processing network acquired data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王希斌: "虚拟机磁盘I/O带宽分配机制研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103729145A (en) * 2013-12-19 2014-04-16 华为技术有限公司 IO (input output) request processing method and device
CN103729145B (en) * 2013-12-19 2017-06-16 华为技术有限公司 The processing method and processing device of I/O Request
CN104468836A (en) * 2014-12-29 2015-03-25 成都致云科技有限公司 Virtual disk creating method and device and distributed storage system
CN104468836B (en) * 2014-12-29 2019-01-18 成都极驰科技有限公司 Virtual disk creation method and device and distributed memory system
CN106155764A (en) * 2015-04-23 2016-11-23 阿里巴巴集团控股有限公司 The method and device of scheduling virtual machine input and output resource
US10838842B2 (en) 2015-04-30 2020-11-17 Alibaba Group Holding Limited Method and system of monitoring a service object
US11068586B2 (en) 2015-05-06 2021-07-20 Alibaba Group Holding Limited Virtual host isolation

Also Published As

Publication number Publication date
CN103440113B (en) 2016-09-14

Similar Documents

Publication Publication Date Title
CN108701059A (en) Multi-tenant resource allocation methods and system
CN105320561B (en) Task management method and system
CN102063336B (en) Distributed computing multiple application function asynchronous concurrent scheduling method
CN103458052B (en) Resource scheduling method and device based on IaaS cloud platform
CN104699542B (en) Task processing method and system
CN106095590B (en) A kind of method for allocating tasks and device based on thread pool
CN100527119C (en) Information processing apparatus and information processing method
Coffman Jr et al. Computer scheduling methods and their countermeasures
CN103440113A (en) Disk IO (Input/output) resource allocation method and device
CN106406987A (en) Task execution method and apparatus in cluster
CN105389206B (en) A kind of cloud computation data center resources of virtual machine quickly configuration method
CN108519917A (en) A kind of resource pool distribution method and device
CN104023042B (en) Cloud platform resource scheduling method
CN113886034A (en) Task scheduling method, system, electronic device and storage medium
US8862734B2 (en) System and method for selectively controlling the addition of reserve computing capacity
CN108334409A (en) A kind of fine-grained high-performance cloud resource management dispatching method
CN107864211A (en) Cluster resource dispatching method and system
CN108123980A (en) A kind of resource regulating method and system
CN110058940A (en) Data processing method and device under a kind of multi-thread environment
CN106713375A (en) Method and device for allocating cloud resources
CN102629220A (en) Dynamic task allocation and management method
US20140047454A1 (en) Load balancing in an sap system
CN110928649A (en) Resource scheduling method and device
CN116244073A (en) Resource-aware task allocation method for hybrid key partition real-time operating system
CN107562510A (en) The management method and management equipment of a kind of application example

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP02 Change in the address of a patent holder

Address after: 100086 12, 1201, 3 building, 2 South Road, Haidian District Academy of Sciences, Beijing.

Patentee after: Beijing Sohu New Media Information Technology Co., Ltd.

Address before: 100084 Beijing Haidian District Zhongguancun East Road 1 hospital 9 building Sohu cyber Building 8 floor 802 room.

Patentee before: Beijing Sohu New Media Information Technology Co., Ltd.

CP02 Change in the address of a patent holder