A kind of job flow control method, device and system
Technical field
The present invention relates to communication technical field, be specifically related to a kind of job flow control method, device and system.
Background technology
Owing to the various resources in storage system are limited, therefore, when system resource anxiety, need to control inflow whole
The service traffics of individual system, to avoid whole system to transship, cause system to be delayed due to resource exhaustion machine.
At present the widely used service traffics control strategy of storage system institute is three kinds of Main Resources to the system of storage, i.e.
One or more in internal memory, central processing unit (CPU, Central Processing Unit) and disk set threshold value, once
The consumption having a kind of resource reaches this threshold value, then it is assumed that system is overload, then carries out back-pressure, thus reaches service traffics
The purpose controlled.
But, owing to system resource is multifarious, and service request be also have dissimilar, therefore, dissimilar
The system resource spent by service request be also different, if the consumption only with a certain system resource reaches threshold value and just sentences
Determine system and be in overload, it will limit the utilization of other resources, cause system resource to fail to be fully utilized, namely
Say that the job flow control method underaction of prior art fails to make full use of system resource.
Summary of the invention
The embodiment of the present invention provides a kind of job flow control method, device and system, can carry out flow neatly
Control, make full use of system resource.
First aspect, the embodiment of the present invention provides a kind of job flow control method, including:
Obtain resource load information;
According to described resource load information, utilize classification (KNN, k-nearest-neighbors) algorithm estimation of K arest neighbors
Service request number N, described N that in next unit period, system can process are positive integer;
In described next unit period, process queue from service request and obtain N number of service request;
The service request got is submitted to business thread pool, to process.
In the embodiment that the first is possible, in conjunction with first aspect, described acquisition resource load information, including:
Gather in the memory usage of nearest K unit period, cpu busy percentage and memorizer utilization rate any two kinds with
Upper information, and the service request number handled by collection, described K is positive integer;
The described service request number that can process according to system in the next unit period of described resource load information estimation
N, including:
Memory usage according to described nearest K unit period, cpu busy percentage, memorizer utilization rate and handled
Service request number, utilizes the service request number N that system in the KNN algorithm next unit period of estimation can process.
In the embodiment that the second is possible, in conjunction with the first possible embodiment of first aspect, described basis
Any two or more information in the memory usage of described nearest K unit period, cpu busy percentage and memorizer utilization rate,
And the service request number N that in the next unit period of service request number estimation handled by gathering, system can process, including:
By any two kinds in memory usage, cpu busy percentage and the memorizer utilization rate of described nearest K unit period
Information above is converted into the eigen vector in each cycle respectively;
Calculate the distance between the characteristic vector in each cycle described and preset overload vector respectively;
According to described distance, compose power according to preset power of composing strategy service request number handled by each cycle, described
The power strategy of tax meets composes, apart from the least, the condition that power is the biggest;
The result produced after service request number handled by each cycle described is multiplied by the weights of correspondence respectively is folded
Add, and divided by the sum of all weights, obtain the service request number N that system in next unit period can process.
In the embodiment that the third is possible, in conjunction with the reality that first aspect, the first of first aspect or the second are possible
Execute mode, described the service request got submitted to business thread pool, after processing, also include:
The service request number that record gets.
In the 4th kind of possible embodiment, in conjunction with the reality that first aspect, the first of first aspect or the second are possible
Execute mode, described process from service request queue obtains N number of service request before, also include:
Receive service request, and described service request is added to service request process in queue, described service request by
Protocol adaptation layers is packaged.
In the 5th kind of possible embodiment, in conjunction with the reality that first aspect, the first of first aspect or the second are possible
Execute mode, described the service request got submitted to business thread pool, after processing, also include:
The result about service request that reception business thread pool returns;
Described result is sent to protocol adaptation layers, in order to described result is returned to user.
Second aspect, the embodiment of the present invention also provides for a kind of Business Stream amount control device, including information acquisition unit, estimation
Unit, acquisition request unit and submission unit;
Information acquisition unit, is used for obtaining resource load information;
Evaluation unit, for according to described resource load information, utilizes system in the next unit period of KNN algorithm estimation
The service request number N, described N that can process are positive integer;
Acquisition request unit, in described next unit period, obtains N number of from service request process queue
Service request;
Submit unit to, for the service request got being submitted to business thread pool, to process.
In the embodiment that the first is possible, in conjunction with second aspect, wherein:
Described information acquisition unit, specifically for gather the memory usage of nearest K unit period, cpu busy percentage and
Any two or more information in memorizer utilization rate, and the service request number handled by collection, described K is positive integer;
Described evaluation unit, specifically for the memory usage according to described nearest K unit period, cpu busy percentage and
Any two or more information in memorizer utilization rate, and handled service request number, utilize K arest neighbors sorting algorithm to estimate
The service request number N that in the next unit period of calculation, system can process.
In the embodiment that the second is possible, in conjunction with the first possible embodiment of second aspect, wherein:
Described evaluation unit, specifically for by the memory usage of described nearest K unit period, middle cpu busy percentage and
Any two or more information in memorizer utilization rate are converted into the eigen vector in each cycle respectively;Calculate respectively described each
Distance between characteristic vector and the preset overload vector in cycle;According to described distance, it is each according to preset tax power strategy
Service request number handled by the individual cycle composes power, and described tax power strategy meets the condition that distance the least tax power is the biggest;By described respectively
The result that service request number handled by the individual cycle produces after being multiplied by the weights of correspondence respectively is overlapped, and divided by all weights
Sum, obtain the service request number N that system in next unit period can process.
In the embodiment that the third is possible, in conjunction with the reality that second aspect, the first of second aspect or the second are possible
Executing mode, this Business Stream amount control device also includes recording unit, wherein:
Described record unit, the service request number got for record.
In the embodiment that the third is possible, in conjunction with the reality that second aspect, the first of second aspect or the second are possible
Executing mode, this Business Stream amount control device also includes receiving unit, wherein:
Described reception unit, is used for receiving service request, and described service request is added to service request process queue
In, described service request is packaged by protocol adaptation layers.
In the embodiment that the third is possible, in conjunction with the reality that second aspect, the first of second aspect or the second are possible
Executing mode, this Business Stream amount control device also includes transmitting element, wherein:
Described reception unit, is additionally operable to the result about service request that reception business thread pool returns;
Described transmitting element, for being sent to protocol adaptation layers by described result, in order to described result returned
Back to user.
The third aspect, the embodiment of the present invention also provides for a kind of communication system, any one provided including the embodiment of the present invention
Business Stream amount control device.
Fourth aspect, the embodiment of the present invention also provides for a kind of storage system, including protocol adaptation layers, privately owned file system and
For storing the memorizer of data, described privately owned file system includes service quality module;
Described protocol adaptation layers, is used for receiving and encapsulating service request, service request is sent in privately owned file system
Service quality module;
Described service quality module, is used for receiving service request, the service request received is added at service request
In reason queue, obtain resource load information, utilize KNN algorithm according in the next unit period of described resource load information estimation
Service request number N, described N that system can process are positive integer, in described next unit period, process from service request
Queue obtains N number of service request, the service request got is submitted to business thread pool, to process.
In the embodiment that the first is possible, result fourth aspect, wherein:
Described service quality module, specifically for gather the memory usage of nearest K unit period, cpu busy percentage and
Any two or more information in memorizer utilization rate, and the service request number handled by collection, described K is positive integer;Root
According to any two or more letters in memory usage, cpu busy percentage and the memorizer utilization rate of described nearest K unit period
Breath, and handled service request number, in utilizing the next unit period of K arest neighbors sorting algorithm estimation, system can process
Service request number N.
In the embodiment that the second is possible, the first possible embodiment of result fourth aspect, wherein:
Described service quality module, specifically for by the memory usage of described nearest K unit period, cpu busy percentage
With the eigen vector that any two or more information in memorizer utilization rate are converted into each cycle respectively;Calculate respectively described respectively
Distance between characteristic vector and the preset overload vector in individual cycle;According to described distance, according to preset tax power strategy it is
Service request number handled by each cycle composes power, and described tax power strategy meets the condition that distance the least tax power is the biggest;By described
The result that service request number handled by each cycle produces after being multiplied by the weights of correspondence respectively is overlapped, and divided by proprietary rights
Sum of value, obtains the service request number N that can process of system in next one unit period.
In the embodiment that the third is possible, the reality that result fourth aspect, the first of fourth aspect or the second are possible
Execute mode, wherein:
Described service quality module, is additionally operable to record the service request number got.
In the embodiment that the third is possible, the reality that result fourth aspect, the first of fourth aspect or the second are possible
Execute mode, wherein:
Described service quality module, is additionally operable to the result about service request that reception business thread pool returns;Will
Described result is sent to protocol adaptation layers, in order to described result is returned to user.
5th aspect, the embodiment of the present invention also provides for a kind of storage control, including central processing unit with for storing number
According to volatile storage medium;
Described central processing unit, is used for obtaining resource load information;According to described resource load information, utilize KNN algorithm
Service request number N, described N that in the next unit period of estimation, system can process are positive integer;In described next unit
In cycle, process queue from service request and obtain N number of service request;The service request got is submitted to business thread
Pond, to process.
In the embodiment that the first is possible, in conjunction with the 5th aspect, wherein:
Described central processing unit, specifically for gathering the utilization of the described volatile storage medium of nearest K unit period
Any two or more information in the utilization rate of rate, the utilization rate of described central processing unit and non-volatile memory medium, and
Service request number handled by collection, described K is positive integer;Described volatile storage according to described nearest K unit period
The most two or more in the utilization rate of the utilization rate of medium, the utilization rate of described central processing unit and non-volatile memory medium
Information, and handled service request number, utilize the business that system in the KNN algorithm next unit period of estimation can process
Number of request N.
In the embodiment that the second is possible, in conjunction with the first possible embodiment of the 5th aspect, wherein:
Described central processing unit, specifically for the profit by the described volatile storage medium of described nearest K unit period
By any two or more information in the utilization rate of rate, the utilization rate of described central processing unit and non-volatile memory medium respectively
It is converted into the eigen vector in each cycle;Calculate respectively between the characteristic vector in each cycle described and preset overload vector
Distance;According to described distance, weighing strategy service request number handled by each cycle according to preset composing and compose power, described tax is weighed
Strategy meets the least tax of distance and weighs the biggest condition;Service request number handled by each cycle described is multiplied by respectively correspondence
The result produced after weights is overlapped, and divided by the sum of all weights, in obtaining next unit period, system can process
Service request number N.
In the embodiment that the third is possible, in conjunction with the reality that first or the second of the 5th aspect, the 5th aspect are possible
Execute mode, wherein:
Described central processing unit, is additionally operable to record the service request number got.
In the 4th kind of possible embodiment, in conjunction with the reality that first or the second of the 5th aspect, the 5th aspect are possible
Execute mode, wherein:
Described central processing unit, is additionally operable to receive service request, and described service request is added to service request process
In queue, described service request is packaged by protocol adaptation layers.
In the 4th kind of possible embodiment, in conjunction with the reality that first or the second of the 5th aspect, the 5th aspect are possible
Execute mode, wherein:
Described central processing unit, is additionally operable to the result about service request that reception business thread pool returns;By institute
State result and be sent to protocol adaptation layers, in order to described result is returned to user.
6th aspect, the embodiment of the present invention also provides for a kind of computer system, including storage control with for storing number
According to non-volatile memory medium, wherein, described storage control includes central processing unit and for storing the volatibility of data
Storage medium;
Described central processing unit, is used for obtaining resource load information;According to described resource load information, utilize KNN algorithm
Service request number N, described N that in the next unit period of estimation, system can process are positive integer;In described next unit
In cycle, process queue from service request and obtain N number of service request;The service request got is submitted to business thread
Pond, to process.
In the embodiment that the first is possible, in conjunction with the 6th aspect, wherein:
Described central processing unit, specifically for gathering the utilization of the described volatile storage medium of nearest K unit period
Any two or more information in the utilization rate of rate, the utilization rate of described central processing unit and described non-volatile memory medium,
And the service request number handled by gathering, described K is positive integer;Described volatibility according to described nearest K unit period
Any in the utilization rate of the utilization rate of storage medium, the utilization rate of described central processing unit and described non-volatile memory medium
Two or more information, and handled service request number, in utilizing the next unit period of KNN algorithm estimation, system can be located
The service request number N of reason.
In the embodiment that the second is possible, in conjunction with the first possible embodiment of the 6th aspect, wherein:
Described central processing unit, specifically for the profit by the described volatile storage medium of described nearest K unit period
By any two or more information in the utilization rate of rate, the utilization rate of described central processing unit and described non-volatile memory medium
It is converted into the eigen vector in each cycle respectively;Calculate the characteristic vector in each cycle described and preset overload vector respectively
Between distance;According to described distance, compose power according to preset power of composing strategy service request number handled by each cycle, described
The power strategy of tax meets composes, apart from the least, the condition that power is the biggest;It is right to be multiplied by respectively by service request number handled by each cycle described
The result produced after the weights answered is overlapped, and divided by the sum of all weights, in obtaining next unit period, system can
The service request number N processed.
In the embodiment that the third is possible, in conjunction with the reality that first or the second of the 6th aspect, the 6th aspect are possible
Execute mode, wherein:
Described central processing unit, is additionally operable to record the service request number got.
In the 4th kind of possible embodiment, in conjunction with the reality that first or the second of the 6th aspect, the 6th aspect are possible
Execute mode, wherein:
Described central processing unit, is additionally operable to receive service request, and described service request is added to service request process
In queue, described service request is packaged by protocol adaptation layers.
In the 5th kind of possible embodiment, in conjunction with the reality that first or the second of the 6th aspect, the 6th aspect are possible
Execute mode, wherein:
Described central processing unit, is additionally operable to the result about service request that reception business thread pool returns;By institute
State result and be sent to protocol adaptation layers, in order to described result is returned to user.
The embodiment of the present invention uses and obtains resource load information, according to this resource load information, utilizes under the estimation of KNN algorithm
The service request number N that in one unit period, system can process, in this unit period, processes queue from service request and obtains
Take N number of service request, and the service request got is submitted to business thread pool, to process;Owing to the program can
To consider the loading condition of various resources in storage system, and according to this loading condition, flow is controlled, so
In terms of existing technologies, system resource, the overall performance of beneficially raising system can more fully be utilized.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
In having technology to describe, the required accompanying drawing used is briefly described, it should be apparent that, the accompanying drawing in describing below is only this
Some embodiments of invention, for those skilled in the art, on the premise of not paying creative work, it is also possible to according to
These accompanying drawings obtain other accompanying drawing.
Fig. 1 is the flow chart of the job flow control method that the embodiment of the present invention provides;
Fig. 2 a is the structural representation storing server in the embodiment of the present invention;
Fig. 2 b is the structural schematic block diagram of Business Stream amount control device in the embodiment of the present invention;
Fig. 2 c is another flow chart of the job flow control method that the embodiment of the present invention provides;
Fig. 3 is the structural representation of the Business Stream amount control device that the embodiment of the present invention provides;
Fig. 4 is another structural representation of the Business Stream amount control device that the embodiment of the present invention provides;
Fig. 5 is the structural representation of the storage system that the embodiment of the present invention provides;
Fig. 6 is the structural representation of the storage control that the embodiment of the present invention provides;
Fig. 7 is the structural representation of the computer system that the embodiment of the present invention provides.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Describe, it is clear that described embodiment is only a part of embodiment of the present invention rather than whole embodiments wholely.Based on
Embodiment in the present invention, the every other enforcement that those skilled in the art are obtained under not making creative work premise
Example, broadly falls into the scope of protection of the invention.
System resource is multifarious, and for storage system, the system resource of most critical has internal memory, CPU, memorizer (ratio
Such as disk).And ask also there is different characteristic, than if any service request be CPU type, its expend cpu resource many
A bit, some service request are input/output (I/O, Input/Output) types, its internal memory expended and memorizer (such as magnetic
Dish) resource is more, and some service request are then that to expend memory source more, etc., therefore, dissimilar request expends
System resource be different.Prior art only consumption with a certain system resource reaches threshold value and decides that system is in overload
State, can limit the utilization of other resources.Such as the highest when cpu busy percentage, when memory usage is the lowest, system is still able to again
Process the request of some IO types, and decision-making system should not be in overload, limit all requests.To this end, the present invention implements
Example provides a kind of job flow control method, device and system.It is described in detail individually below.
Embodiment one,
The embodiment of the present invention will be described from the angle of business volume control device, and this Business Stream amount control device is permissible
It is independent entity, it is also possible to be integrated in miscellaneous equipment, such as stores in the equipment such as server.
A kind of job flow control method, including: obtain resource load information, according to this resource load information, utilize KNN
The service request number N that in the next unit period of algorithm estimation, system can process, in this next one unit period, from business
Request processes in queue and obtains N number of service request, the service request got is submitted to business thread pool, to locate
Reason.
As it is shown in figure 1, idiographic flow can be such that
101, resource load information is obtained;Such as, specifically can be such that
Gather in the memory usage of nearest K unit period, cpu busy percentage and memorizer utilization rate any two kinds with
Upper information, and the service request number handled by collection, i.e. gather the memory usage of nearest K unit period, nearest K list
Any two or more information in the cpu busy percentage of bit period and the memorizer utilization rate of nearest K unit period, and obtain
Service request number handled by K unit period recently.Such as, specifically can be such that
Gather the memory usage of nearest K unit period, the cpu busy percentage of nearest K unit period and obtain
Nearly service request number handled by K unit period;Or,
Gather the memory usage of nearest K unit period, the memorizer utilization rate of nearest K unit period and obtain
Take the service request number handled by nearest K unit period;Or,
Gather the cpu busy percentage of nearest K unit period, the memorizer utilization rate of nearest K unit period and obtain
Service request number handled by K unit period recently;Or,
Gather the memory usage of nearest K unit period, the cpu busy percentage of nearest K unit period, nearest K list
The memorizer utilization rate of bit period and obtain the service request number handled by nearest K unit period.
Wherein, K is positive integer, and the concrete value of K can be configured according to the demand of reality application, such as, and Ke Yishe
Determine K >=5.
It should be noted that, for convenience, in embodiments of the present invention, by gather in nearest K unit period
Illustrate as a example by depositing utilization rate, cpu busy percentage, memorizer utilization rate and handled service request number.
Additionally it should be noted that, the internal memory in the embodiment of the present invention refers to volatile storage medium, and memorizer refers to
Be non-volatile memory medium, such as, disk, solid state hard disc or CD etc..
102, according to the resource load information got in step 101, in utilizing the next unit period of KNN algorithm estimation
The service request number N that system can process, wherein N is positive integer.
Such as, specifically can be according to the memory usage of this nearest K unit period, cpu busy percentage, memorizer utilization rate
With handled service request number, utilize the service request number that system in the KNN algorithm next unit period of estimation can process
N, such as, specifically can be such that
(1) by any two in the memory usage of this nearest K unit period, cpu busy percentage and memorizer utilization rate
Plant information above and be converted into the eigen vector in each cycle respectively;
Such as, if obtain in step 101 is memory usage and the cpu busy percentage of nearest K unit period, then will
The memory usage of nearest K the unit period got and cpu busy percentage are converted into the eigen vector in each cycle respectively;As
Really obtain in step 101 is memory usage and the memorizer utilization rate of nearest K unit period, then nearest by get
The memory usage of K unit period and memorizer utilization rate are converted into the eigen vector in each cycle respectively;If step 101
Middle acquisition is cpu busy percentage and the memorizer utilization rate of nearest K unit period, then nearest K the unit week that will get
The cpu busy percentage of phase and memorizer utilization rate are converted into the eigen vector in each cycle respectively;If obtain in step 101 is
The memory usage of K unit period, cpu busy percentage and memorizer utilization rate recently, then nearest K the unit week that will get
The memory usage of phase, cpu busy percentage and memorizer utilization rate are converted into the eigen vector in each cycle respectively, by that analogy,
Etc..
Such as, as a example by K is 3, if step 101 obtains the memory usage of the n-th-3 unit period, the n-th-3
The cpu busy percentage Y of unit period2With the memorizer utilization rate of the n-th-3 unit period, the internal memory profit of the n-th-2 unit period
By rate, the cpu busy percentage of the n-th-2 unit period, the memorizer utilization rate of the n-th-2 unit period, the n-th-2 unit period
Handled service request number, the memory usage of (n-1)th unit period, the cpu busy percentage of (n-1)th unit period,
The memorizer utilization rate of (n-1)th unit period, the handled service request number of (n-1)th unit period, then at this point it is possible to
As follows:
By the memory usage of the n-th-3 unit period, the cpu busy percentage of the n-th-3 unit period and the n-th-3 units
The memorizer utilization rate in cycle is converted into the eigen vector X of the n-th-3 unit period1(x11, x12, x13);
By the memory usage of the n-th-2 unit period, the cpu busy percentage of the n-th-2 unit period and the n-th-2 units
The memorizer utilization rate in cycle is converted into the eigen vector X of the n-th-2 unit period2(x21, x22, x23);
The memory usage of (n-1)th unit period, the cpu busy percentage of (n-1)th unit period and (n-1)th unit week
The memorizer utilization rate of phase is converted into the eigen vector X of (n-1)th unit period3(x31, x32, x33).
(2) distance between the characteristic vector in each cycle and preset overload vector is calculated respectively.
Wherein, overload vector can be configured according to the demand of reality application, such as, if definition internal memory, CPU and storage
The resource utilization ratio of device is overload when being 90%, then overload vector is (90,90,90);The most such as, if in definition
When the resource utilization ratio deposited is 80% be overload, the resource utilization ratio of CPU be overload when being 85%, to deposit
The resource utilization ratio of reservoir is overload when being 90%, then overload vector is (80,85,90), by that analogy, etc..
Wherein, the distance between two characteristic vectors can use Euclidean distance to represent, such as, is provided with two spies
Levy vector, X=(x1, x2, x3), Y=(y1, y2, y3), then distance dis(X between the two characteristic vector, Y) can be such that
Such as, with overload vector as Y(y1, y2, y3), the eigen vector X of the n-th-3 unit period1(x11, x12, x13),
The eigen vector X of n-2 unit period2(x21, x22, x23) and the eigen vector X of (n-1)th unit period3(x31, x32,
x33As a example by), then:
The eigen vector X of the n-th-3 unit period1(x11, x12, x13) with overload vector be Y(y1, y2, y3Between) away from
From for:
The eigen vector X of the n-th-2 unit period2(x21, x22, x23) with overload vector be Y(y1, y2, y3Between) away from
From for:
The eigen vector X of (n-1)th unit period3(x31, x32, x33) with overload vector be Y(y1, y2, y3Between) away from
From for:
(3) according to the distance calculated, compose according to preset power of composing strategy service request number handled by each cycle
Power.
Wherein, this tax power strategy meets the condition that distance the least tax power is the biggest, specifically can be according to the demand of reality application
And arrange, it is for instance possible to use strategy as follows:
Weights are equal to the difference between distance and the maximum distance in this cycle.
It is, of course, also possible to use other strategy, no longer enumerate at this.
(4) result produced after the service request number handled by this each cycle is multiplied by the weights of correspondence respectively is folded
Add, and divided by the sum of all weights, obtain the service request number N that system in next unit period can process.Such as, specifically
Can use equation below:
Wherein, obtained result is exactly N, XiService request number handled by each cycle, wiCorresponding for this cycle
Weights, K is periodicity.
103, in this next one unit period, process queue from service request and obtain N number of service request.
Such as, if service request processes service request number actual in queue more than or equal to N number of, then from service request
Processing after taking out N number of service request in queue, stop taking service request, enter scheduling next time, wherein, this stopping takes business please
The operation asked, it is also possible to be referred to as stream control back-pressure.And if service request processes service request number actual in queue and is less than N number of,
Then it is as the criterion with actual number of request, i.e. processes the service request taking out actual number queue from service request.
Wherein, service request here refers mainly to be initiated by client, and the business after being packaged by protocol adaptation layers
Request, i.e. before step " processes queue from service request and obtains N number of service request (i.e. step 103) ", the method is also
May include that
Receive service request, and this service request is added to service request process in queue, wherein, this service request by
Protocol adaptation layers is packaged.
104, the service request got is submitted to business thread pool, to process.
Wherein, each file system is provided with business thread pool, for processing the request in the request queue of front end.
Wherein, after the service request got " is submitted to business thread pool, to process " by step, it is also possible to
The service request number that record gets, in order to " the service request number N that system can process " of the unit period in face after computation
Time can be as a reference factor (as one of resource load information).
Hereafter, it is also possible to receive the result about service request that business thread pool returns, and by this result
It is sent to protocol adaptation layers, in order to return to user;I.e. step " service request got is submitted to business thread pool,
To carry out processing (i.e. step 104) " after, the method can also include:
The result about service request that reception business thread pool returns;This result is sent to protocol adaptation
Layer, in order to this result is returned to user by protocol layer by protocol adaptation layers.
From the foregoing, it will be observed that the embodiment of the present invention uses obtains resource load information, according to this resource load information, utilize KNN
The service request number N that in the next unit period of algorithm estimation, system can process, in this unit period, at service request
Reason queue obtains N number of service request, and the service request got is submitted to business thread pool, to process;By
The loading condition of various resources in the program can consider storage system, and according to this loading condition, flow is carried out
Control, so in terms of existing technologies, can more fully utilize system resource, the globality of beneficially raising system
Energy.
Embodiment two,
According to the method described by embodiment one, below citing is described in further detail.
For convenience, in the present embodiment, disk (i.e. disk array) and service traffics will be specially with memorizer
Controlling to illustrate as a example by device is integrated in storage server, wherein, this Business Stream amount control device specifically can be integrated in
In service quality (QOS, the Quality of Service) module of privately owned file system.
As shown in Figure 2 a, this figure is the structural representation of storage server, and from Fig. 2 a, storage server can include
Protocol adaptation layers, Virtual File System (VFS, Virtual File System), privately owned file system and disk array etc..Its
In, client can pass through transmission control protocol/Internet Protocol (TCP/IP, Transmission Control
Protocol/Internet Protocol, is called for short network communication protocol) network is by service request entrance storage server, first
Process with virtual file system through protocol adaptation layers, subsequently into privately owned file system, this privately owned file system has individual
QOS module.Hereafter through being driven in disk array, the I/O operation of data is carried out.
And Business Stream amount control device is predominantly located in the QOS module of privately owned file system, such as, as shown in Figure 2 b, industry
Business volume control device can obtain resource load information by information gathering, such as by virtual unit layer (the most virtual literary composition
Part system), caching and system management module in gather the memory usage of nearest K unit period, cpu busy percentage, disk
Utilization rate and handled service request number etc., then carry out stream control back-pressure according to the resource load information got, and will
The result finally given returns to protocol adaptation layers, protocol adaptation layers return to use by result by protocol layer
Family.QOS module can also be by (the business that in such as next unit period, system can process of information in system in the process
The service request number etc. of the information such as number of request N and/or actual treatment) report in time, and shown by administration interface, and be somebody's turn to do
Administration interface can also accept the configuration management of QOS module.Wherein, the I/O between modules can be carried out by I/O dispatch layer
Management and scheduling.
Structural schematic block diagram based on above-mentioned Business Stream amount control device, is below carried out the concrete flow process that performs specifically
Bright.
A kind of job flow control method, as shown in Figure 2 c, idiographic flow can be such that
201, timing acquiring resource load information in QOS module, such as, specifically can be such that
Timing gathers the utilization rate of the CPU of nearest K unit period from system management module, timing gathers from caching
The memory usage of nearest K unit period and timing gather the disk profit of nearest K unit period from virtual unit layer
By rate etc., additionally, the handled service request number of nearest K unit period also can be gathered.
Wherein, K is positive integer, and the concrete value of K can be configured according to the demand of reality application, such as, and Ke Yishe
Determine K >=5.
Additionally, the cycle that QOS module gathers resource load information can be configured, at this according to the demand of reality application
Repeat no more.
202, client sends service request to protocol adaptation layers by agreement.
203, the service request received is packaged by protocol adaptation layers, and adds the service request after encapsulation to industry
Business request processes in queue.
It should be noted that, each file system front end (position parallel with protocol adaptation layers) is provided with request and processes team
Row, the service request of the privately owned file system of all entrance all can initially enter service request and process queue, by privately owned file system
Determine when these service request go out team and process.Wherein, each privately owned file system is provided with business thread pool, is used for processing
Request in the request queue of front end.Within the per unit cycle, business thread pool can process from service request and take out one queue
Fixed number purpose service request processes, and does not repeats them here.
Wherein, step 201 and step 202, execution sequence between 203 in no particular order, such as, can first carry out step
201, then perform step 202 and 203, it is also possible to first carry out step 202 and 203, then perform step 201, etc., the most superfluous at this
State.
204, QOS module can process according to system in the next unit period of resource load information estimation got
Service request number N, wherein N is positive integer.
Such as, specifically can according to the memory usage of this nearest K unit period, cpu busy percentage, disk utilization and
Handled service request number, utilizes the business that system in the next unit period of K arest neighbors sorting algorithm estimation can process
Number of request N, such as, specifically can be such that
(1) memory usage, cpu busy percentage and the disk utilization of this nearest K unit period are converted into respectively respectively
The eigen vector in individual cycle;
Such as, the memory usage of nearest K unit period, central authorities process (CPU) utilization rate and disk utilization difference
As shown in Table 1, wherein, in table, the unit of numerical value is percentage ratio.
Table one:
Sequence number |
Memory usage |
Cpu busy percentage |
Disk utilization |
Process request number |
n-5 |
50 |
20 |
30 |
100 |
n-4 |
60 |
35 |
40 |
350 |
n-3 |
65 |
90 |
80 |
450 |
n-2 |
80 |
80 |
90 |
500 |
n-1 |
85 |
95 |
95 |
600 |
n |
90 |
90 |
90 |
N=? |
Then, now can obtain:
The eigen vector X of the n-th-5 unit period1(50,20,30);
The eigen vector X of the n-th-4 unit period2(60,35,40);
The eigen vector X of the n-th-3 unit period3(65,90,80);
The eigen vector X of the n-th-2 unit period4(80,80,90);
The eigen vector X of (n-1)th unit period5(85,95,95).
(2) distance between the characteristic vector in each cycle and preset overload vector is calculated respectively.
Wherein, overload vector can be configured, for convenience, at the present embodiment according to the demand of reality application
In, will with overload vector as Y(90,90,90) as a example by illustrate.Then according to formula:
Can obtain:
The eigen vector X of the n-th-5 unit period1(50,20,30) with overload vector be Y(90,90,90) distance be
100;
The eigen vector X of the n-th-4 unit period2(60,35,40) overload vector be Y(90,90,90) distance be 73;
The eigen vector X of the n-th-3 unit period3(65,90,80) overload vector be Y(90,90,90) distance be 27;
The eigen vector X of the n-th-2 unit period4(80,80,90) overload vector be Y(90,90,90) distance be 14;
The eigen vector X of (n-1)th unit period5(85,95,95) overload vector be Y(90,90,90) distance be 9.
(3) according to the distance calculated, compose according to preset power of composing strategy service request number handled by each cycle
Power.
Wherein, this tax power strategy meets the condition that distance the least tax power is the biggest, specifically can be according to the demand of reality application
And arrange, such as, as a example by the difference between weights distance and maximum distance equal to this cycle, then can be with each distance and power
Corresponding relation between value can be as shown in Table 2.
Table two:
Distance (distance) |
Value (value) |
Weights (i.e. weight (weight)) |
100 |
100 |
0 |
73 |
350 |
27 |
27 |
450 |
73 |
14 |
500 |
86 |
9 |
600 |
91 |
0 |
N |
|
Wherein, value (value) refers to the service request number handled by each cycle, as shown in Table 1:
Service request number handled by the n-th-5 unit period is 100;
Service request number handled by the n-th-4 unit period is 350;
Service request number handled by the n-th-3 unit period is 450;
Service request number handled by the n-th-2 unit period is 500;
Service request number handled by (n-1)th unit period is 600.
(4) result produced after the service request number handled by this each cycle is multiplied by the weights of correspondence respectively is folded
Add, and divided by the sum of all weights, obtain next unit period, the business that in the i.e. n-th unit period, system can process
Number of request N.Specific as follows:
Each distance obtained in (3) is substituted into formula respectively:
Obtaining the service request number N handled by the n-th unit period is 505.
205, QOS module is in this next one unit period (i.e. in the n-th unit period), processes team from service request
Row obtain N number of service request, the service request got is submitted to business thread pool, to process, and record acquisition
The service request number arrived.
Such as, in step 203, know that N is 505, then at this point it is possible to process queue from service request and obtain 505
Service request, then the service request got is submitted to business thread pool, to process, and records the industry that gets
Business number of request " 505 ".
It should be noted that, if the service request number taken out in our unit's cycle is less than N, then with the service request of actual treatment
Number is as the criterion, and records the service request number of this actual treatment, such as records in the information submodule of QOS module;If this
The when that unit period being the completeest, have been taken out N number of service request, then stop taking service request, enter scheduling next time.
206, after business thread pool has processed service request, return about the result of service request to QOS module,
This result is sent to protocol adaptation layers by QOS module.
207, this result is returned to user by protocol layer by protocol adaptation layers.
Business Stream amount control device is integrated in QOS module, by QOS module from the foregoing, it will be observed that the embodiment of the present invention uses
Timing acquiring resource load information, according to this resource load information, utilizes system energy in the next unit period of KNN algorithm estimation
Enough service request number N processed, in this unit period, process from service request and obtain N number of service request queue, and will
The service request got submits to business thread pool, to process;Owing to the program can consider in storage system
The characteristic of various resources and concrete loading condition, and according to this loading condition, flow is controlled, such as in system resource
During overload, carry out stream control back-pressure, and when system resource is abundant, the maximum capacity that can process according to system obtains business please
Ask, etc., so in terms of existing technologies, can more fully utilize system resource, beneficially raising system whole
Body performance.
Embodiment three,
In order to preferably implement above method, the embodiment of the present invention also provides for a kind of Business Stream amount control device, such as Fig. 3 institute
Showing, this Business Stream amount control device includes information acquisition unit 301, evaluation unit 302, acquisition request unit 303 and submits to single
Unit 304, as follows:
Information acquisition unit 301, is used for obtaining resource load information;
Evaluation unit 302, for the resource load information got according to information acquisition unit 301, utilizes KNN algorithm to estimate
The service request number N that in the next unit period of calculation, system can process, wherein, N is positive integer;
Acquisition request unit 303, in this next one unit period, obtains N number of from service request process queue
Service request;
Such as, if service request processes service request number actual in queue more than or equal to N number of, then from service request
Processing after taking out N number of service request in queue, stop taking service request, enter scheduling next time, wherein, this stopping takes business please
The operation asked, it is also possible to be referred to as stream control back-pressure.And if service request processes service request number actual in queue and is less than N number of,
Then it is as the criterion with actual number of request, i.e. processes the service request taking out actual number queue from service request.
Submit unit 304 to, for the service request that acquisition request unit 303 gets is submitted to business thread pool, with
Process.
Wherein, submitting to unit 304 service request got to submit to business thread pool after processing, also
The service request number got can be recorded, in order to " the service request that system can process of the unit period in face after computation
Number N " time can be as a reference factor (as one of resource load information), the most as shown in Figure 4, these service traffics control dress
Put and can also include recording unit 305;
Record unit 305, the service request number got for record.
Wherein, information acquisition unit 301, specifically may be used for gathering the memory usage of nearest K unit period, CPU
Any two or more information in utilization rate and memorizer utilization rate, and the service request number handled by collection.
Wherein, K is positive integer, and the concrete value of K can be configured according to the demand of reality application, such as, and Ke Yishe
Determine K >=5.
The most now, evaluation unit 302, specifically may be used for the internal memory according to nearest K the unit period collected and utilize
Any two or more information in rate, cpu busy percentage and memorizer utilization rate, and handled service request number, utilize KNN
The service request number N that in the next unit period of algorithm estimation, system can process.Such as, specifically can be such that
Evaluation unit 302, specifically may be used for utilizing the memory usage of nearest K unit period collected, CPU
Any two or more information in rate and memorizer utilization rate are converted into the eigen vector in each cycle respectively;Calculate each respectively
Distance between characteristic vector and the preset overload vector in cycle;According to the distance calculated, according to preset tax power strategy
Service request number handled by each cycle composes power;Business number number of request handled by each cycle is multiplied by respectively correspondence
The result produced after weights is overlapped, and divided by the sum of all weights, in obtaining next unit period, system can process
Service request number N.
Wherein, overload vector can be configured according to the demand of reality application, such as, if definition internal memory, CPU and storage
The resource utilization ratio of device is overload when being 90%, then overload vector is (90,90,90);The most such as, if in definition
When the resource utilization ratio deposited is 80% be overload, the resource utilization ratio of CPU be overload when being 85%, to deposit
The resource utilization ratio of reservoir is overload when being 90%, then overload vector is (80,85,90), by that analogy, etc..
Wherein, the distance between two characteristic vectors can use Euclidean distance to represent, such as, is provided with two spies
Levy vector, X=(x1, x2, x3), Y=(y1, y2, y3), then distance dis(X between the two characteristic vector, Y) can be such that
Wherein, this tax power strategy meets the condition that distance the least tax power is the biggest, specifically can be according to the demand of reality application
And arrange, for example, it is possible to weights are set equal to the difference between distance and the maximum distance in this cycle.It is, of course, also possible to use
Other strategy, the circular of this distance can be found in embodiment of the method above, do not repeats them here.
Wherein, service request here refers mainly to be initiated by client, and the business after being packaged by protocol adaptation layers
Request, the most as shown in Figure 4, this Business Stream amount control device can also include receiving unit 306;
Receive unit 306, be used for receiving service request, and this service request added in service request process queue,
Wherein, this service request is packaged by protocol adaptation layers.
Hereafter, it is also possible to receive the result about service request that business thread pool returns, and by this result
It is sent to protocol adaptation layers, in order to return to user;The most as shown in Figure 4, this Business Stream amount control device can also include sending
Unit 307;
Receive unit 306, it is also possible to for receiving the result about service request that business thread pool returns;
Transmitting element 307, for being sent to protocol adaptation layers by this result, in order to returns to this result use
Family.
When implementing, above unit can realize as independent entity, it is also possible to carries out combination in any, makees
Realizing for same or several entities, each the embodiment of the method being embodied as can be found in above of unit above, at this
Repeat no more.
This Business Stream amount control device can be independent entity, it is also possible to be integrated in the equipment such as storage server, example
As, specifically can be integrated in QOS, the Quality of Service module of the privately owned file system in storage server.
From the foregoing, it will be observed that the information acquisition unit 301 of the Business Stream amount control device of the embodiment of the present invention can obtain resource
Load information, then by evaluation unit 302 according to this resource load information, in utilizing the next unit period of KNN algorithm estimation
The service request number N that system can process, then by acquisition request unit 303 in this unit period, process team from service request
Row obtain N number of service request, and by submitting to unit 304 service request got to be submitted to business thread pool, to enter
Row processes;Owing to the program can consider the loading condition of various resources in storage system, and come according to this loading condition
Flow is controlled, so in terms of existing technologies, can more fully utilize system resource, be conducive to improving system
The overall performance of system.
Embodiment four,
Accordingly, a kind of communication system that the embodiment of the present invention provides, any one industry provided including the embodiment of the present invention
Business volume control device, specifically can be found in embodiment three.This Business Stream amount control device specifically can be integrated in storage server
In, such as, specifically can be such that
Storage server, is used for obtaining resource load information, according to this resource load information, utilizes under the estimation of KNN algorithm
The service request number N that in one unit period, system can process, in this next one unit period, processes team from service request
Row obtain N number of service request, the service request got is submitted to business thread pool, to process.
Wherein, after the service request got is submitted to business thread pool, it is also possible to the business that record gets
Number of request, in order to can be as a ginseng during " the service request number N that system can process " of the unit period in face after computation
Examine factor (as one of resource load information).
Wherein, the mode obtaining resource load information please with the business that system in estimation next one unit period can process
Ask several N such as, specifically can be can be such that by multiple
Storage server, specifically may be used for gathering the memory usage of nearest K unit period, cpu busy percentage and depositing
Any two or more information in reservoir utilization rate, and the service request number handled by collection, i.e. gather nearest K unit week
In the memorizer utilization rate of the memory usage of phase, the cpu busy percentage of nearest K unit period and nearest K unit period
Any two or more information, and obtain the service request number handled by nearest K unit period;According to this nearest K unit
Any two or more information in the memory usage in cycle, cpu busy percentage, memorizer utilization rate, and handled business
Number of request, utilizes the service request number N that system in the K arest neighbors sorting algorithm next unit period of estimation can process.
Wherein, K is positive integer, and the concrete value of K can be configured according to the demand of reality application, such as, and Ke Yishe
Determine K >=5.
Such as, specifically can be by the memory usage of this nearest K unit period, cpu busy percentage and memorizer utilization rate
In any two or more information be converted into the eigen vector in each cycle respectively, calculate respectively each cycle characteristic vector and
The preset distance between overload vector, according to the distance calculated, according to preset tax power strategy handled by each cycle
Service request number compose power, the service request number handled by this each cycle is multiplied by respectively correspondence weights after produce result
It is overlapped, and divided by the sum of all weights, obtains the service request number N that system in next unit period can process.
Wherein, overload vector can be configured according to the demand of reality application, composes power strategy then satisfied distance the least
Compose the condition that power is the biggest, specifically can be found in preceding embodiment, do not repeat them here.
Wherein, this storage server, it is additionally operable to before obtaining N number of service request from service request process queue,
Receiving service request, and this service request added in service request process queue, wherein, this service request is by protocol adaptation
Layer is packaged.
Hereafter, this storage server can also receive the result about service request that business thread pool returns, and
This result is sent to protocol adaptation layers, in order to return to user.
Additionally, this communication system can also include other equipment, such as, it is also possible to include client;
Client, is used for sending user and asks to storage server, and receive that storage server returns about business
The result of request.
The embodiment being embodied as can be found in above of each equipment, does not repeats them here above.
Owing to this communication system includes any one Business Stream amount control device that the embodiment of the present invention provides, therefore can be real
Any one beneficial effect achieved by Business Stream amount control device that the existing embodiment of the present invention provides, refers to preceding embodiment,
Do not repeat them here.
Embodiment five,
Additionally, the embodiment of the present invention also provides for a kind of storage system, can be such as storage server, as it is shown in figure 5, bag
Including protocol adaptation layers 501, privately owned file system 502 and for storing the memorizer 503 of data, wherein, memorizer 503 specifically may be used
With any one non-volatile memory medium, such as, can be disk (i.e. disk array), solid state hard disc or CD etc., privately owned
File system 502 can include service quality module (i.e. QOS module) 5021, as follows:
Protocol adaptation layers 501, is used for receiving and encapsulating service request, service request is sent in privately owned file system
Service quality module;
Service quality module 5021, is used for receiving service request, the service request received is added at service request
In reason queue, obtain resource load information, according to this resource load information, utilize the K arest neighbors classification KNN algorithm estimation next one
The service request number N that in unit period, system can process, wherein, N is positive integer, in this next one unit period, working
Business request processes in queue and obtains N number of service request, the service request got is submitted to business thread pool, to locate
Reason.
Wherein, the mode obtaining resource load information please with the business that system in estimation next one unit period can process
Ask several N to have multiple, such as, specifically can be such that
Service quality module 5021, specifically may be used for gathering the memory usage of nearest K unit period, CPU utilization
Any two or more information in rate and memorizer utilization rate (i.e. the utilization rate of memorizer 503), and the industry handled by collection
Business number of request;Memory usage, cpu busy percentage, memorizer utilization rate and handled industry according to this nearest K unit period
Business number of request, utilizes the service request number N that system in the K arest neighbors sorting algorithm next unit period of estimation can process.
Wherein, K is positive integer, and the concrete value of K can be configured according to the demand of reality application, such as, and Ke Yishe
Determine K >=5.Such as, specifically can be such that
Service quality module 5021, specifically may be used for utilizing the memory usage of this nearest K unit period, CPU
Any two or more information in rate and memorizer utilization rate are converted into the eigen vector in each cycle respectively;Calculate each respectively
Distance between characteristic vector and the preset overload vector in cycle;The distance calculated according to this, according to preset tax power plan
The slightly service request number handled by each cycle composes power;Service request number handled by each cycle is multiplied by respectively correspondence
The result produced after weights is overlapped, and divided by the sum of all weights, in obtaining next unit period, system can process
Service request number N.
Wherein, overload vector can be configured according to the demand of reality application, composes power strategy then satisfied distance the least
Compose the condition that power is the biggest, specifically can be found in preceding embodiment, do not repeat them here.
This service quality module 5021, it is also possible to for the service request number that gets of record, in order to face after computation
Can be as a reference factor (as resource load information during " the service request number N that system can process " of unit period
One of).
Hereafter, this service quality module 5021, it is also possible to for receive that business thread pool returns about service request
Result;This result is sent to protocol adaptation layers 501, in order to this result is returned to by protocol adaptation layers 501
User.
Additionally, this storage system can also include other module, Virtual File System etc., this void such as can also be included
Intend file system and the resource load information of offer system is provided, such as provide the memorizer of nearest K unit period to utilize
Rate is to service quality module 5021.
The embodiment being embodied as can be found in above of above modules, does not repeats them here.
From the foregoing, it will be observed that the storage system that the embodiment of the present invention provides can obtain resource load information, bear according to this resource
Information carrying ceases, and utilizes the service request number N that system in the KNN algorithm next unit period of estimation can process, in this unit period
In, process queue from service request and obtain N number of service request, and the service request got is submitted to business thread
Pond, to process;Owing to the program can consider the loading condition of various resources in storage system, and according to this load
Flow is controlled by situation, so in terms of existing technologies, can more fully utilize system resource, is conducive to
The overall performance of raising system.
Embodiment six,
Accordingly, the embodiment of the present invention also provides for a kind of storage control, and as shown in Figure 6, this storage control can wrap
Include central processing unit 601 and for storing the volatile storage medium 602 of data;As follows:
Central processing unit 601, is used for obtaining resource load information;According to this resource load information, KNN algorithm is utilized to estimate
The service request number N that in next unit period, system can process, wherein, N is positive integer;In this next one unit period
In, process queue from service request and obtain N number of service request;The service request got is submitted to business thread pool,
To process.
Wherein, after the service request got is submitted to business thread pool, central processing unit 601 can also record
The service request number got, in order to can during " the service request number N that system can process " of the unit period in face after computation
Using as a reference factor (as one of resource load information).
Wherein, the mode obtaining resource load information please with the business that system in estimation next one unit period can process
Ask several N such as, specifically can be can be such that by multiple
Central processing unit 601, specifically may be used for gathering the profit of the volatile storage medium 602 of nearest K unit period
By any two or more information in the utilization rate of rate, the utilization rate of central processing unit 601 and non-volatile memory medium, and
Service request number handled by collection;The utilization rate of volatile storage medium 602 according to nearest K unit period, centre
Any two or more information in the utilization rate of reason device 601 and the utilization rate of non-volatile memory medium, and handled industry
Business number of request, utilizes the service request number N that system in the KNN algorithm next unit period of estimation can process.
Wherein, volatile storage medium 602 is specifically as follows the equipment such as internal memory, and non-volatile memory medium can be then
The equipment such as disk, solid state hard disc or CD.
Wherein, K is positive integer, and the concrete value of K can be configured according to the demand of reality application, such as, and Ke Yishe
Determine K >=5.
Such as, central processing unit 601 specifically can be by the described volatile storage medium 602 of nearest K unit period
Any two or more information in the utilization rate of utilization rate, the utilization rate of central processing unit 601 and non-volatile memory medium are divided
It is not converted into the eigen vector in each cycle;Calculate respectively between characteristic vector and the preset overload vector in each cycle described
Distance;According to this distance, compose power according to preset power of composing strategy service request number handled by each cycle;By each week
The result that service request number handled by phase produces after being multiplied by the weights of correspondence respectively is overlapped, and divided by all weights
With, obtain the service request number N that system in next unit period can process.
Wherein, overload vector can be configured according to the demand of reality application, composes power strategy then satisfied distance the least
Compose the condition that power is the biggest, specifically can be found in preceding embodiment, do not repeat them here.
Wherein, this central processing unit 601, it is also possible to be used for receiving service request, and add this service request to business
Request processes in queue, and wherein, this service request is packaged by protocol adaptation layers.
Hereafter, this central processing unit 601 can also receive the result about service request that business thread pool returns,
And this result is sent to protocol adaptation layers, in order to return to user.
The embodiment being embodied as can be found in above of each equipment, does not repeats them here above.
From the foregoing, it will be observed that the storage control that the embodiment of the present invention provides can obtain resource load information, according to this resource
Load information, utilizes the service request number N that system in the KNN algorithm next unit period of estimation can process, in this unit week
In phase, process queue from service request and obtain N number of service request, and the service request got is submitted to business thread
Pond, to process;Owing to the program can consider the loading condition of various resources in storage system, and according to this load
Flow is controlled by situation, so in terms of existing technologies, can more fully utilize system resource, is conducive to
The overall performance of raising system.
Embodiment seven,
Accordingly, the embodiment of the present invention also provides for a kind of computer system, any one provided including the embodiment of the present invention
Storage control and for storing the non-volatile memory medium of data, such as, as it is shown in fig. 7, this computer system can be wrapped
Including storage control 701 and non-volatile memory medium 702, wherein, this storage control 701 can include central processing unit
7011 and for storing the volatile storage medium 7012 of data;As follows:
Central processing unit 7011, is used for obtaining resource load information;According to this resource load information, K arest neighbors is utilized to divide
The service request number N that in the next unit period of class KNN algorithm estimation, system can process, wherein, N is positive integer;Under this
In one unit period, process queue from service request and obtain N number of service request;The service request got is submitted to
Business thread pool, to process.
Wherein, after the service request got is submitted to business thread pool, central processing unit 7011 can also be remembered
The service request number that gets of record, in order to during " the service request number N that system can process " of the unit period in face after computation
Can be as a reference factor (as one of resource load information).
Wherein, the mode obtaining resource load information please with the business that system in estimation next one unit period can process
Ask several N such as, specifically can be can be such that by multiple
Central processing unit 7011, specifically may be used for gathering the volatile storage medium 7012 of nearest K unit period
Any two or more letters in the utilization rate of utilization rate, the utilization rate of central processing unit 7011 and non-volatile memory medium 702
Breath, and the service request number handled by collection;The profit of the volatile storage medium 7012 according to described nearest K unit period
By any two or more information in the utilization rate of rate, the utilization rate of central processing unit 7011 and non-volatile memory medium 702,
And handled service request number, utilize the service request that system in the KNN algorithm next unit period of estimation can process
Number N.
Wherein, volatile storage medium 7012 is specifically as follows the equipment such as internal memory, and non-volatile memory medium 702 then may be used
To be the equipment such as disk, solid state hard disc or CD.
Wherein, K is positive integer, and the concrete value of K can be configured according to the demand of reality application, such as, and Ke Yishe
Determine K >=5.
Such as, central processing unit 7011 specifically can be by the described volatile storage medium 7012 of nearest K unit period
Utilization rate, the utilization rate of central processing unit 7011 and non-volatile memory medium 702 utilization rate in the most two or more
Information is converted into the eigen vector in each cycle respectively;Calculate respectively the characteristic vector in each cycle described and preset overload to
Distance between amount;According to described distance, compose power according to preset power of composing strategy service request number handled by each cycle;
The result produced after service request number handled by each cycle is multiplied by the weights of correspondence respectively is overlapped, and divided by all
The sum of weights, obtains the service request number N that system in next unit period can process.
Wherein, overload vector can be configured according to the demand of reality application, composes power strategy then satisfied distance the least
Compose the condition that power is the biggest, specifically can be found in preceding embodiment, do not repeat them here.
Wherein, this central processing unit 7011, it is also possible to be used for receiving service request, and add this service request to business
Request processes in queue, and wherein, this service request is packaged by protocol adaptation layers.
Wherein, this central processing unit 7011, it is also possible to receive the process knot about service request that business thread pool returns
Really, and by this result it is sent to protocol adaptation layers, in order to return to user.
The embodiment being embodied as can be found in above of each equipment, does not repeats them here above.
From the foregoing, it will be observed that the storage control that the embodiment of the present invention provides can obtain resource load information, according to this resource
Load information, utilizes the service request number N that system in the KNN algorithm next unit period of estimation can process, in this unit week
In phase, process queue from service request and obtain N number of service request, and the service request got is submitted to business thread
Pond, to process;Owing to the program can consider the loading condition of various resources in storage system, and according to this load
Flow is controlled by situation, so in terms of existing technologies, can more fully utilize system resource, is conducive to
The overall performance of raising system.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is can
Completing instructing relevant hardware by program, this program can be stored in a computer-readable recording medium, storage
Medium may include that read only memory (ROM, Read Only Memory), random access memory (RAM, Random
Access Memory), disk or CD etc..
A kind of job flow control method, device and the system that are thered is provided the embodiment of the present invention above have carried out detailed Jie
Continuing, principle and the embodiment of the present invention are set forth by specific case used herein, and the explanation of above example is only
It is the method and core concept thereof being adapted to assist in and understanding the present invention;Simultaneously for those skilled in the art, according to the present invention's
Thought, the most all will change, and in sum, this specification content should not be construed as
Limitation of the present invention.