CN103929366A - Flow control method and device and equipment - Google Patents

Flow control method and device and equipment Download PDF

Info

Publication number
CN103929366A
CN103929366A CN201410132180.9A CN201410132180A CN103929366A CN 103929366 A CN103929366 A CN 103929366A CN 201410132180 A CN201410132180 A CN 201410132180A CN 103929366 A CN103929366 A CN 103929366A
Authority
CN
China
Prior art keywords
token
formation speed
token formation
interval
numerical value
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
CN201410132180.9A
Other languages
Chinese (zh)
Other versions
CN103929366B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410132180.9A priority Critical patent/CN103929366B/en
Publication of CN103929366A publication Critical patent/CN103929366A/en
Application granted granted Critical
Publication of CN103929366B publication Critical patent/CN103929366B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a flow control method and device and equipment, and belongs to the technical field of networks and storage. The flow control method comprises the steps that the generating speed of the (i-1)th token and the depletion rate of the (i-1)th total token are obtained; according to the generating speed of the (i-1)th token, the depletion rate of the (i-1)th total token and a preset flow control target, the ith adjusting interval is determined, and the generating speed of the ith token is generated according to the ith adjusting interval; the generating speed of the ith token is sent to all nodes to which an object has access so that all the nodes can update the generating speed of the (i-1)th token into the generating speed of the ith token, and flow is controlled according to the generating speed of the ith token. The flow control device comprises a first obtaining module, a first generating module and a first sending module. According to the flow control method and device and the equipment, the problem that the loads among all the nodes are unbalanced due to the fact that the number of processing requirements of the nodes with the large token generating speed is large is solved, and the loads are guided to be balanced among the nodes.

Description

Flow control methods, device and equipment
Technical field
The present invention relates to network technology and technical field of memory, particularly a kind of flow control methods, device and equipment.
Background technology
In distributed system, a user can pass through different node visit Internet resources simultaneously, and different users also can pass through identical node visit Internet resources, and the disposal ability of the request that Internet resources send user is limited, therefore, need to control user's flowing of access.Because user is by node visit Internet resources, therefore, can on node, a limiter of speed be set the user for each access, this limiter of speed is for controlling at the flowing of access of this node this user.In the time that user accesses multiple node simultaneously, also need in node, for being set, coordinate by global coordination device the work of each limiter of speed of this user, to ensure that user can not exceed standard in the total flow of all nodes.Limiter of speed on all nodes of a user of a global coordination management.
In the time carrying out flow control, limiter of speed arranges a token bucket for user, this token bucket generates token with certain speed, node is processed getting the request of after token, user being sent, therefore, limiter of speed can be controlled the processing speed to request by controlling token formation speed, reaches the object of controlling flow.Particularly, global coordination device can be retrieved as this user's performance parameter on Flow Control target that user arranges and each node, calculate respectively the token formation speed of each node according to Flow Control target and each performance parameter, the token formation speed of each node is sent to respectively to corresponding node, so that each node is according to the token formation speed control flow receiving.Wherein, Flow Control target is the maximum token formation speed sum of user on all nodes of access; Performance parameter comprises token formation speed, token depletion rate, the queue depth of request queue and the historical data of this node etc. of node.
In prior art, at least there is following defect:
The request of the node processing that token formation speed is larger is conventionally more, makes the load of this node heavier, causes each internodal load imbalance.
Summary of the invention
Conventionally more in order to solve the request of the node processing that token formation speed is larger, make the load of this node heavier, cause the problem of each internodal load imbalance, the embodiment of the present invention provides a kind of flow control methods, device and equipment.Described technical scheme is as follows:
First aspect, the embodiment of the present invention provides a kind of flow control methods, and described method comprises:
Obtain i-1 token formation speed and i-1 total token depletion rate, described token formation speed is that formation speed and all nodes that described object accesses of token of the Node configuration that accesses for object are identical at the token formation speed of synchronization, the speed sum of described total token depletion rate token that consumes that is all nodes of accessing of described object in the time processing the request that described object sends, i >=2, and i is natural number;
Determine that according to described i-1 token formation speed, described i-1 total token depletion rate and default Flow Control target i is adjusted interval, adjust interval i the token formation speed that generate according to described i;
Each node that sends to described object to access described i token formation speed, so that described i-1 token formation speed is updated to described i token formation speed by each node that described object accesses, carry out flow control according to described i token formation speed.
In the possible implementation of the first of first aspect, describedly determine that according to described i-1 token formation speed, described i-1 total token depletion rate and default Flow Control target i is adjusted interval, adjust interval according to described i and generate i token formation speed, comprising:
Total described i-1 token depletion rate is deducted to described Flow Control target and obtain i-1 difference, described i-1 difference obtained to i-1 ratio divided by described Flow Control target, more described i-1 ratio and default change threshold;
If the absolute value of described i-1 ratio is greater than described change threshold and described i-1 ratio for just, determine that according to described i-1 token formation speed described i is adjusted intervally, generates described i token formation speed.
In conjunction with the possible implementation of the first of first aspect, in the possible implementation of the second of first aspect, after described i-1 ratio and default change threshold, also comprise:
If the absolute value of described i-1 ratio is greater than described change threshold and described i-1 ratio for negative, the numerical value of described i token formation speed is set to the numerical value of the maximum token formation speed that node that described object accesses configures;
If the absolute value of described i-1 ratio is less than described change threshold, the numerical value of described i token formation speed is arranged to the numerical value of described i-1 token formation speed.
In conjunction with the possible implementation of the first of first aspect, in the third possible implementation of first aspect, describedly determine that according to described i-1 token formation speed described i is adjusted intervally, generate described i token formation speed, comprising:
The numerical value of the minimum token formation speed of the node configuration accessing for described object is defined as to described i and adjusts interval minimum value, the numerical value of described i-1 token formation speed is defined as to described i and adjusts interval maximum;
From described i adjustment interval, an optional numerical value is set to the numerical value of described i token formation speed.
In conjunction with the third possible implementation of first aspect, in the 4th kind of possible implementation of first aspect, described described i token formation speed sent to each node that described object accesses after, also comprise:
Obtain described i token formation speed and i total token depletion rate;
Described i total token depletion rate deducted to described Flow Control target and obtain i difference, described i difference obtained to i ratio divided by described Flow Control target, more described i ratio and described change threshold;
If the absolute value of described i ratio is greater than described change threshold and described i ratio for just, adjust interval minimum value by described i and be defined as i+1 the minimum value that adjustment is interval, the numerical value of described i token formation speed is defined as to described i+1 and adjusts interval maximum; If described i ratio is greater than described change threshold and described i ratio is negative, the numerical value of described i token formation speed is defined as to i+1 and adjusts interval minimum value, adjust interval maximum by described i and be defined as described i+1 the maximum that adjustment is interval;
From described i+1 adjustment interval, an optional numerical value is set to the numerical value of i+1 token formation speed;
Each node that sends to described object to access described i+1 token formation speed, so that described i token formation speed is updated to described i+1 token formation speed by each node that described object accesses, carry out flow control according to described i+1 token number formation speed.
In conjunction with the third possible implementation of the possible implementation of the second of the possible implementation of the first of first aspect or first aspect or first aspect or first aspect or the 4th kind of possible implementation of first aspect, in the 5th kind of possible implementation of first aspect, described obtain i-1 token formation speed and i-1 total token depletion rate before, also comprise:
Minimum token formation speed and the maximum token formation speed of the node that described object accesses are set according to described Flow Control target;
The numerical value of described minimum token formation speed is defined as to i-1 and adjusts interval minimum value, the numerical value of described maximum token formation speed is defined as to described i-1 and adjusts interval maximum;
From described i-1 adjustment interval, an optional numerical value is set to the numerical value of described i-1 token formation speed;
Each node that sends to described object to access described i-1 token formation speed, so that each node that described object accesses carries out flow control according to described i-1 token formation speed.
Second aspect, the embodiment of the present invention provides a kind of volume control device, and described device comprises:
The first acquisition module, be used for obtaining i-1 token formation speed and i-1 total token depletion rate, described token formation speed is that formation speed and all nodes that described object accesses of token of the Node configuration that accesses for object are identical at the token formation speed of synchronization, the speed sum of described total token depletion rate token that consumes that is all nodes of accessing of described object in the time processing the request that described object sends, i >=2, and i is natural number;
The first generation module, determine that for described i-1 the token formation speed getting according to described the first acquisition module, described i-1 total token depletion rate and default Flow Control target i is adjusted interval, adjust interval i the token formation speed that generate according to described i;
The first sending module, each node that sends to described object to access for described i the token formation speed that described the first generation module is generated, so that each and every one token formation speed of described i-1 is updated to described i token formation speed by each node that described object accesses, carry out flow control according to described i token formation speed.
In the possible implementation of the first of second aspect, described the first generation module, comprising:
Data comparing unit, for being deducted to described Flow Control target, described i-1 total token depletion rate obtain i-1 difference, described i-1 difference obtained to i-1 ratio divided by described Flow Control target, more described i-1 ratio and default change threshold;
The first generation unit, for relatively showing that at described data comparing unit the absolute value of described i-1 ratio is greater than described change threshold and described i-1 ratio is timing, determine that according to described i-1 token formation speed described i is adjusted interval, generates described i token formation speed.
In conjunction with the possible implementation of the first of second aspect, in the possible implementation of the second of second aspect, described the first generation module, also comprises:
The second generation unit, for relatively showing that at described data comparing unit the absolute value of described i-1 ratio is greater than described change threshold and described i-1 ratio when bearing, the numerical value of described i token formation speed is set to the numerical value of the maximum token formation speed that node that described object accesses configures;
The 3rd generation unit, in the time that described data comparing unit relatively show that the absolute value of described i-1 ratio is less than described change threshold, is arranged to the numerical value of described i token formation speed the numerical value of described i-1 token formation speed.
In conjunction with the possible implementation of the first of second aspect, in the third possible implementation of second aspect, described the first generation unit, adjust interval minimum value specifically for the numerical value of the minimum token formation speed of the node configuration accessing for described object is defined as to described i, the numerical value of described i-1 token formation speed is defined as to described i and adjusts interval maximum; From described i adjustment interval, an optional numerical value is set to the numerical value of described i token formation speed.
In conjunction with the third possible implementation of second aspect, in the 4th kind of possible implementation of second aspect, described device, also comprises:
The second acquisition module, after described i token formation speed being sent to each node that described object accesses for described the first sending module, obtains described i token formation speed and i total token depletion rate;
Data comparison module, deduct described Flow Control target for described i total token depletion rate that described the second acquisition module is got and obtain i difference, described i difference obtained to i ratio divided by described Flow Control target, more described i ratio and described change threshold;
Interval determination module, for relatively showing that in described data comparison module the absolute value of described i ratio is greater than described change threshold and described i ratio is timing, adjust interval minimum value by described i and be defined as i+1 the minimum value that adjustment is interval, the numerical value of described i token formation speed is defined as to described i+1 and adjusts interval maximum; Relatively show that in described data comparison module the absolute value of described i ratio is greater than described change threshold and described i ratio when negative, the numerical value of described i token formation speed is defined as to i+1 and adjusts interval minimum value, adjust interval maximum by described i and be defined as described i+1 the maximum that adjustment is interval;
The second generation module, for being set to the numerical value of described i+1 token formation speed from definite described i+1 the optional numerical value in adjustment interval of described interval determination module;
The second sending module, each node that sends to described object to access for described i+1 the token formation speed that described the second generation module is generated, so that described i token formation speed is updated to described i+1 token formation speed by each node that described object accesses, carry out flow control according to described i+1 token number formation speed.
In conjunction with the third possible implementation of the possible implementation of the second of the possible implementation of the first of second aspect or second aspect or second aspect or second aspect or the 4th kind of possible implementation of second aspect, in the 5th kind of possible implementation of second aspect, described device, also comprises:
Speed arranges module, obtain i-1 token formation speed and i-1 always before token depletion rate for described the first acquisition module, minimum token formation speed and the maximum token formation speed of the node that described object accesses is set according to described Flow Control target;
Interval arranges module, be defined as i-1 the minimum value that adjustment is interval for described speed being arranged to the numerical value of the described minimum token formation speed of module setting, the numerical value of described maximum token formation speed be defined as to described i-1 and adjust interval maximum;
The 3rd generation module, for being set to the numerical value of described i-1 token formation speed from described i-1 the optional numerical value in adjustment interval;
The 3rd sending module, each node that sends to described object to access for described i-1 the token formation speed that described the 3rd generation module is generated, so that each node that described object accesses carries out flow control according to described i-1 token formation speed.
The third aspect, the embodiment of the present invention provides a kind of global coordination device, and described global coordination device comprises the volume control device as described in second aspect.
By obtaining i-1 token formation speed and i-1 total token depletion rate, determine that according to i-1 token formation speed, i-1 total token depletion rate and default Flow Control target i is adjusted interval, adjust interval i the token formation speed that generate for base area i, each node that sends to object to access i token formation speed, so that i-1 token formation speed is updated to i token formation speed by each node that object accesses, carry out flow control according to i token formation speed, because i token formation speed of each node that sends to object to access is identical, therefore, the number of request of each node processing that object accesses is identical, the request that has solved the node processing that token formation speed is larger is conventionally more, make the load of this node heavier, cause the problem of each internodal load imbalance, reach guiding and loaded on effect balanced between node.
Brief description of the drawings
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing of required use during embodiment is described is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the method flow diagram of the flow control methods that provides of one embodiment of the invention;
Fig. 2 is the method flow diagram of the flow control methods that provides of another embodiment of the present invention;
Fig. 3 is the structural framing figure of the volume control device that provides of one embodiment of the invention;
Fig. 4 is the structural framing figure of the volume control device that provides of yet another embodiment of the invention;
Fig. 5 is the structural framing figure of the volume control device that provides of one embodiment of the invention;
Fig. 6 is the structural framing figure of the volume control device that provides of yet another embodiment of the invention.
Embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Please refer to Fig. 1, it shows the method flow diagram of the flow control methods that one embodiment of the invention provides, and this volume control device can be applied in global coordination device.This flow control methods, comprising:
Step 101, obtain i-1 token formation speed and i-1 total token depletion rate, this token formation speed is that formation speed and all nodes that this object accesses of token of the Node configuration that accesses for object are identical at the token formation speed of synchronization, this total token depletion rate be all nodes of accessing of object send at handling object request time the token that consumes speed sum, i >=2, and i is natural number;
In the present embodiment, object refers to the main body that can carry Flow Control, can be user, application, single LUN(Logical Unit Number.LUN), one group of LUN, catalogue and file etc., the present embodiment does not limit object.
The node accessing due to object comprises a limiter of speed corresponding with this object, this limiter of speed can record certain a period of time interior nodes and process the request that this object sends and token formation speed and the token depletion rate producing, therefore, global coordination device can be collected token formation speed and the token depletion rate of each nodes records in i-1 time period, and determines i-1 token formation speed and i-1 total token depletion rate according to the token formation speed of collecting and token depletion rate.Wherein, token formation speed refers to that the token bucket of the Node configuration accessing for object generates the speed of token, and token depletion rate refers to the speed of the token that request consumes that the token bucket handling object in the node that object accesses sends.
The token formation speed of the each node accessing due to same target in the present embodiment is identical, therefore, global coordination device can obtain each node that object accesses token formation speed within i-1 time period, and therefrom selects arbitrarily a token formation speed to be defined as i-1 token formation speed; Or global coordination device can only be collected the token formation speed of some nodes within i-1 time period, and this token formation speed is defined as to i-1 token formation speed.In addition, the token depletion rate of all nodes that global coordination device also accesses object within i-1 time period is added, and the token depletion rate sum obtaining after being added is defined as to i-1 total token depletion rate.
Step 102, determines that according to i-1 token formation speed, i-1 total token depletion rate and default Flow Control target i is adjusted interval, adjusts interval i the token formation speed that generate according to i;
Wherein, Flow Control target is used to indicate the maximum token formation speed sum of all nodes that object accesses.Adjust the interval interval for generating i token formation speed that refers to for i.
Step 103, each node that sends to object to access i token formation speed, so that i-1 token formation speed is updated to i token formation speed by each node that object accesses, carries out flow control according to i token formation speed.
Each node that global coordination device sends to object to access i token formation speed, the token formation speed of the limiter of speed token bucket in each node that object accesses is set to i token formation speed by i-1 token formation speed, generate token according to this i token formation speed, and according to the token generating, the request of object transmission is processed, the flow of object is controlled by i token formation speed thereby realize.
In sum, the flow control methods that the embodiment of the present invention provides, by obtaining i-1 token formation speed and i-1 total token depletion rate, determine that according to i-1 token formation speed, i-1 total token depletion rate and default Flow Control target i is adjusted interval, adjust interval i the token formation speed that generate for base area i, each node that sends to object to access i token formation speed, so that i-1 token formation speed is updated to i token formation speed by each node that object accesses, carry out flow control according to i token formation speed, because i token formation speed of each node that sends to object to access is identical, therefore, the number of request of each node processing that object accesses is identical, the request that has solved the node processing that token formation speed is larger is conventionally more, make the load of this node heavier, cause the problem of each internodal load imbalance, reach guiding and loaded on effect balanced between node.
Please refer to Fig. 2, it shows the method flow diagram of the flow control methods that another embodiment of the present invention provides, and this volume control device can be applied in global coordination device.This flow control methods, comprising:
Step 201, arranges minimum token formation speed and the maximum token formation speed of the node that object accesses according to Flow Control target; The numerical value of minimum token formation speed is defined as to i-1 and adjusts interval minimum value, the numerical value of maximum token formation speed is defined as to i-1 and adjusts interval maximum; From i-1 adjustment interval, an optional numerical value is set to the numerical value of i-1 token formation speed; Each node that sends to object to access i-1 token formation speed, so that each node that object accesses carries out flow control according to i-1 token formation speed;
In the time that a token represents a request, node need to obtain a token this request is processed from token bucket, and token formation speed now equals IOPS(Input/Output Per Second, request number per second); In the time that a token represents predetermined bite, node need to obtain " request word joint number/predetermined byte number " individual token this request is processed from token bucket, token formation speed now equals MBPS(Mega Bytes Per Second, request byte number per second)/predetermined byte number.Conventionally, predetermined byte number is 512 bytes, to ensure that a token allows the request of a minimum byte number to pass through.
Because Internet resources are limited to the disposal ability of request, therefore, burst request for fear of some objects too much takies a large amount of Internet resources, cause other objects cannot use the problem of these Internet resources, maximum burst number of request or maximum burst request word joint number that Flow Control target limits object can be set, and this maximum burst number of request or maximum burst request word joint number are set to the maximum token formation speed of node.Wherein, object refers to the main body that can carry Flow Control, can be user, application, single LUN, one group of LUN, catalogue and file etc., and the present embodiment does not limit object.Flow Control target is used to indicate the maximum token formation speed sum of all nodes that object accesses.
Such as, the Flow Control target of object is 100IOPS, the maximum token formation speed that each node can be set is 100IOPS/ second.In the time of the minimum token formation speed of computing node, a kind of account form be the numerical value of minimum token formation speed equal Flow Control target numerical value divided by nodes.Such as, the number of the node that object accesses is 5, the Flow Control target of object is 100IOPS, minimum token formation speed=100/5=20IOPS/ second.Certainly, can also be set to 0 other numerical value such as grade by minimum token formation speed, the present embodiment is not construed as limiting.
Because global coordination device is that the numerical value that generates for the first time i-1 token formation speed and i-1 token formation speed need to be greater than the numerical value of minimum token formation speed and be less than the numerical value of maximum token formation speed, therefore, global coordination device can be defined as the numerical value of minimum token formation speed i-1 and adjust interval minimum value, the numerical value of maximum token formation speed is defined as to i-1 and adjusts interval maximum, and an optional numerical value is set to the numerical value of i-1 token formation speed from i-1 adjustment interval.Wherein, i-1 in the present embodiment adjusts the interval interval for generating i-1 token formation speed that refers to.Such as, i-1 is adjusted interval is (20,100), the numerical value of i-1 token formation speed of global coordination device setting can be 21,35,98 etc.
When global coordination device is selected numerical value in i-1 is adjusted interval, can in i-1 is adjusted interval, select a numerical value randomly, also can calculate a numerical value by adjusting the interval pre-defined algorithm of carrying out to i-1, can also carry out pre-defined algorithm and obtain belonging to an i-1 numerical value adjusting interval, the present embodiment does not limit the selection mode to numerical value in i-1 adjustment interval.The selection mode of exchanging middle numerical value between main plot hereinafter relating to can be identical with the selection mode in this step, also can be different, and the present embodiment does not remake and repeats.
Further, each node that global coordination device sends to object to access i-1 the token formation speed generating, the token formation speed of the limiter of speed token bucket in each node that object accesses is set to i-1 token formation speed, generate token according to this i-1 token formation speed, request object being sent according to the token generating is processed.
Step 202, obtain i-1 token formation speed and i-1 total token depletion rate, this token formation speed is that formation speed and all nodes that object accesses of token of the Node configuration that accesses for object are identical at the token formation speed of synchronization, this total token depletion rate be all nodes of accessing of object send at handling object request time the token that consumes speed sum, i >=2, and i is natural number;
The node accessing due to object comprises a limiter of speed corresponding with this object, this limiter of speed can record certain a period of time interior nodes and process the request that this object sends and token formation speed and the token depletion rate producing, therefore, global coordination device can be collected token formation speed and the token depletion rate of each nodes records in i-1 time period, and determines i-1 token formation speed and i-1 total token depletion rate according to the token formation speed of collecting and token depletion rate.Wherein, token formation speed refers to that the token bucket of the Node configuration accessing for object generates the speed of token, and token depletion rate refers to the speed of the token that request consumes that the token bucket handling object in the node that object accesses sends.
The token formation speed of the each node accessing due to same target in the present embodiment is identical, therefore, global coordination device can obtain each node that object accesses token formation speed within i-1 time period, and therefrom selects arbitrarily a token formation speed to be defined as i-1 token formation speed; Or global coordination device can only be collected the token formation speed of some nodes within i-1 time period, and this token formation speed is defined as to i-1 token formation speed.In addition, the token depletion rate of all nodes that global coordination device also accesses object within i-1 time period is added, and the token depletion rate sum obtaining after being added is defined as to i-1 total token depletion rate.
Step 203, determines that according to i-1 token formation speed, i-1 total token depletion rate and default Flow Control target i is adjusted interval, adjusts interval i the token formation speed that generate according to i;
Particularly, determine that according to i-1 token formation speed, the individual total token depletion rate of i-1 and default Flow Control target i is adjusted interval, adjust interval according to i and generate i token formation speed, comprising:
Total i-1 token depletion rate is deducted to Flow Control target and obtain i-1 difference, i-1 difference obtained to i-1 ratio divided by Flow Control target, i-1 ratio of comparison and default change threshold;
If the absolute value of i-1 ratio is greater than change threshold and i-1 ratio for just, determine that according to i-1 token formation speed i is adjusted intervally, generates i token formation speed.
In the present embodiment, the adjustment aim of global coordination device is that the numerical value of total token depletion rate is adjusted to the numerical value that is similar to Flow Control target, the request that so both at utmost handling object sends, to improve throughput of system, also can avoid generating the wasting of resources that unnecessary token causes.And total token depletion rate is real-time change, therefore, global coordination device can repeatedly be added up total token depletion rate, draws the mean change scope of total token depletion rate, generates change threshold according to the mean change scope of total token depletion rate.
Therefore, global coordination device can calculate the poor of i-1 total token depletion rate and Flow Control target, obtains i-1 difference; Calculate again the ratio of i-1 difference with respect to Flow Control target, obtain i-1 ratio; And this i-1 ratio and change threshold are compared.Particularly, in the time calculating i-1 ratio, suppose that Flow Control target is 100IOPS, if i-1 total token depletion rate is 110IOPS, i-1 ratio=(110-100)/100=10%.
If the absolute value of i-1 ratio is greater than change threshold, can think that i-1 total token depletion rate and Flow Control target differ larger, now need to calculate i token formation speed.Further, in the time that the absolute value of i-1 ratio is greater than change threshold, also need to determine whether i-1 ratio is positive number.If i-1 ratio is positive number, the numerical value of i-1 total token depletion rate is greater than the numerical value of Flow Control target, i token formation speed need to be set and be less than i-1 token formation speed, make i total token depletion rate be less than i-1 total token depletion rate.
In the present embodiment, global coordination device can make i token formation speed be less than i-1 token formation speed by reducing i the interval span of adjustment.Wherein, determine that according to i-1 token formation speed i is adjusted interval, generate i token formation speed, comprising:
1) numerical value of the minimum token formation speed of the node configuration accessing for object is defined as to i and adjusts interval minimum value, the numerical value of i-1 token formation speed is defined as to i and adjusts interval maximum;
2) from i the numerical value of adjusting an optional numerical value interval and be set to i token formation speed.
Because i token formation speed is less than i-1 token formation speed, therefore, the numerical value that global coordination device can i-1 token formation speed is set to i and adjusts interval maximum; In addition, the numerical value of i token formation speed need to be more than or equal to the numerical value of minimum token formation speed, therefore, global coordination device can minimum token formation speed numerical value be set to i and adjust interval minimum value, determine i adjust interval, global coordination device again from i adjustment interval an optional numerical value be set to the numerical value of i token formation speed.
In the present embodiment, relatively, after i-1 ratio and default change threshold, also comprise:
1), if the absolute value of i-1 ratio is greater than change threshold and i-1 ratio for negative, the numerical value of i token formation speed is set to the numerical value of the maximum token formation speed that node that object accesses configures;
2) if the absolute value of i-1 ratio is less than change threshold, the numerical value of i token formation speed is arranged to the numerical value of i-1 token formation speed.
First, if the absolute value of i-1 ratio is greater than change threshold and i-1 ratio is negative, the numerical value of i-1 total token depletion rate is less than the numerical value of Flow Control target, the number of request that now object sends is less, do not need the flow of object to control, the numerical value of i token formation speed can be set to the numerical value of the maximum token formation speed of the node that object accesses.
Second, if the absolute value of i-1 ratio is less than change threshold, can think that the numerical approximation of the total token depletion rate of i-1 is in the numerical value of Flow Control target, now the numerical value of i token formation speed of global coordination device is set to the numerical value of i-1 token formation speed, process ends.
Step 204, each node that sends to object to access i token formation speed, so that i-1 token formation speed is updated to i token formation speed by each node that object accesses, carries out flow control according to i token formation speed.
Each node that global coordination device sends to object to access i token formation speed, the token formation speed of the limiter of speed token bucket in each node that object accesses is set to i token formation speed by i-1 token formation speed, generate token according to this i token formation speed, and according to the token generating, the request of object transmission is processed, the flow of object is controlled by i token formation speed thereby realize.
It should be added that, when the node that object accesses is processed in request object being sent according to i token formation speed, the numerical value of i total token depletion rate may or differ larger with the numerical value of Flow Control target, therefore, global coordination device can also generate i+1 token formation speed, always the numerical value of token depletion rate can be than the individual always token depletion rate of i closer to the numerical value of Flow Control target to make i+1, after i token formation speed being sent to each node that object accesses, also comprise:
1) obtain i token formation speed and i total token depletion rate;
2) i total token depletion rate deducted to Flow Control target and obtain i difference, i difference obtained to i ratio divided by Flow Control target, compare i ratio and change threshold;
3) if the absolute value of i ratio is greater than change threshold and i ratio for just, adjust interval minimum value by i and be defined as i+1 the minimum value that adjustment is interval, the numerical value of i token formation speed is defined as to i+1 and adjusts interval maximum; If i ratio is greater than change threshold and i ratio for negative, the numerical value of i token formation speed is defined as to i+1 and adjusts interval minimum value, i the interval maximum of adjustment is defined as to i+1 the maximum that adjustment is interval;
4) from i+1 the numerical value of adjusting an optional numerical value interval and be set to i+1 token formation speed;
5) each node that sends to object to access i+1 token formation speed, so that i token formation speed is updated to i+1 token formation speed by each node that object accesses, carries out flow control according to i+1 token number formation speed.
After the node that object accesses carries out flow control according to i token formation speed, global coordination device obtains i the token formation speed and i the total token depletion rate that within i time period, record after predetermined time interval, according to i token formation speed, the individual total token depletion rate of i and Flow Control target determine that i+1 is adjusted interval, adjust interval i+1 the token formation speed that generate according to i+1, and each node that sends to object to access i+1 token formation speed, each node that object accesses carries out flow control according to i+1 token formation speed.
In the time determining that i+1 adjustment is interval, global coordination device need to compare i the ratio calculating and change threshold, if the absolute value of i ratio is greater than change threshold and i ratio for just, determine that i total token depletion rate is greater than Flow Control target, now can arrange i+1 token formation speed and be less than i token formation speed; If the absolute value of i ratio is greater than change threshold and i ratio is negative, determine that i total token depletion rate is less than Flow Control target, now can arrange i+1 token formation speed and be greater than i token formation speed.
In the time i+1 token formation speed be set be less than i token formation speed, adjust interval minimum value and be less than i the maximum that adjustment is interval because the numerical value of i token formation speed is greater than i, now global coordination device can be adjusted interval minimum value by i and be defined as i+1 the minimum value that adjustment is interval, i token formation speed is defined as to i+1 and adjusts interval maximum, obtain i+1 and adjust interval, from i adjustment interval, an optional numerical value is set to the numerical value of i+1 token formation speed.Such as, i token formation speed is 76IOPS, and i is adjusted interval is (20,100), and i+1 the adjustment interval that global coordination device is determined is (20,76).
In the time i+1 token formation speed be set be greater than i token formation speed, adjust interval minimum value and be less than i the maximum that adjustment is interval because the numerical value of i token formation speed is greater than i, now global coordination device can be defined as i token formation speed i+1 and adjust interval minimum value, adjust interval maximum by i and be defined as i+1 the maximum that adjustment is interval, obtain i+1 and adjust interval, from i adjustment interval, an optional numerical value is set to the numerical value of i+1 token formation speed.Such as, i token formation speed is 50IOPS, and i is adjusted interval is (20,100), and i+1 the adjustment interval that global coordination device is determined is (50,100).
In the present embodiment, i+1 total token depletion rate may or differ larger with Flow Control target, therefore, global coordination device can also repeatedly generate token formation speed based on i+1 token formation speed, makes the numerical value of the total token depletion rate corresponding with token formation speed can be similar to the numerical value of Flow Control target.Particularly, global coordination device is updated to i+1 every the scheduled time by i, again carry out the above-mentioned step of obtaining i token formation speed and i i-1 total token depletion rate, until the absolute value of i ratio is while being less than change threshold, the numerical value of i token formation speed is set to the numerical value of i-1 token formation speed, end loop.
It should be added that, if the number of request that object sends is less, the number of request that global coordination device can also send object is again verified, need to control the flow of object further determining whether, after i token formation speed being sent to each node that object accesses, also comprise:
1) obtain i token formation speed and i total token depletion rate;
2) i total token depletion rate deducted to Flow Control target and obtain i difference, i difference obtained to i ratio divided by Flow Control target, compare i ratio and change threshold;
3) if the numerical value of i token formation speed equals the numerical value of maximum token formation speed and the absolute value of i ratio is greater than change threshold and i ratio is negative, the numerical value of i token formation speed is still set to the numerical value of maximum token formation speed.
After the node that object accesses carries out flow control according to i token formation speed, global coordination device obtains i the token formation speed and i the total token depletion rate that within i time period, record after predetermined amount of time, calculates i ratio according to i total token depletion rate and Flow Control target.If the numerical value of i token formation speed equals the numerical value of maximum token formation speed and the absolute value of i ratio is greater than change threshold and i ratio is negative, determine that the result is not need the flow of object to control, now still the numerical value of i+1 token formation speed is set to the numerical value of maximum token formation speed, process ends.
In the present embodiment, global coordination device can generate token formation speed by dichotomy, geometric ratio method scheduling algorithm in adjustment interval, and for the ease of understanding, the present embodiment describes the computational process of token formation speed as an example of dichotomy example.Suppose object has accessed 5 nodes, and Flow Control target is 100IOPS, and change threshold is 10%, and idiographic flow is as follows:
The first, the token depletion rate of the object of supposing load operation on each node is fixed as 120IOPS, and because 120IOPS is greater than 100IOPS, therefore, the follow-up token depletion rate that object is carried out in flow control process equals token formation speed all the time;
1, minimum token formation speed and the maximum token formation speed of the node that object accesses are set according to Flow Control target, suppose that minimum token speed is 0, maximum token formation speed is 100IOPS;
2, determine that according to the numerical value of the numerical value of minimum token formation speed and maximum token formation speed the 1st is adjusted interval for (0,100), the 1st token formation speed=(0+100)/2=50IOPS, each node that sends to object to access 50IOPS, the 1st token formation speed of each node token bucket that object accesses is set to 50IOPS;
3, obtaining the 1st total token depletion rate is 505=250IOPS, the 1st ratio=(250-100)/100=150%, because the 1st ratio 150% is greater than change threshold 10% and the 1st ratio for just, minimum token formation speed 0 is defined as to the 2nd and adjusts interval minimum value, the 1st token formation speed 50 is defined as to the 2nd and adjusts interval maximum, obtain the 2nd and adjust interval (0, 50), the 2nd token formation speed=(0+50)/2=25IOPS, each node that sends to object to access 25IOPS, the 2nd token formation speed of each node token bucket that object accesses is set to 25IOPS,
4, obtaining the 2nd total token depletion rate is 255=125IOPS, the 2nd ratio=(125-100)/100=12.5%, because the 2nd ratio 12.5% is greater than change threshold 10% and the 2nd ratio for just, minimum token formation speed 0 is defined as to the 3rd and adjusts interval minimum value, the 2nd token formation speed 25 is defined as to the 3rd and adjusts interval maximum, obtain the 3rd and adjust interval (0, 25), the 3rd token formation speed=(0+25)/2=12.5IOPS, each node that sends to object to access 12.5IOPS, the 3rd token formation speed of each node token bucket that object accesses is set to 12.5IOPS,
5, obtaining the 3rd total token depletion rate is 12.55=62.5IOPS, the 3rd ratio=(62.5-100)/100=-37.5%, because the absolute value of the 3rd ratio-37.5% is greater than change threshold 10% and the 3rd ratio for negative, the 3rd token formation speed 12.5 is defined as to the 4th and adjusts interval minimum value, adjust interval maximum 25 by the 3rd and be set to the 4th maximum that adjustment is interval, obtain the 4th and adjust interval (12.5, 25), the 4th token formation speed=(12.5+25)/2=18.75IOPS, each node that sends to object to access 18.75IOPS, the 4th token formation speed of each node token bucket that object accesses is set to 18.75IOPS,
6, obtaining the 4th total token depletion rate is 18.755=93.75IOPS, and the 4th ratio=(93.75-100)/100=-6.25%, because the absolute value of the 4th ratio-6.25% is less than change threshold 10%, process ends.
The second, the token depletion rate of the object of supposing load operation on each node is fixed as 12IOPS;
1, minimum token formation speed and the maximum token formation speed of the node that object accesses are set according to Flow Control target, suppose that minimum token speed is 0, maximum token formation speed is 100IOPS;
2, determine that according to the numerical value of the numerical value of minimum token formation speed and maximum token formation speed the adjustment of the 1st is interval for (0,100), the 1st token formation speed=(0+100)/2=50IOPS, each node that sends to object to access 50IOPS, the 1st token formation speed of each node token bucket that object accesses is set to 50IOPS;
3, obtaining the 1st total token depletion rate is 125=60IOPS, the 1st ratio=(60-100)/100=-40%, because the absolute value of the 1st ratio-40% is greater than change threshold 10% and the 1st ratio for negative, the numerical value of the 2nd token formation speed is set to the numerical value of maximum token formation speed, i.e. the 2nd token formation speed=100IOPS, each node that sends to object to access 100IOPS, the 2nd token formation speed of each node token bucket that object accesses is set to 100IOPS;
4, obtaining the 2nd total token depletion rate is 125=60IOPS, the 2nd ratio=(60-100)/100=-40%, because the 2nd the token formation speed absolute value that is 100IOPS and the 2nd ratio-40% is greater than change threshold 10% and the 2nd ratio for negative, process ends.
In sum, the flow control methods that the embodiment of the present invention provides, by obtaining i-1 token formation speed and i-1 total token depletion rate, determine that according to i-1 token formation speed, i-1 total token depletion rate and default Flow Control target i is adjusted interval, adjust interval i the token formation speed that generate for base area i, each node that sends to object to access i token formation speed, so that i-1 token formation speed is updated to i token formation speed by each node that object accesses, carry out flow control according to i token formation speed, because i token formation speed of each node that sends to object to access is identical, therefore, the number of request of each node processing that object accesses is identical, the request that has solved the node processing that token formation speed is larger is conventionally more, make the load of this node heavier, cause the problem of each internodal load imbalance, reach guiding and loaded on effect balanced between node.
In addition, be defined as i+1 the minimum value that adjustment is interval by adjusting interval minimum value by i, the numerical value of i token formation speed be defined as to i+1 and adjust interval maximum; Or, the numerical value of i token formation speed is defined as to i+1 and adjusts interval minimum value, adjust interval maximum by i and be defined as i+1 the maximum that adjustment is interval, from i+1 adjustment interval, an optional numerical value is set to the numerical value of i+1 token formation speed, can adjust interval according to i that progressively dwindles and make i token formation speed be similar to i-1 total token depletion rate, improve the control efficiency of flow control.
Please refer to Fig. 3, it shows the structural framing figure of the volume control device that one embodiment of the invention provides, and this volume control device can be applied in global coordination device.This volume control device, comprising:
The first acquisition module 301, be used for obtaining i-1 token formation speed and i-1 total token depletion rate, token formation speed is that formation speed and all nodes that object accesses of token of the Node configuration that accesses for object are identical at the token formation speed of synchronization, total token depletion rate be all nodes that object accesses send at handling object request time the token that consumes speed sum, i >=2, and i is natural number;
The first generation module 302, determine that for i-1 the token formation speed, i-1 total token depletion rate and the default Flow Control target that get according to the first acquisition module 301 i is adjusted interval, adjust interval i the token formation speed that generate according to i;
The first sending module 303, each node that sends to object to access for i the token formation speed that the first generation module 302 is generated, so that each and every one token formation speed of i-1 is updated to i token formation speed by each node that object accesses, carry out flow control according to i token formation speed.
In sum, the volume control device that the embodiment of the present invention provides, by obtaining i-1 token formation speed and i-1 total token depletion rate, determine that according to i-1 token formation speed, i-1 total token depletion rate and default Flow Control target i is adjusted interval, adjust interval i the token formation speed that generate for base area i, each node that sends to object to access i token formation speed, so that i-1 token formation speed is updated to i token formation speed by each node that object accesses, carry out flow control according to i token formation speed, because i token formation speed of each node that sends to object to access is identical, therefore, the number of request of each node processing that object accesses is identical, the request that has solved the node processing that token formation speed is larger is conventionally more, make the load of this node heavier, cause the problem of each internodal load imbalance, reach guiding and loaded on effect balanced between node.
Please refer to Fig. 4, it shows the structural framing figure of the volume control device that yet another embodiment of the invention provides, and this volume control device can be applied in global coordination device.This volume control device, comprising: the first acquisition module 301, the first generation module 302 and the first sending module 303.
The first acquisition module 301, be used for obtaining i-1 token formation speed and i-1 total token depletion rate, token formation speed is that formation speed and all nodes that object accesses of token of the Node configuration that accesses for object are identical at the token formation speed of synchronization, total token depletion rate be all nodes that object accesses send at handling object request time the token that consumes speed sum, i >=2, and i is natural number;
The first generation module 302, determine that for i-1 the token formation speed, i-1 total token depletion rate and the default Flow Control target that get according to the first acquisition module 301 i is adjusted interval, adjust interval i the token formation speed that generate according to i;
The first sending module 303, each node that sends to object to access for i the token formation speed that the first generation module 302 is generated, so that each and every one token formation speed of i-1 is updated to i token formation speed by each node that object accesses, carry out flow control according to i token formation speed.
Optionally, the first generation module 302, comprising:
Data comparing unit 3021, obtains i-1 difference for total i-1 token depletion rate is deducted to Flow Control target, and each and every one difference of i-1 is obtained to i-1 ratio divided by Flow Control target, i-1 ratio of comparison and default change threshold;
The first generation unit 3022, for relatively showing that at data comparing unit 3021 absolute value of i-1 ratio is greater than change threshold and i-1 ratio is timing, determine that according to i-1 token formation speed i is adjusted interval, generates i token formation speed.
Optionally, the first generation module 302, also comprises:
The second generation unit 3023, for relatively showing that at data comparing unit 3021 absolute value of i-1 ratio is greater than change threshold and i-1 ratio when bearing, the numerical value of i token formation speed is set to the numerical value of the maximum token formation speed that node that object accesses configures;
The 3rd generation unit 3024, in the time that data comparing unit 3021 relatively show that the absolute value of i-1 ratio is less than change threshold, is arranged to the numerical value of i token formation speed the numerical value of i-1 token formation speed.
Optionally, the first generation unit 3022, adjust interval minimum value specifically for the numerical value of the minimum token formation speed of the node configuration accessing for object is defined as to i, the numerical value of i-1 token formation speed is defined as to i and adjusts interval maximum; From i adjustment interval, an optional numerical value is set to the numerical value of i token formation speed.
Optionally, device, also comprises:
The second acquisition module 304, after i token formation speed being sent to each node that object accesses for the first sending module 303, obtains i token formation speed and i total token depletion rate;
Data comparison module 305, deducts default Flow Control target for i total token depletion rate that the second acquisition module 304 is got and obtains i difference, and i difference obtained to i ratio divided by Flow Control target, compares i ratio and change threshold;
Interval determination module 306, for relatively showing that in data comparison module 305 absolute value of i ratio is greater than change threshold and i ratio is timing, adjust interval minimum value by i and be defined as i+1 the minimum value that adjustment is interval, the numerical value of i token formation speed is defined as to i+1 and adjusts interval maximum; Relatively show that in data comparison module 305 absolute value of i ratio is greater than change threshold and i ratio when negative, the numerical value of i token formation speed is defined as to i+1 and adjusts interval minimum value, adjust interval maximum by i and be defined as i+1 the maximum that adjustment is interval;
The second generation module 307, for being set to the numerical value of i+1 token formation speed from i+1 the definite optional numerical value in adjustment interval of interval determination module 306;
The second sending module 308, each node that sends to object to access for i+1 the token formation speed that the second generation module 307 is generated, so that i token formation speed is updated to i+1 token formation speed by each node that object accesses, carry out flow control according to i+1 token number formation speed.
Optionally, device, also comprises:
Speed arranges module 309, before obtaining i-1 token formation speed and i-1 total token depletion rate, minimum token formation speed and the maximum token formation speed of the node that object accesses is set for the first acquisition module 301 according to Flow Control target;
Interval arranges module 310, is defined as i-1 and adjusts interval minimum value for speed being arranged to the numerical value of the minimum token formation speed that module 309 arranges, and the numerical value of maximum token formation speed is defined as to i-1 the maximum that adjustment is interval;
The 3rd generation module 311, for being set to the numerical value of i-1 token formation speed from i-1 the optional numerical value in adjustment interval;
The 3rd sending module 312, each node that sends to object to access for i-1 the token formation speed that the 3rd generation module 311 is generated, so that each node that object accesses carries out flow control according to i-1 token formation speed.
In sum, the volume control device that the embodiment of the present invention provides, by obtaining i-1 token formation speed and i-1 total token depletion rate, determine that according to i-1 token formation speed, i-1 total token depletion rate and default Flow Control target i is adjusted interval, adjust interval i the token formation speed that generate for base area i, each node that sends to object to access i token formation speed, so that i-1 token formation speed is updated to i token formation speed by each node that object accesses, carry out flow control according to i token formation speed, because i token formation speed of each node that sends to object to access is identical, therefore, the number of request of each node processing that object accesses is identical, the request that has solved the node processing that token formation speed is larger is conventionally more, make the load of this node heavier, cause the problem of each internodal load imbalance, reach guiding and loaded on effect balanced between node.
In addition, be defined as i+1 the minimum value that adjustment is interval by adjusting interval minimum value by i, the numerical value of i token formation speed be defined as to i+1 and adjust interval maximum; Or, the numerical value of i token formation speed is defined as to i+1 and adjusts interval minimum value, adjust interval maximum by i and be defined as i+1 the maximum that adjustment is interval, from i+1 adjustment interval, an optional numerical value is set to the numerical value of i+1 token formation speed, can adjust interval according to i that progressively dwindles and make i token formation speed be similar to i-1 total token depletion rate, improve the control efficiency of flow control.
Please refer to Fig. 5, it shows the structural framing figure of the volume control device that one embodiment of the invention provides.This volume control device, can comprise: receiver 501, processor 502, transmitter 503 and memory 504.Coupling between two between receiver 501, processor 502, transmitter 503 and memory 504.
In memory 504, store computer program, processor 502 can be carried out following operation by the described computer program of access:
Receiver 501, be used for obtaining i-1 token formation speed and i-1 total token depletion rate, token formation speed is that formation speed and all nodes that object accesses of token of the Node configuration that accesses for object are identical at the token formation speed of synchronization, total token depletion rate be all nodes that object accesses send at handling object request time the token that consumes speed sum, i >=2, and i is natural number;
Processor 502, determines that for i-1 the token formation speed, i-1 total token depletion rate and the default Flow Control target that get according to receiver 501 i is adjusted interval, adjusts interval i the token formation speed that generate according to i;
Transmitter 503, each node that sends to object to access for i the token formation speed that processor 502 is generated, so that i-1 token formation speed is updated to i token formation speed by each node that object accesses, carry out flow control according to i token formation speed.
In sum, the volume control device that the embodiment of the present invention provides, by obtaining i-1 token formation speed and i-1 total token depletion rate, determine that according to i-1 token formation speed, i-1 total token depletion rate and default Flow Control target i is adjusted interval, adjust interval i the token formation speed that generate for base area i, each node that sends to object to access i token formation speed, so that i-1 token formation speed is updated to i token formation speed by each node that object accesses, carry out flow control according to i token formation speed, because i token formation speed of each node that sends to object to access is identical, therefore, the number of request of each node processing that object accesses is identical, the request that has solved the node processing that token formation speed is larger is conventionally more, make the load of this node heavier, cause the problem of each internodal load imbalance, reach guiding and loaded on effect balanced between node.
Please refer to Fig. 6, it shows the structural framing figure of the volume control device that yet another embodiment of the invention provides.This volume control device, can comprise: receiver 501, processor 502, transmitter 503 and memory 504.Coupling between two between receiver 501, processor 502, transmitter 503 and memory 504.
In memory 504, store computer program, processor 502 can be carried out following operation by access computer program:
Receiver 501, be used for obtaining i-1 token formation speed and i-1 total token depletion rate, token formation speed is that formation speed and all nodes that object accesses of token of the Node configuration that accesses for object are identical at the token formation speed of synchronization, total token depletion rate be all nodes that object accesses send at handling object request time the token that consumes speed sum, i >=2, and i is natural number;
Processor 502, determines that for i-1 the token formation speed, i-1 total token depletion rate and the default Flow Control target that get according to receiver 501 i is adjusted interval, adjusts interval i the token formation speed that generate according to i;
Transmitter 503, each node that sends to object to access for i the token formation speed that processor 502 is generated, so that i-1 token formation speed is updated to i token formation speed by each node that object accesses, carry out flow control according to i token formation speed.
Optionally, processor 502, obtains i-1 difference for total i-1 token depletion rate is deducted to Flow Control target, and each and every one difference of i-1 is obtained to i-1 ratio divided by Flow Control target, i-1 ratio of comparison and default change threshold; If the absolute value of i-1 ratio is greater than change threshold and i-1 ratio for just, determine that according to i-1 token formation speed i is adjusted intervally, generates i token formation speed.
Optionally, processor 502, if be also greater than change threshold and i-1 ratio for negative for the absolute value of i-1 ratio, is set to the numerical value of i token formation speed the numerical value of the maximum token formation speed that node that object accesses configures; If the absolute value of i-1 ratio is less than change threshold, the numerical value of i token formation speed is arranged to the numerical value of i-1 token formation speed.
Optionally, processor 502, adjusts interval minimum value specifically for the numerical value of the minimum token formation speed of the node configuration accessing for object is defined as to i, the numerical value of i-1 token formation speed is defined as to i and adjusts interval maximum; From i adjustment interval, an optional numerical value is set to the numerical value of i token formation speed.
Optionally, receiver 501, after also i token formation speed being sent to each node that object accesses for transmitter 503, obtains i token formation speed and i total token depletion rate;
Processor 502, also deducts Flow Control target for i total token depletion rate that receiver 501 is got and obtains i difference, and i difference obtained to i ratio divided by Flow Control target, compares i ratio and change threshold; If the absolute value of i ratio is greater than change threshold and i ratio for just, adjust interval minimum value by i and be defined as i+1 and adjust interval maximum, the numerical value of i token formation speed is defined as to i+1 the maximum that adjustment is interval; If i ratio is greater than change threshold and i ratio for negative, the numerical value of i token formation speed is defined as to i+1 and adjusts interval minimum value, i the interval maximum of adjustment is defined as to i+1 the maximum that adjustment is interval; From i adjustment interval, an optional numerical value is set to the numerical value of i+1 token formation speed;
Transmitter 503, each node that also sends to object to access for i+1 the token formation speed that processor 502 is generated, so that i token formation speed is updated to i+1 token formation speed by each node that object accesses, carry out flow control according to i+1 token number formation speed.
Optionally, processor 502, before also obtaining i-1 token formation speed and i-1 total token depletion rate for receiver 501, arranges minimum token formation speed and the maximum token formation speed of node according to Flow Control target; The numerical value of minimum token formation speed is defined as to i-1 and adjusts interval minimum value, the numerical value of maximum token formation speed is determined to i-1 for adjusting interval maximum; From i-1 adjustment interval, an optional numerical value is set to the numerical value of i-1 token formation speed;
Transmitter 503, each node that also sends to object to access for i-1 the token formation speed that processor 502 is generated, so that each node that object accesses carries out flow control according to i-1 token formation speed.
In sum, the volume control device that the embodiment of the present invention provides, by obtaining i-1 token formation speed and i-1 total token depletion rate, determine that according to i-1 token formation speed, i-1 total token depletion rate and default Flow Control target i is adjusted interval, adjust interval i the token formation speed that generate for base area i, each node that sends to object to access i token formation speed, so that i-1 token formation speed is updated to i token formation speed by each node that object accesses, carry out flow control according to i token formation speed, because i token formation speed of each node that sends to object to access is identical, therefore, the number of request of each node processing that object accesses is identical, the request that has solved the node processing that token formation speed is larger is conventionally more, make the load of this node heavier, cause the problem of each internodal load imbalance, reach guiding and loaded on effect balanced between node.
In addition, be defined as i+1 the minimum value that adjustment is interval by adjusting interval minimum value by i, the numerical value of i token formation speed be defined as to i+1 and adjust interval maximum; Or, the numerical value of i token formation speed is defined as to i+1 and adjusts interval minimum value, adjust interval maximum by i and be defined as i+1 the maximum that adjustment is interval, from i+1 adjustment interval, an optional numerical value is set to the numerical value of i+1 token formation speed, can adjust interval according to i that progressively dwindles and make i token formation speed be similar to i-1 total token depletion rate, improve the control efficiency of flow control.
It should be noted that: the volume control device that above-described embodiment provides is in the time carrying out flow control, only be illustrated with the division of above-mentioned each functional module, in practical application, can above-mentioned functions be distributed and completed by different functional modules as required, be divided into different functional modules by the internal structure of volume control device, to complete all or part of function described above.In addition, the volume control device that above-described embodiment provides and flow control methods embodiment belong to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step that realizes above-described embodiment can complete by hardware, also can carry out the hardware that instruction is relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be read-only memory, disk or CD etc.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any amendment of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (13)

1. a flow control methods, is characterized in that, described method comprises:
Obtain i-1 token formation speed and i-1 total token depletion rate, described token formation speed is that formation speed and all nodes that described object accesses of token of the Node configuration that accesses for object are identical at the token formation speed of synchronization, the speed sum of described total token depletion rate token that consumes that is all nodes of accessing of described object in the time processing the request that described object sends, i >=2, and i is natural number;
Determine that according to described i-1 token formation speed, described i-1 total token depletion rate and default Flow Control target i is adjusted interval, adjust interval i the token formation speed that generate according to described i;
Each node that sends to described object to access described i token formation speed, so that described i-1 token formation speed is updated to described i token formation speed by each node that described object accesses, carry out flow control according to described i token formation speed.
2. method according to claim 1, it is characterized in that, describedly determine that according to described i-1 token formation speed, described i-1 total token depletion rate and default Flow Control target i is adjusted intervally, adjust i token formation speed of interval generation according to described i, comprising:
Total described i-1 token depletion rate is deducted to described Flow Control target and obtain i-1 difference, described i-1 difference obtained to i-1 ratio divided by described Flow Control target, more described i-1 ratio and default change threshold;
If the absolute value of described i-1 ratio is greater than described change threshold and described i-1 ratio for just, determine that according to described i-1 token formation speed described i is adjusted intervally, generates described i token formation speed.
3. method according to claim 2, is characterized in that, after described i-1 ratio and default change threshold, also comprises:
If the absolute value of described i-1 ratio is greater than described change threshold and described i-1 ratio for negative, the numerical value of described i token formation speed is set to the numerical value of the maximum token formation speed that node that described object accesses configures;
If the absolute value of described i-1 ratio is less than described change threshold, the numerical value of described i token formation speed is arranged to the numerical value of described i-1 token formation speed.
4. method according to claim 2, is characterized in that, describedly determines that according to described i-1 token formation speed described i is adjusted intervally, generates described i token formation speed, comprising:
The numerical value of the minimum token formation speed of the node configuration accessing for described object is defined as to described i and adjusts interval minimum value, the numerical value of described i-1 token formation speed is defined as to described i and adjusts interval maximum;
From described i adjustment interval, an optional numerical value is set to the numerical value of described i token formation speed.
5. method according to claim 4, is characterized in that, described described i token formation speed sent to each node that described object accesses after, also comprise:
Obtain described i token formation speed and i total token depletion rate;
Described i total token depletion rate deducted to described Flow Control target and obtain i difference, described i difference obtained to i ratio divided by described Flow Control target, more described i ratio and described change threshold;
If the absolute value of described i ratio is greater than described change threshold and described i ratio for just, adjust interval minimum value by described i and be defined as i+1 the minimum value that adjustment is interval, the numerical value of described i token formation speed is defined as to described i+1 and adjusts interval maximum; If described i ratio is greater than described change threshold and described i ratio is negative, the numerical value of described i token formation speed is defined as to i+1 and adjusts interval minimum value, adjust interval maximum by described i and be defined as described i+1 the maximum that adjustment is interval;
From described i+1 adjustment interval, an optional numerical value is set to the numerical value of i+1 token formation speed;
Each node that sends to described object to access described i+1 token formation speed, so that described i token formation speed is updated to described i+1 token formation speed by each node that described object accesses, carry out flow control according to described i+1 token number formation speed.
6. according to the method described in claim 1 to 5 any one, it is characterized in that, described in obtain i-1 token formation speed and i-1 total token depletion rate before, also comprise:
Minimum token formation speed and the maximum token formation speed of the node that described object accesses are set according to described Flow Control target;
The numerical value of described minimum token formation speed is defined as to i-1 and adjusts interval minimum value, the numerical value of described maximum token formation speed is defined as to described i-1 and adjusts interval maximum;
From described i-1 adjustment interval, an optional numerical value is set to the numerical value of described i-1 token formation speed;
Each node that sends to described object to access described i-1 token formation speed, so that each node that described object accesses carries out flow control according to described i-1 token formation speed.
7. a volume control device, is characterized in that, described device comprises:
The first acquisition module, be used for obtaining i-1 token formation speed and i-1 total token depletion rate, described token formation speed is that formation speed and all nodes that described object accesses of token of the Node configuration that accesses for object are identical at the token formation speed of synchronization, the speed sum of described total token depletion rate token that consumes that is all nodes of accessing of described object in the time processing the request that described object sends, i >=2, and i is natural number;
The first generation module, determine that for described i-1 the token formation speed getting according to described the first acquisition module, described i-1 total token depletion rate and default Flow Control target i is adjusted interval, adjust interval i the token formation speed that generate according to described i;
The first sending module, each node that sends to described object to access for described i the token formation speed that described the first generation module is generated, so that each and every one token formation speed of described i-1 is updated to described i token formation speed by each node that described object accesses, carry out flow control according to described i token formation speed.
8. device according to claim 7, is characterized in that, described the first generation module, comprising:
Data comparing unit, for being deducted to described Flow Control target, described i-1 total token depletion rate obtain i-1 difference, described i-1 difference obtained to i-1 ratio divided by described Flow Control target, more described i-1 ratio and default change threshold;
The first generation unit, for relatively showing that at described data comparing unit the absolute value of described i-1 ratio is greater than described change threshold and described i-1 ratio is timing, determine that according to described i-1 token formation speed described i is adjusted interval, generates described i token formation speed.
9. method according to claim 8, is characterized in that, described the first generation module, also comprises:
The second generation unit, for relatively showing that at described data comparing unit the absolute value of described i-1 ratio is greater than described change threshold and described i-1 ratio when bearing, the numerical value of described i token formation speed is set to the numerical value of the maximum token formation speed that node that described object accesses configures;
The 3rd generation unit, in the time that described data comparing unit relatively show that the absolute value of described i-1 ratio is less than described change threshold, is arranged to the numerical value of described i token formation speed the numerical value of described i-1 token formation speed.
10. device according to claim 8, it is characterized in that, described the first generation unit, adjust interval minimum value specifically for the numerical value of the minimum token formation speed of the node configuration accessing for described object is defined as to described i, the numerical value of described i-1 token formation speed is defined as to described i and adjusts interval maximum; From described i adjustment interval, an optional numerical value is set to the numerical value of described i token formation speed.
11. devices according to claim 10, is characterized in that, described device, also comprises:
The second acquisition module, after described i token formation speed being sent to each node that described object accesses for described the first sending module, obtains described i token formation speed and i total token depletion rate;
Data comparison module, deduct described Flow Control target for described i total token depletion rate that described the second acquisition module is got and obtain i difference, described i difference obtained to i ratio divided by described Flow Control target, more described i ratio and described change threshold;
Interval determination module, for relatively showing that in described data comparison module the absolute value of described i ratio is greater than described change threshold and described i ratio is timing, adjust interval minimum value by described i and be defined as i+1 the minimum value that adjustment is interval, the numerical value of described i token formation speed is defined as to described i+1 and adjusts interval maximum; Relatively show that in described data comparison module the absolute value of described i ratio is greater than described change threshold and described i ratio when negative, the numerical value of described i token formation speed is defined as to i+1 and adjusts interval minimum value, adjust interval maximum by described i and be defined as described i+1 the maximum that adjustment is interval;
The second generation module, for being set to the numerical value of described i+1 token formation speed from definite described i+1 the optional numerical value in adjustment interval of described interval determination module;
The second sending module, each node that sends to described object to access for described i+1 the token formation speed that described the second generation module is generated, so that described i token formation speed is updated to described i+1 token formation speed by each node that described object accesses, carry out flow control according to described i+1 token number formation speed.
12. according to the device described in claim 7 to 11 any one, it is characterized in that, described device, also comprises:
Speed arranges module, obtain i-1 token formation speed and i-1 always before token depletion rate for described the first acquisition module, minimum token formation speed and the maximum token formation speed of the node that described object accesses is set according to described Flow Control target;
Interval arranges module, be defined as i-1 the minimum value that adjustment is interval for described speed being arranged to the numerical value of the described minimum token formation speed of module setting, the numerical value of described maximum token formation speed be defined as to described i-1 and adjust interval maximum;
The 3rd generation module, for being set to the numerical value of described i-1 token formation speed from described i-1 the optional numerical value in adjustment interval;
The 3rd sending module, each node that sends to described object to access for described i-1 the token formation speed that described the 3rd generation module is generated, so that each node that described object accesses carries out flow control according to described i-1 token formation speed.
13. 1 kinds of global coordination devices, is characterized in that, described global coordination device comprises the volume control device as described in claim 7 to 12 any one.
CN201410132180.9A 2014-04-02 2014-04-02 Flow control methods, device and equipment Active CN103929366B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410132180.9A CN103929366B (en) 2014-04-02 2014-04-02 Flow control methods, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410132180.9A CN103929366B (en) 2014-04-02 2014-04-02 Flow control methods, device and equipment

Publications (2)

Publication Number Publication Date
CN103929366A true CN103929366A (en) 2014-07-16
CN103929366B CN103929366B (en) 2017-07-07

Family

ID=51147449

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410132180.9A Active CN103929366B (en) 2014-04-02 2014-04-02 Flow control methods, device and equipment

Country Status (1)

Country Link
CN (1) CN103929366B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105740076A (en) * 2016-01-30 2016-07-06 华为技术有限公司 Load balance method and apparatus
CN107276827A (en) * 2017-07-25 2017-10-20 郑州云海信息技术有限公司 Qos implementation method and device in a kind of distributed memory system
CN107547433A (en) * 2017-07-03 2018-01-05 阿里巴巴集团控股有限公司 The method, apparatus and equipment of current limliting are carried out based on Token Bucket
CN108270810A (en) * 2016-12-30 2018-07-10 北京国双科技有限公司 Media data access method and device
CN108270744A (en) * 2016-12-30 2018-07-10 北京国双科技有限公司 Media data access method and device
CN108540557A (en) * 2018-04-16 2018-09-14 江苏润和软件股份有限公司 A kind of cloud application load dispatching method based on dynamic speed limit
CN109254726A (en) * 2018-08-16 2019-01-22 华为技术有限公司 QoS guarantee method, control node and system in distributed memory system
CN109471713A (en) * 2017-09-07 2019-03-15 北京京东尚科信息技术有限公司 Method and apparatus for query information
CN109964456A (en) * 2016-08-23 2019-07-02 萨托里环球有限责任公司 Expansible real-time messages conveyer system
CN110753005A (en) * 2019-10-17 2020-02-04 腾讯科技(深圳)有限公司 Speed limiting method, device and system, electronic equipment and computer readable storage medium
CN111078391A (en) * 2018-10-22 2020-04-28 阿里巴巴集团控股有限公司 Service request processing method, device and equipment
CN112363673A (en) * 2020-11-12 2021-02-12 深圳大普微电子科技有限公司 Flow management method and system, solid state disk controller and solid state disk
WO2022012054A1 (en) * 2020-07-17 2022-01-20 苏州浪潮智能科技有限公司 Method, system and device for dynamically preventing traffic attacks, and storage medium
CN114793216A (en) * 2022-06-22 2022-07-26 北京轻网科技有限公司 Token management and information sending method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101026561A (en) * 2007-02-09 2007-08-29 中兴通讯股份有限公司 Token bucket fill rate configuration method and device
CN101282305A (en) * 2008-05-22 2008-10-08 杭州华三通信技术有限公司 Bandwidth control method for distributed system as well as service plate
CN101778043A (en) * 2010-01-19 2010-07-14 华为技术有限公司 Method and device for dividing filling rate interval based on token bucket algorithm

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101026561A (en) * 2007-02-09 2007-08-29 中兴通讯股份有限公司 Token bucket fill rate configuration method and device
CN101282305A (en) * 2008-05-22 2008-10-08 杭州华三通信技术有限公司 Bandwidth control method for distributed system as well as service plate
CN101778043A (en) * 2010-01-19 2010-07-14 华为技术有限公司 Method and device for dividing filling rate interval based on token bucket algorithm

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105740076A (en) * 2016-01-30 2016-07-06 华为技术有限公司 Load balance method and apparatus
CN109964456A (en) * 2016-08-23 2019-07-02 萨托里环球有限责任公司 Expansible real-time messages conveyer system
CN108270744A (en) * 2016-12-30 2018-07-10 北京国双科技有限公司 Media data access method and device
CN108270810A (en) * 2016-12-30 2018-07-10 北京国双科技有限公司 Media data access method and device
CN108270744B (en) * 2016-12-30 2021-05-07 北京国双科技有限公司 Media data access method and device
CN107547433A (en) * 2017-07-03 2018-01-05 阿里巴巴集团控股有限公司 The method, apparatus and equipment of current limliting are carried out based on Token Bucket
CN107547433B (en) * 2017-07-03 2020-12-22 创新先进技术有限公司 Method, device and equipment for current limiting based on token leaky bucket
CN107276827A (en) * 2017-07-25 2017-10-20 郑州云海信息技术有限公司 Qos implementation method and device in a kind of distributed memory system
CN109471713A (en) * 2017-09-07 2019-03-15 北京京东尚科信息技术有限公司 Method and apparatus for query information
CN109471713B (en) * 2017-09-07 2022-11-08 北京京东尚科信息技术有限公司 Method and device for inquiring information
CN108540557A (en) * 2018-04-16 2018-09-14 江苏润和软件股份有限公司 A kind of cloud application load dispatching method based on dynamic speed limit
US11320998B2 (en) 2018-08-16 2022-05-03 Huawei Technologies Co., Ltd. Method for assuring quality of service in distributed storage system, control node, and system
CN109254726A (en) * 2018-08-16 2019-01-22 华为技术有限公司 QoS guarantee method, control node and system in distributed memory system
CN111078391A (en) * 2018-10-22 2020-04-28 阿里巴巴集团控股有限公司 Service request processing method, device and equipment
CN110753005A (en) * 2019-10-17 2020-02-04 腾讯科技(深圳)有限公司 Speed limiting method, device and system, electronic equipment and computer readable storage medium
WO2022012054A1 (en) * 2020-07-17 2022-01-20 苏州浪潮智能科技有限公司 Method, system and device for dynamically preventing traffic attacks, and storage medium
CN112363673A (en) * 2020-11-12 2021-02-12 深圳大普微电子科技有限公司 Flow management method and system, solid state disk controller and solid state disk
CN114793216A (en) * 2022-06-22 2022-07-26 北京轻网科技有限公司 Token management and information sending method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN103929366B (en) 2017-07-07

Similar Documents

Publication Publication Date Title
CN103929366A (en) Flow control method and device and equipment
US20150295970A1 (en) Method and device for augmenting and releasing capacity of computing resources in real-time stream computing system
CN110545246A (en) Token bucket-based current limiting method and device
CN107729147A (en) Data processing method, control node and stream calculation system in stream calculation system
CN107124445A (en) A kind of collecting method and device
CN106130960B (en) Judgement system, load dispatching method and the device of steal-number behavior
CN103309738A (en) User job scheduling method and device
CN107395521B (en) Big data information processing method and system based on Internet of things
CN104734985A (en) Data receiving flow control method and system
CN104199912A (en) Task processing method and device
CN114339135A (en) Load balancing method and device, electronic equipment and storage medium
CN105138547A (en) Data search method and apparatus
CN106371546A (en) Method and device for limiting power dissipation of whole cabinet
CN106095579B (en) Container resource allocation methods and device
CN106936867A (en) The response method and device of a kind of service request
CN103336670A (en) Method and device for automatic distribution of data blocks based on data temperature
CN114339891A (en) Edge unloading resource allocation method and system based on Q learning
CN102137091A (en) Overload control method, device and system as well as client-side
CN104780120A (en) Method and device for transmitting files in local area network
CN110874314A (en) Pressure measurement method, apparatus, device and medium
CN103560974B (en) Method and device for maintaining tokens
CN104850431A (en) Stabilizing treatment method and device based on FOTA (Firmware Over-The-Air) upgrading
CN107710168B (en) Information processing unit and information processing method
CN116074403A (en) Multi-protocol fusion communication method, device and architecture
CN114374652B (en) Data transmission speed limiting method and device between thermomagnetic storage and blue light storage

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant