CN102779062A - Method and device for controlling number of threads accessing system resources - Google Patents

Method and device for controlling number of threads accessing system resources Download PDF

Info

Publication number
CN102779062A
CN102779062A CN2011101182338A CN201110118233A CN102779062A CN 102779062 A CN102779062 A CN 102779062A CN 2011101182338 A CN2011101182338 A CN 2011101182338A CN 201110118233 A CN201110118233 A CN 201110118233A CN 102779062 A CN102779062 A CN 102779062A
Authority
CN
China
Prior art keywords
response time
threshold value
request
amount threshold
system resources
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.)
Pending
Application number
CN2011101182338A
Other languages
Chinese (zh)
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN2011101182338A priority Critical patent/CN102779062A/en
Publication of CN102779062A publication Critical patent/CN102779062A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method and a device for controlling the number of threads accessing system resources. The method comprises the following steps: determining the response time for processing a request for accessing system resources; and comparing the determined response time with a preset time threshold, and adjusting the set maximum thread number threshold according to the comparison result, wherein the threads are threads established according to the request for accessing the system resources. According to the scheme provided by the embodiment of the invention, the more reasonable maximum thread number threshold is determined to improve the performance and the stability of a system under the condition of ensuring high resource utilization ratio of the system.

Description

A kind of control method of number of threads of access system resources and device
Technical field
The application relates to field of computer technology, relates in particular to a kind of control method and device of number of threads of access system resources.
Background technology
In computer system, can use various system resources to carry out task and handle, when task need be handled, the request of visit appointing system resource can be received by system, system utilizes the thread of being set up that this request is handled to asking to set up thread then.Wherein, System resource is for accomplishing the system service resource needed; Comprise local resource and remote resource, local resource such as cpu resource, memory source etc., remote resource are generally the resource that this service need be obtained through far call; Like the search engine resource that foreground system relied in the search system, the database resource that the Query Database server relied on etc.
At present; In single-threaded system; When the usage degree of system resource does not reach the bottleneck of resource own; Be current free system resources when relatively sufficient, the response time that the request of visit appointing system resource is handled generally is a fixed value, and this response time is time that full request consumed of processing.As needing Query Database in certain business processing process, to call database from transmission SQL and begin to return to data, the time that this process database spent is exactly the response time of this professional data base querying.For example; In single CPU computer system; Set up a thread and use cpu resource that a calculation task request is handled, as shown in Figure 1, this processing procedure comprises n processing links altogether; The time sum that this n processing links is used promptly is the response time T that this calculation task request is handled; And for the system that supports multithreading, for example, be equally in single CPU computer system; Set up two threads use cpu resources respectively to Fig. 1 in two identical these calculation task requests handle, as shown in Figure 2 because cpu resource can only be taken by a thread at one time; So when one of them thread when the calculation task request corresponding with this thread handled; The another one thread then is to be in waiting status, and promptly two threads can't be realized simultaneously each self-corresponding calculation task request being handled, so; Response time to handling with every corresponding calculation task request of thread no longer is a fixed value T; But greater than this fixed value T, if two thread corresponding response times shown in Figure 2 be respectively T1 and T2, then in general T1 and T2 be approximately 4 times T.
Though compare single-threaded system; The system of support multithreading is longer to the response time that the request of identical access system resources is handled; But adopt multi-threaded system can realize parallel processing to a plurality of requests; Improving usage factor of system resource, thereby improved the performance of system on the whole.Request quantity QPS (query-per-second) that the system that is illustrated in figure 3 as handles p.s. and the function relation figure between the number of threads, therefrom visible, in the starting stage; When number of threads more after a little while; The QPS value is also less, along with the increase QPS value of number of threads also increases, but when number of threads is increased to certain value; The QPS value reaches peak value, next then reduces on the contrary along with the increase QPS value of number of threads.This is also to need the using system resource owing to set up thread itself; So when the number of threads of setting up too much takies a large amount of system resource; Then cause the system resource wretched insufficiency that pairing request is handled to thread; Thereby had a strong impact on the efficient that request is handled, made the QPS value reduce on the contrary, the system that can make when serious too much causes system unstable because of resource consumption.
Therefore, a maximum thread amount threshold value can be set in advance generally in the prior art, and control the current number of threads of having set up be not more than this maximum thread amount threshold value of being provided with in advance, to avoid occurring system's problem of unstable.
Yet,, generally be rule of thumb to be worth for the setting of this maximum thread amount threshold value; And and be not easy to dispose a preferred values that is fit to current system; And consider maximum utilization factor at present, generally all can dispose a bigger value system resource, at this moment still can be owing to the current number of threads of having set up too much causes system unstable; And Hardware configuration generation political reform when system; Then system resource also can change, and also can't reasonably adjust the setting of this maximum thread amount threshold value this moment, and then can influence the resource utilization of system or the stability of reduction system.
Summary of the invention
In view of this; The application embodiment provides a kind of control method and device of number of threads of access system resources; Be used for through confirming more reasonably maximum thread amount threshold value,, improve the performance and the stability of system with under the situation of the high resource utilization of the system of assurance.
The application embodiment realizes through following technical scheme:
According to the aspect of the application embodiment, a kind of control method of number of threads of access system resources is provided, comprising:
Definite response time that the request of access system resources is handled;
More said response time and Preset Time threshold value, according to comparative result, the maximum thread amount threshold value that adjustment is set, the thread of said thread for setting up to the request of access system resources.
According to another aspect of the application embodiment, a kind of control device of number of threads of access system resources also is provided, comprising:
Confirm the unit, be used for definite response time that the request of access system resources is handled;
First processing unit is used for more said response time and Preset Time threshold value, according to comparative result, and the maximum thread amount threshold value that adjustment is set, the thread of said thread for setting up to the request of access system resources.
Above-mentioned at least one technical scheme that provides through the application embodiment; At first definite response time that the request of access system resources is handled; And response time and the Preset Time threshold value relatively confirmed, then according to comparative result, the maximum thread amount threshold value that adjustment is set.Because the response time to the request of access system resources is handled is long more; The number of threads that expression has been set up at present is many more; The resource utilization that is current system can meet the demands, but the response time of characterization system response performance is longer, and expression needs the response performance of raising system; Accordingly, the response time is short more, and the current response performance of expression system is higher, and the number of threads that expression has simultaneously been set up at present is less, promptly also can't satisfy the requirement of the resource utilization of system.Above-mentioned characteristic based on the response time; According to the comparative result of response time and Preset Time threshold value, dynamically the maximum thread amount threshold value of adjustment setting can realize the current actual conditions based on system; Confirm more reasonably maximum thread amount threshold value; Make according to adjusted more reasonably maximum thread amount threshold value, realize effective control, thereby can effectively control the response time that the request of access system resources is handled number of threads; And then under the situation of the high resource utilization that guarantees system; Improved the response performance of system, and can avoid causing system unstable, promptly improved the stability of system owing to the quantity of foundation thread is excessive.
The application's further feature and advantage will be set forth in instructions subsequently, and, partly from instructions, become obvious, perhaps understand through implementing the application.The application's purpose can realize through the structure that in the instructions of being write, claims and accompanying drawing, is particularly pointed out and obtain with other advantages.
Description of drawings
Accompanying drawing is used to provide the further understanding to the application, and constitutes the part of instructions, is used to explain the application with the application embodiment, does not constitute the restriction to the application.In the accompanying drawings:
Fig. 1 is the synoptic diagram of response time of in single-threaded system, a calculation task request being handled in the prior art;
Fig. 2 is the synoptic diagram of response time of in multi-threaded system, a pairing calculation task request of thread being handled in the prior art;
Fig. 3 is the request quantity of system's processing p.s. in the prior art and the function relation figure between the number of threads;
The process flow diagram of the control method of the number of threads of the access system resources that Fig. 4 provides for the application embodiment;
The process flow diagram of Fig. 5 for according to the response time maximum thread amount threshold value of setting dynamically being adjusted among the application embodiment 1;
Fig. 6 is the synoptic diagram that adopts first kind of mode memory response time among the application embodiment 1;
Fig. 7 is the synoptic diagram that adopts the second way memory response time among the application embodiment 1;
Fig. 8 be among the application embodiment 2 based on the maximum thread amount threshold value of setting in the foregoing description 1, set up the processing flow chart of thread to the request of access system resources;
The structural representation of the control of the number of threads of the access system resources that Fig. 9 provides for the application embodiment 3.
Embodiment
In order to provide through confirming more reasonably maximum thread amount threshold value; With under the situation of the high resource utilization that guarantees system; The implementation of the performance of raising system and stability, the application embodiment provides a kind of control method and device of number of threads of access system resources, and this technical scheme can be applied to the process that the request to access system resources is set up thread and handled; Both can be implemented as a kind of method, also can be implemented as a kind of device.Describe below in conjunction with the preferred embodiment of Figure of description, should be appreciated that preferred embodiment described herein only is used for explanation and explains the application, and be not used in qualification the application the application.And under the situation of not conflicting, embodiment and the characteristic among the embodiment among the application can make up each other.
The application embodiment provides a kind of control method of number of threads of access system resources, and is as shown in Figure 4, comprising:
Step S401, definite response time that the request of access system resources is handled;
Step S402, response time and the Preset Time threshold value relatively confirmed, according to comparative result, the maximum thread amount threshold value that adjustment is set, the thread of this thread for setting up to the request of access system resources.
Below in conjunction with accompanying drawing, method and the device that the application provides is described in detail with specific embodiment.
Embodiment 1:
The process flow diagram of Fig. 5 for according to the response time maximum thread amount threshold value of setting dynamically being adjusted among the application embodiment 1 specifically comprises following treatment step:
Step S501, definite response time that the request of access system resources is handled; Specifically can for; After the request that receives access resources,, the using system resource picks up counting when beginning to handle to this request,, this Request Processing stops timing after being finished; Then be the response time that this request is handled between institute's timing during this, this response time is for to bring into use system resource to the time between being used to complete to asking.
For this response time of determining, can directly be used for follow-up treatment scheme, also can store in this locality, re-use after when follow-up need to use, obtaining from this locality.For example, specifically can adopt following mode to store definite response time:
First kind of mode: as shown in Figure 6; Be provided for the array of memory response time; The included number of elements of this array can be provided with as required in advance, when storage, and can be according to the element numeric order; To be stored in respectively the response time that each time request is handled in each array element; After all having stored the response time in the included array element of this array, then adopt the mode of rolling array for the response time of next determining, stored in the array element of response time before covering.For example; The included number of elements of array is 200, then stores into respectively the corresponding array element according to each response time that will confirm successively from the order of sequence number 1 to 200, and after all array elements have all stored the response time; Get back to the array element of sequence number 1 correspondence; With each response time of next confirming, still according to storing from the order of sequence number 1 to 200, and the response time of having stored before covering.
Adopt this mode memory response time, each response time that the response time that can guarantee to store in this array handles for the request of a nearest setting request quantity access system resources always.
The second way: as shown in Figure 7; Be provided for the array of memory response time; The included number of elements of this array can be provided with as required in advance; In when storage, the sequencing that the response time of handling according to the request of access system resources generates is according to the sequence number of element in array memory response time successively.Guarantee that promptly it is in 1 the array element that the response time that the request of the last access system resources is handled is stored in sequence number; And guarantee that pairing request of the response time of storing in each sequence number does; The preceding one-time request of the pairing request of response time of storing in the previous sequence number of this sequence number; And after all having stored the response time in the included array element of this array; During response time of next determining for needs storages, abandon the response time of current storage in last sequence number, be used for storing the response time of the current storage of previous sequence number of last sequence number.For example; The included number of elements of array is 200; Be used in the array element of sequence number 1 store the response time that the request of the last access system resources is handled; And when determining the up-to-date response time and needing storage, the response time of current storage in the array element of sequence number 1 is stored in the array element of sequence number 2, the response time of current storage is then stored in the array element of sequence number 3 in the array element of sequence number 2; The rest may be inferred; If store the response time in the array element of sequence number 200 at this moment, then the response time with current storage in the array element of sequence number 200 abandons, and stores the response time of the current storage of array element of sequence number 199 then.
Adopting this mode memory response time, can guarantee to distinguish corresponding request according to each response time of numeric order storage in this array, is to store according to the sequencing of request.
The third mode: when the response time that storage is handled the request of access system resources, also this request responding of corresponding stored constantly, this response can be processing of request zero hour constantly, also can be processing of request finish time.
Step S502, obtain the response time of storage, and determine and be used for the follow-up response time that compares with the Preset Time threshold value, specifically comprise following mode:
First kind of mode: obtain each response time that the request of a nearest setting request quantity access system resources is handled; And the average response time of definite each response time of being obtained, this average response time is used for follow-up and the Preset Time threshold value compares.
For example; Based on first kind of storage mode of response time among the above-mentioned steps S501, directly from the array of memory response time, obtain the response time of all included array element stored; And calculate the mean value of each response time of obtaining, as average response time.
The second way: obtain each response time that the request of access request system resource in the nearest setting-up time length is handled; And the average response time of definite each response time of being obtained, this average response time is used for follow-up and the Preset Time threshold value compares.
For example; Second kind of storage mode based on the response time among the above-mentioned steps S502; Obtain the response time of preceding n array element storage in the array, and guarantee this n array element storage response time be not more than setting-up time length with value, the response time that preceding n+1 array element stored be worth then greater than this setting-up time length; And calculate the mean value of this n response time of obtaining, as average response time.
Again for example; Second kind of storage mode based on the response time among the above-mentioned steps S502; Be engraved in each request corresponding response time respectively in this setting-up time length when obtaining the response of storage, and calculate the mean value of each response time of obtaining, as average response time.
Step S503, judge that the response time is whether greater than preset time threshold.
This response time that is used in this step judge can be the determined response time that the last time request is handled.
But in order to confirm the current state of system more accurately according to judged result, avoid contingency inaccurate to the judgement of system's current state, preferable, can adopt the mean value of a plurality of response times to be used for judging because of a response time.For example; The average response time of each response time that the request to a nearest setting request quantity access system resources of adopting first kind of mode to confirm among the above-mentioned steps S503 is handled, or adopt the average response time of each response time that the definite request to access request system resource in the nearest setting-up time length of the second way handles.
To use average response time to be judged as example, this step is specifically described as follows:
At first, from the allocation list of storage, obtain preset time threshold, time threshold can be set according to actual needs, for example, according to the user who uses this computer system requirement or the acceptance level of response time of carrying out one-time request and handling is set;
Judge that whether the average response time of confirming is greater than the preset time threshold that obtains;
If greater than, get into step S504;
If be not more than, get into step S505.
Step S504, since the response time that the request of access system resources is handled long more; The number of threads that expression has been set up at present is many more; So when this average response time during greater than preset time threshold, characterize and set up more thread in the current system, promptly the resource utilization of current system can meet the demands; But the response time of characterization system response performance is longer, and expression needs to improve the system responses performance.
The processing operation of the maximum thread amount threshold value that therefore, reduces to set in this step.For example, maximum thread amount threshold value reduces 1; If perhaps current maximum thread amount threshold value is greater than preset initial maximum thread amount threshold value; Then directly be adjusted into initial maximum thread amount threshold value; Follow-up can be based on this maximum thread amount threshold value that reduces, control is to the foundation of the thread of the request of access system resources, so that progressively reduce the response time that request is handled; Thereby improve the response performance of system, detailed process is described follow-up.
Can also be kept at current maximum thread amount threshold value in the allocation list in the present embodiment; So; Can also the maximum thread amount threshold value after reducing be stored in the allocation list in this step, promptly use the maximum thread amount threshold value after reducing to upgrade the former maximum thread amount threshold value that allocation list is stored.
Step S505, when this average response time is not more than preset time threshold; The response time that is the characterization system response performance is shorter, representes that the response performance of current system can meet the demands, so can continue new thread is set up in the request of access system resources; And handle; So that further improve the resource utilization of system, or improve the request quantity QPS that system handles p.s., promptly improve the handling property of system.
Therefore, increase the operation of the maximum thread amount threshold value of setting in this step, for example, maximum thread amount threshold value increases by 1, perhaps can also adjust maximum thread amount threshold value and be preset initial maximum thread amount threshold value, specifically can be following:
If current maximum thread amount threshold value then is adjusted into preset initial maximum thread amount threshold value less than preset initial maximum thread amount threshold value;
If current maximum thread amount threshold value is not less than preset initial maximum thread amount threshold value, then increase the maximum thread amount threshold value of setting.
Follow-up can be based on this maximum thread amount threshold value that increases; Control so that progressively increase the number of threads of being set up, further improves the resource utilization of system to the foundation of the thread of the request of access system resources; Or the handling property of raising system, detailed process is described follow-up.
Can also be in this step with the maximum thread amount threshold value after increasing; Perhaps adjusted initial maximum thread amount threshold value stores in the allocation list, promptly uses maximum thread amount threshold value or adjusted initial maximum thread amount threshold value after increasing to upgrade the former maximum thread amount threshold value that allocation list is stored.
Preferable, this step can also comprise following treatment step after above-mentioned steps S504:
Step S506, judge that whether maximum thread amount threshold value after reducing is the lower limit of the maximum thread amount threshold value preset; This lower limit is a value much smaller than initial maximum thread amount threshold value that is provided with in advance; If; The quantity of representing to have set up in the current system thread is less, but still can't satisfy the time threshold requirement of setting to the response time that request is handled, and representes that promptly this system has been in improper duty; Therefore carry out prompting operation, so that the user of service of this system in time safeguards this system.
Through the scheme in the foregoing description 1; Realized the response time that basis is handled the request of access system resources; Dynamically adjust the maximum thread amount threshold value of setting; Below in embodiment 2 to this maximum thread amount threshold value based on dynamic adjustment, the scheme of setting up thread to the request of access system resources is described in detail.
Embodiment 2:
Shown in Figure 8 be among the application embodiment 2 based on the maximum thread amount threshold value of setting in the foregoing description 1, set up the processing flow chart of thread to the request of access system resources, specifically comprise following treatment step:
Step S801, system receive the latest requests of access system resources.
Step S802, determine the current quantity of having set up thread, and obtain the maximum thread amount threshold value of current setting, specifically can from allocation list, obtain.
Step S803, judge the current quantity of having set up thread whether less than the maximum thread amount threshold value of the current setting of obtaining, if less than, get into step S804, if be not less than, get into step S805.
Step S804, the current quantity of having set up thread are less than maximum thread amount threshold value; Expression is for the current operation conditions of system; Can also be under the situation of the requirement of satisfying the response time that request is handled; Through to should latest requests setting up new thread, so that this request is handled timely, thus the handling property of raising system.
Therefore, in this step, carry out and set up and the corresponding thread of this latest requests that receives, and utilize this thread of being set up that this latest requests is handled.
Step S805, the current quantity of having set up thread are not less than maximum thread amount threshold value; Expression is for the current operation conditions of system; If, the feasible response time that request is handled possibly can't be met the demands, thereby makes the response performance of system reduce to should latest requests setting up new thread; And, also maybe be because of the current excessive system's instability that causes of quantity of having set up thread.
Therefore, in this step, carry out the processing of cancellation to this latest requests of reception; Promptly can be to should latest requests not setting up thread and it is handled; Accordingly, can return the notice that cancellation is handled to sending this requesting users, for example; Through send request timed out message to the user, to inform that the user should ask not accepted and handle.
Step S806, when in above-mentioned steps S804 to after should latest requests having set up new thread, upgrade the current quantity of having set up thread, be specially the current quantity of having set up thread added 1, the result is as the current quantity of having set up thread after upgrading.
After in above-mentioned steps S804, utilizing this thread of being set up this latest requests to be carried out processing to finish, upgrades the current quantity of having set up thread, be specially the current quantity of having set up thread is subtracted 1, the current quantity of having set up thread of result after as renewal.
The current quantity of having set up thread after upgrading in this step will be used for the determining step of above-mentioned steps S803 at any time.
Because the response time that the request of access system resources is handled is long more, the number of threads that expression has been set up at present is many more, when this response time during greater than preset time threshold; Characterize and set up more thread in the current system, promptly the resource utilization of current system can meet the demands, but the response time of characterization system response performance is longer; Expression needs the response performance of raising system; So the maximum thread amount threshold value through reducing to set in the application's the foregoing description 1 makes and to determine more reasonably maximum thread amount threshold value to the current situation of system, and in the application's the foregoing description 2 based on this maximum thread amount threshold value that reduces; Control the foundation of thread of the request of corresponding access system resources; As after the latest requests that receives access system resources, when the current quantity of having set up thread was not less than the maximum thread amount threshold value after reducing, cancellation was to the processing of the said latest requests of reception; Promptly can not set up new thread again; Realized effective control, thereby can progressively reduce the response time that the request of access system resources is handled, and then improved the response performance of system number of threads; And can avoid causing system unstable, promptly improve the stability of system owing to the quantity of foundation thread is excessive.
Embodiment 3:
Based on same inventive concept; The control method of the number of threads of the access system resources that provides according to the application's the foregoing description, correspondingly, the application embodiment 3 also provides a kind of control device of number of threads of access system resources; Its structural representation is as shown in Figure 9, specifically comprises:
Confirm unit 901, be used for definite response time that the request of access system resources is handled;
First processing unit 902 is used for more said response time and Preset Time threshold value, according to comparative result, and the maximum thread amount threshold value that adjustment is set, the thread of said thread for setting up to the request of access system resources.
Preferable, first processing unit 902 specifically is used for when said response time during greater than the Preset Time threshold value maximum thread amount threshold value that reduces to set; And/or when the said response time is not more than the Preset Time threshold value, increases the said maximum thread amount threshold value of setting or adjust the initial maximum thread amount threshold value of said maximum thread amount threshold value for presetting.
Preferable; Confirm unit 901; Specifically be used for confirming the average response time of each response time that the request of a nearest setting request quantity access system resources is handled, with said average response time as the response time that the request of access system resources is handled; The average response time of each response time of perhaps confirming the request of access request system resource in the nearest setting-up time length is handled, with said average response time as the response time that the request of access system resources is handled.
Preferable, said apparatus also comprises:
Tip element 903 when being used for said maximum thread amount threshold value after reducing for the lower limit of preset maximum thread amount threshold value, carries out prompting operation.
Preferable, said apparatus also comprises:
Second processing unit 904 is used for after receiving the latest requests of access system resources, and when the current quantity of having set up thread was not less than adjusted maximum thread amount threshold value, cancellation was to the processing of the said latest requests that receives.
Preferable, second processing unit 904 also is used for set up and the corresponding thread of said latest requests that receives, and the thread that utilization is set up being handled said latest requests when the current quantity of having set up thread during less than adjusted maximum thread amount threshold value.
The function of above-mentioned each unit can repeat no more at this corresponding to the handled step in Fig. 4, Fig. 5 and the flow process shown in Figure 8.
The application's the control device that embodiment provided can be realized through computer program.Those skilled in the art should be understood that; Above-mentioned Module Division mode only is a kind of in numerous Module Division modes; If be divided into other modules or do not divide module, as long as control device has above-mentioned functions, all should be within the application's protection domain.
In sum, the scheme that the application embodiment provides comprises: definite response time that the request of access system resources is handled; And response time and the Preset Time threshold value relatively confirmed, according to comparative result, the maximum thread amount threshold value that adjustment is set, the thread of this thread for setting up to the request of access system resources.The scheme that adopts the application embodiment to provide through confirming more reasonably maximum thread amount threshold value, with under the situation of the high resource utilization of the system of assurance, has improved the performance and the stability of system.
The application is that reference is described according to the process flow diagram and/or the block scheme of method, equipment (system) and the computer program of the application embodiment.Should understand can be by the flow process in each flow process in computer program instructions realization flow figure and/or the block scheme and/or square frame and process flow diagram and/or the block scheme and/or the combination of square frame.Can provide these computer program instructions to the processor of multi-purpose computer, special purpose computer, Embedded Processor or other programmable data processing device to produce a machine, make the instruction of carrying out through the processor of computing machine or other programmable data processing device produce to be used for the device of the function that is implemented in flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame appointments.
These computer program instructions also can be stored in ability vectoring computer or the computer-readable memory of other programmable data processing device with ad hoc fashion work; Make the instruction that is stored in this computer-readable memory produce the manufacture that comprises command device, this command device is implemented in the function of appointment in flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame.
These computer program instructions also can be loaded on computing machine or other programmable data processing device; Make on computing machine or other programmable devices and to carry out the sequence of operations step producing computer implemented processing, thereby the instruction of on computing machine or other programmable devices, carrying out is provided for being implemented in the step of the function of appointment in flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame.
Obviously, those skilled in the art can carry out various changes and modification and the spirit and the scope that do not break away from the application to the application.Like this, belong within the scope of the application's claim and equivalent technologies thereof if these of the application are revised with modification, then the application also is intended to comprise these changes and modification interior.

Claims (10)

1. the control method of the number of threads of an access system resources is characterized in that, comprising:
Definite response time that the request of access system resources is handled;
More said response time and Preset Time threshold value, according to comparative result, the maximum thread amount threshold value that adjustment is set, the thread of said thread for setting up to the request of access system resources.
2. the method for claim 1 is characterized in that, said response time and Preset Time threshold value, and according to comparative result, the maximum thread amount threshold value that adjustment is set specifically comprises:
When said response time during greater than the Preset Time threshold value, the maximum thread amount threshold value that reduces to set;
And/or,
When the said response time is not more than the Preset Time threshold value, increases the said maximum thread amount threshold value of setting or adjust the initial maximum thread amount threshold value of said maximum thread amount threshold value for presetting.
3. the method for claim 1 is characterized in that, definite response time that the request of access system resources is handled, specifically comprises:
The average response time of each response time of confirming the request of a nearest setting request quantity access system resources is handled, with said average response time as the response time that the request of access system resources is handled; Perhaps
The average response time of each response time of confirming the request of access request system resource in the nearest setting-up time length is handled, with said average response time as the response time that the request of access system resources is handled.
4. the method for claim 1 is characterized in that, also comprises:
Said maximum thread amount threshold value after reducing is carried out prompting operation during for the lower limit of preset maximum thread amount threshold value.
5. like the arbitrary described method of claim 1-4, it is characterized in that: after the maximum thread amount threshold value that adjustment is set, also comprise:
After receiving the latest requests of access system resources, when the current quantity of having set up thread was not less than adjusted maximum thread amount threshold value, cancellation was to the processing of the said latest requests that receives.
6. method as claimed in claim 5 is characterized in that, also comprises:
When the current quantity of having set up thread during, set up and the corresponding thread of said latest requests that receives, and the thread that utilization is set up is handled said latest requests less than adjusted maximum thread amount threshold value.
7. the control device of the number of threads of an access system resources is characterized in that, comprising:
Confirm the unit, be used for definite response time that the request of access system resources is handled;
First processing unit is used for more said response time and Preset Time threshold value, according to comparative result, and the maximum thread amount threshold value that adjustment is set, the thread of said thread for setting up to the request of access system resources.
8. device as claimed in claim 7 is characterized in that, said first processing unit specifically is used for when said response time during greater than the Preset Time threshold value maximum thread amount threshold value that reduces to set; And/or when the said response time is not more than the Preset Time threshold value, increases the said maximum thread amount threshold value of setting or adjust the initial maximum thread amount threshold value of said maximum thread amount threshold value for presetting.
9. device as claimed in claim 7; It is characterized in that; Said definite unit; Specifically be used for confirming the average response time of each response time that the request of a nearest setting request quantity access system resources is handled, with said average response time as the response time that the request of access system resources is handled; The average response time of each response time of perhaps confirming the request of access request system resource in the nearest setting-up time length is handled, with said average response time as the response time that the request of access system resources is handled.
10. device as claimed in claim 7 is characterized in that, also comprises:
Tip element when being used for said maximum thread amount threshold value after reducing for the lower limit of preset maximum thread amount threshold value, carries out prompting operation.
CN2011101182338A 2011-05-09 2011-05-09 Method and device for controlling number of threads accessing system resources Pending CN102779062A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011101182338A CN102779062A (en) 2011-05-09 2011-05-09 Method and device for controlling number of threads accessing system resources

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011101182338A CN102779062A (en) 2011-05-09 2011-05-09 Method and device for controlling number of threads accessing system resources

Publications (1)

Publication Number Publication Date
CN102779062A true CN102779062A (en) 2012-11-14

Family

ID=47123982

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011101182338A Pending CN102779062A (en) 2011-05-09 2011-05-09 Method and device for controlling number of threads accessing system resources

Country Status (1)

Country Link
CN (1) CN102779062A (en)

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103326950A (en) * 2013-06-20 2013-09-25 交通银行股份有限公司 Bank card data flow control method and system
CN103414959A (en) * 2013-07-15 2013-11-27 北京奇虎科技有限公司 Method and device for accelerating online video playing
CN104363270A (en) * 2014-10-29 2015-02-18 咸亨国际(杭州)物联网信息产业有限公司 Centralized interface communication concurrency control system and control method thereof
CN104410671A (en) * 2014-11-03 2015-03-11 深圳市蓝凌软件股份有限公司 Snapshot capturing method and data monitoring tool
CN105117291A (en) * 2015-06-30 2015-12-02 百度在线网络技术(北京)有限公司 Method and system adjusting operation quantity of message push executor
CN106649471A (en) * 2016-09-28 2017-05-10 新华三技术有限公司 Access control method and apparatus
CN107277091A (en) * 2016-04-07 2017-10-20 阿里巴巴集团控股有限公司 A kind of control method and system
CN107315385A (en) * 2017-06-26 2017-11-03 杭州电子科技大学 Embedded PLC engine implementing method and engine
CN107454004A (en) * 2016-05-30 2017-12-08 阿里巴巴集团控股有限公司 A kind of flow control methods and device
CN107463441A (en) * 2017-06-30 2017-12-12 大唐软件技术股份有限公司 A kind of number of threads control method and equipment
CN107483351A (en) * 2017-07-13 2017-12-15 中国银联股份有限公司 A kind of current-limiting method and device
CN107832126A (en) * 2017-10-20 2018-03-23 平安科技(深圳)有限公司 The method of adjustment and its terminal of a kind of thread
CN108259259A (en) * 2016-12-29 2018-07-06 北京国双科技有限公司 Cluster stability diagnostic method and device
CN108984288A (en) * 2018-06-11 2018-12-11 山东中创软件商用中间件股份有限公司 Thread pool capacity adjustment method, device and equipment based on system response time
CN109391680A (en) * 2018-08-31 2019-02-26 阿里巴巴集团控股有限公司 A kind of timed task data processing method, apparatus and system
CN109451051A (en) * 2018-12-18 2019-03-08 百度在线网络技术(北京)有限公司 Service request processing method, device, electronic equipment and storage medium
CN109857633A (en) * 2018-12-14 2019-06-07 武汉斗鱼鱼乐网络科技有限公司 A kind of task calculates power estimation method, device and storage medium
CN110166371A (en) * 2019-05-16 2019-08-23 北京达佳互联信息技术有限公司 Flow control methods, device, electronic equipment and storage medium
CN111176797A (en) * 2019-12-18 2020-05-19 北京百度网讯科技有限公司 Data concurrency processing method and device, electronic equipment and readable storage medium
JP2021015544A (en) * 2019-07-16 2021-02-12 キヤノン株式会社 Information processing device, method and program

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101938396A (en) * 2009-06-30 2011-01-05 华为技术有限公司 Data stream control method and device
CN101996067A (en) * 2009-08-19 2011-03-30 阿里巴巴集团控股有限公司 Data export method and device
CN102033784A (en) * 2010-11-18 2011-04-27 山东中创软件工程股份有限公司 Method and device for optimizing application server

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101938396A (en) * 2009-06-30 2011-01-05 华为技术有限公司 Data stream control method and device
CN101996067A (en) * 2009-08-19 2011-03-30 阿里巴巴集团控股有限公司 Data export method and device
CN102033784A (en) * 2010-11-18 2011-04-27 山东中创软件工程股份有限公司 Method and device for optimizing application server

Cited By (33)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103326950A (en) * 2013-06-20 2013-09-25 交通银行股份有限公司 Bank card data flow control method and system
CN103326950B (en) * 2013-06-20 2016-08-10 交通银行股份有限公司 A kind of bank card data flow control method and system
CN103414959B (en) * 2013-07-15 2017-04-05 北京奇虎科技有限公司 A kind of method and apparatus for accelerating Internet video broadcasting speed
CN103414959A (en) * 2013-07-15 2013-11-27 北京奇虎科技有限公司 Method and device for accelerating online video playing
CN104363270A (en) * 2014-10-29 2015-02-18 咸亨国际(杭州)物联网信息产业有限公司 Centralized interface communication concurrency control system and control method thereof
CN104363270B (en) * 2014-10-29 2017-11-24 咸亨国际(杭州)物联网信息产业有限公司 A kind of centralized interface communication concurrent control system and its control method
CN104410671A (en) * 2014-11-03 2015-03-11 深圳市蓝凌软件股份有限公司 Snapshot capturing method and data monitoring tool
CN104410671B (en) * 2014-11-03 2017-11-10 深圳市蓝凌软件股份有限公司 A kind of snapshot grasping means and data supervising device
CN105117291A (en) * 2015-06-30 2015-12-02 百度在线网络技术(北京)有限公司 Method and system adjusting operation quantity of message push executor
CN107277091A (en) * 2016-04-07 2017-10-20 阿里巴巴集团控股有限公司 A kind of control method and system
CN107277091B (en) * 2016-04-07 2020-10-27 阿里巴巴集团控股有限公司 Control method and system
CN107454004A (en) * 2016-05-30 2017-12-08 阿里巴巴集团控股有限公司 A kind of flow control methods and device
CN106649471A (en) * 2016-09-28 2017-05-10 新华三技术有限公司 Access control method and apparatus
CN108259259A (en) * 2016-12-29 2018-07-06 北京国双科技有限公司 Cluster stability diagnostic method and device
CN107315385B (en) * 2017-06-26 2019-08-06 杭州电子科技大学 Embedded PLC engine implementing method and engine
CN107315385A (en) * 2017-06-26 2017-11-03 杭州电子科技大学 Embedded PLC engine implementing method and engine
CN107463441B (en) * 2017-06-30 2020-10-27 大唐软件技术股份有限公司 Thread quantity control method and equipment
CN107463441A (en) * 2017-06-30 2017-12-12 大唐软件技术股份有限公司 A kind of number of threads control method and equipment
CN107483351A (en) * 2017-07-13 2017-12-15 中国银联股份有限公司 A kind of current-limiting method and device
CN107832126A (en) * 2017-10-20 2018-03-23 平安科技(深圳)有限公司 The method of adjustment and its terminal of a kind of thread
WO2019075980A1 (en) * 2017-10-20 2019-04-25 平安科技(深圳)有限公司 Thread adjustment method and terminal thereof
CN108984288A (en) * 2018-06-11 2018-12-11 山东中创软件商用中间件股份有限公司 Thread pool capacity adjustment method, device and equipment based on system response time
CN109391680A (en) * 2018-08-31 2019-02-26 阿里巴巴集团控股有限公司 A kind of timed task data processing method, apparatus and system
CN109391680B (en) * 2018-08-31 2021-07-09 创新先进技术有限公司 Timed task data processing method, device and system
CN109857633A (en) * 2018-12-14 2019-06-07 武汉斗鱼鱼乐网络科技有限公司 A kind of task calculates power estimation method, device and storage medium
CN109857633B (en) * 2018-12-14 2022-05-17 武汉斗鱼鱼乐网络科技有限公司 Task computing power estimation method and device and storage medium
CN109451051A (en) * 2018-12-18 2019-03-08 百度在线网络技术(北京)有限公司 Service request processing method, device, electronic equipment and storage medium
CN109451051B (en) * 2018-12-18 2021-11-02 百度在线网络技术(北京)有限公司 Service request processing method and device, electronic equipment and storage medium
CN110166371A (en) * 2019-05-16 2019-08-23 北京达佳互联信息技术有限公司 Flow control methods, device, electronic equipment and storage medium
JP2021015544A (en) * 2019-07-16 2021-02-12 キヤノン株式会社 Information processing device, method and program
JP7353836B2 (en) 2019-07-16 2023-10-02 キヤノン株式会社 Information processing device, method and program
CN111176797A (en) * 2019-12-18 2020-05-19 北京百度网讯科技有限公司 Data concurrency processing method and device, electronic equipment and readable storage medium
CN111176797B (en) * 2019-12-18 2023-10-27 北京百度网讯科技有限公司 Data concurrency processing method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN102779062A (en) Method and device for controlling number of threads accessing system resources
JP4697805B2 (en) Data processing device
WO2019075980A1 (en) Thread adjustment method and terminal thereof
US20160320998A1 (en) Control device, control method, computer program product, and electronic device
JP2017530449A (en) Method and apparatus for managing jobs that can and cannot be interrupted when there is a change in power allocation to a distributed computer system
US20080307248A1 (en) Cpu Clock Control Device, Cpu Clock Control Method, Cpu Clock Control Program, Recording Medium, and Transmission Medium
JP5802637B2 (en) Information processing apparatus, information processing method, and program
US10686728B2 (en) Systems and methods for allocating computing resources in distributed computing
CN104239153A (en) Method and device for balancing multi-core CPU load
US20080148273A1 (en) Dynamic voltage scaling scheduling mechanism for sporadic, hard real-time tasks with resource sharing
TW201205441A (en) Multi-CPU domain mobile electronic device and operation method thereof
CN103873587B (en) A kind of method and device that scheduling is realized based on cloud platform
CN111625080B (en) Server energy saving method and device, electronic equipment and storage medium
JP2005285093A (en) Processor power control apparatus and processor power control method
KR20110046719A (en) Multi-Core Apparatus And Method For Balancing Load Of The Same
WO2017131907A2 (en) Systems and methods for providing power efficiency via memory latency control
US10539995B2 (en) Performance boosting method and system of semiconductor device
US9213381B2 (en) Voltage regulator dynamically determining whether requested power transition can be supported
JP5585651B2 (en) Multi-core system, scheduling method and scheduling program
KR102270239B1 (en) Method and apparatus for executing software in a electronic device
CN111355751A (en) Task scheduling method and device
US9170839B2 (en) Method for job scheduling with prediction of upcoming job combinations
CN109189581B (en) Job scheduling method and device
CN105843752A (en) Method and device for distributing memory of mobile terminal for caching image data
CN109032779B (en) Task processing method and device, computer equipment and readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20121114

REG Reference to a national code

Ref country code: HK

Ref legal event code: WD

Ref document number: 1172701

Country of ref document: HK