CN113194040A - Intelligent control method for instantaneous high-concurrency server thread pool congestion - Google Patents

Intelligent control method for instantaneous high-concurrency server thread pool congestion Download PDF

Info

Publication number
CN113194040A
CN113194040A CN202110466974.9A CN202110466974A CN113194040A CN 113194040 A CN113194040 A CN 113194040A CN 202110466974 A CN202110466974 A CN 202110466974A CN 113194040 A CN113194040 A CN 113194040A
Authority
CN
China
Prior art keywords
thread pool
algorithm
congestion
size
thread
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
CN202110466974.9A
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN202110466974.9A priority Critical patent/CN113194040A/en
Publication of CN113194040A publication Critical patent/CN113194040A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/127Avoiding congestion; Recovering from congestion by using congestion prediction

Abstract

The invention provides an intelligent control method for the congestion of a thread pool of an instantaneous high-concurrency server, which can ensure that the server system with large instantaneous concurrency still can keep shorter response time, clarify the feasibility of the implementation of a congestion control algorithm in the thread pool by analyzing the running mechanism and the implementation principle of the thread pool and the congestion control algorithm, analyze and compare action parameters of the thread pool and the congestion control algorithm, determine the condition for selecting the congestion control algorithm, analyze the congestion control algorithm and select the algorithm meeting the condition, improve the algorithm by combining the selected congestion control algorithm characteristic meeting the application of the thread pool and realize the algorithm in the thread pool, and provide a specific method for applying the action parameters in the congestion self-adaptive control in the thread pool. Has high practical value and wide application prospect.

Description

Intelligent control method for instantaneous high-concurrency server thread pool congestion
Technical Field
The invention relates to an intelligent control method for thread pool congestion, in particular to an intelligent control method for instantaneous high-concurrency server thread pool congestion, and belongs to the technical field of high-concurrency thread pool congestion control.
Background
With the rapid development of network technology, various communication is increasingly frequent, and instantaneous high-concurrency task requests often arrive at a server at the same time. Excessive logic processing and I/O read-write operation bring great challenges to the load processing of the server, and the instantaneous high concurrent processing performance of the server needs to be improved urgently. The server has the characteristics of low response time, high throughput and the like, and adopts multi-thread programming, the multi-thread programming adopts multi-thread concurrent processing, different threads execute different tasks, the concurrency of the tasks and the real-time response capability of the server are effectively improved, and huge expenses caused by frequent scheduling and switching of system resources are reduced.
After a new task arrives, the multi-thread programming can create a new thread, the thread executes a task request, and the task is automatically destroyed after being completed. The thread pool is a multithreading processing form, a certain amount of threads are created in the thread pool at the initial creation stage, an idle thread is allocated to each new request, after the task is completed, the threads are not destroyed and are converted into a waiting state, and the new requests are waited and processed again; if all threads are in busy states, tasks are temporarily stored in the queue and wait, the thread pool technology avoids frequent creation and destruction of the threads, and server performance is improved. However, the thread pool technology in the prior art still has some problems in application, and what is more prominent is that the technology cannot be well applied to a server with instantaneous high concurrency, the capability of adjusting the number of threads according to a request is poor, a user request cannot be responded in time, and even the request is lost.
The current social information volume is explosively increased, a server is required to execute more tasks in the same time period, so that the multi-thread programming is generated, the mode consumes more time and resources when the threads are created and destroyed, in order to more effectively utilize the threads and reduce the expenses in the aspects of creation and destruction, a thread pool technology is provided, the thread pool is a multi-thread processing mode, the tasks are added into a queue when the task requests are processed, and then the tasks are automatically started after the threads are created. The thread pool can better solve the performance problem of the server program, but the thread pool in the prior art also has obvious defects, so the thread pool needs to be optimized.
Dong Kang et al, university and western river university in Korea, predict the resource usage and propose a dynamic thread pool algorithm based on the prediction on the basis, use an exponential averaging scheme to predict, each user records the monitored thread after connecting to the server, and periodically compares the monitored thread with the historical access average value, and updates if the difference is large. Meanwhile, the situation which will appear in the future is predicted according to the historical record numerical value, then the size of the thread pool is dynamically changed, but the algorithm statistics and prediction method consumes more resources, and meanwhile, the algorithm cannot deal with the emergency.
The Beijing traffic university proposes that a priority scheduling algorithm is adopted to optimize the performance of a thread pool, the size of the thread pool is increased according to the request quantity and the average idle time as the size standard, and the average idle time and the request processing time of the thread are adjusted according to the size reduction standard. However, the disadvantage is that it is not possible to respond to concurrent instantaneous requests, and the priority proposed at the same time does not take into account the problems of low priority and long waiting time, and has a limitation in use.
Sun Dongxu proposes an algorithm based on segment adaptation, which can better solve the requirement of thread pool adaptation, but the algorithm is obtained according to a specific research background, and the application scene of the algorithm has certain limitations. BAHADUR provides a strategy thread pool optimization algorithm for optimizing according to frequency, the main strategy is to set two storage queues, namely an in queue and an out queue, to calculate the total rotation time and the waiting time when every two tasks are executed, to judge whether each task can be quickly responded by analyzing time correlation, to judge whether the size of the thread pool can meet the current requirement by the method, and to change the size of the thread pool according to different results.
The prior art still does not well solve the problem of instantaneous high-concurrency server thread pool control, and the difficulties in the prior art and the problems solved by the invention are mainly focused on the following aspects:
first, the thread pool technique of the prior art has some problems in application, wherein the more prominent problems include: firstly, the method cannot be well applied to a server with high instantaneous concurrency, has poor capability of adjusting the number of threads according to the request, cannot respond to the user request in time, and even causes the request to be lost; secondly, the algorithm statistics and prediction method consumes more resources and can not deal with emergencies; thirdly, the concurrent instantaneous requests cannot be responded, and the problems of low priority, long-time waiting and the like are not considered in the proposed priority, so that the use limit is realized; the method is obtained according to a specific research background, and the application scene of the method has certain limitation; fifthly, the access frequency of the user needs to be counted, so that historical data needs to be stored and counted, more resources need to be consumed, and meanwhile, counting also needs to be achieved in a more complex mode;
secondly, a great variety of network applications provide great challenges for network services, a thread pool in the prior art cannot respond to a system with large instantaneous concurrency in time, the response speed is reduced, the response time to a request is increased, the user requirements cannot be met, the adaptability to a server with large instantaneous concurrency is poor, and the response time cannot be guaranteed; the network service is not beneficial to becoming efficient, the response time is low, the throughput is high, and the service resources are saved;
thirdly, the dynamic thread pool in the prior art has certain limitations, when a large number of users access simultaneously at the same time, the thread number is increased untimely, at the moment, the task number is in a waiting state, the task is discarded due to overlong waiting, and finally the similar congestion occurs, and when the server discards the task when the response is not in time, a related function is called to process the task and feed the task back to the congestion condition of the system of the server, a thread pool congestion control method needs to be provided for the system, the rate of a sending end is adaptively adjusted according to the network condition by congestion control, and the sending rate is increased by congestion control when the network condition is good, so that the maximum capacity of a network channel is reached as soon as possible; when network congestion is found according to the feedback information, the congestion control adjusts the sending rate by processing the sending end, and reduces the occurrence condition of the network congestion;
fourthly, although the prior art thread pool dynamic algorithm based on the average number has stability, the predicted thread pool size results are all estimated according to the previous stage, and the prior art has hysteresis and is difficult to avoid generating problems in the application environment facing instantaneous concurrency; the adjustment of the thread pool dynamic adjustment algorithm based on the segmentation is an improvement of the first algorithm and has stability, but the increase amplitude is gentle due to the fact that the last result is adopted as an adjustment base number when prediction is carried out, and the problem of untimely response to the situation of large instantaneous concurrency is also solved; the intelligent algorithm based on the average processing time has the advantages that the processing time of the average task can be directly compared with the previous time according to the calculation average task, fine adjustment can be carried out to meet the required requirement if the requirement is not met in a range, but the adjustment takes too much time and the requirement is difficult to meet due to large time gap when the instantaneous concurrent task is faced.
Disclosure of Invention
Aiming at the defects of the prior art, the invention develops the thread pool technology according to the actual application requirements and improves the thread pool in the prior art. Aiming at the current high real-time response speed requirement on a server system, and simultaneously, due to the adoption of a server store-and-forward mechanism, the requirement of the server on processing a large amount of data is further increased, the thread pool in the prior art is simply used in a high-concurrency server and cannot meet the system requirement, and based on the situation, the invention provides an intelligent control method for the instantaneous high-concurrency server thread pool congestion based on the processing mode of a congestion control algorithm on the network congestion situation, so that the performance of the server is improved, and the application requirement under the instantaneous high concurrency is met.
In order to achieve the technical effects, the technical scheme adopted by the invention is as follows:
an intelligent control method for the congestion of a thread pool of an instantaneous high-concurrency server is used for carrying out improvement and optimization on the intelligent algorithm of the thread pool based on a congestion self-adaptive control algorithm and optimizing the performance of the server under the instantaneous high-concurrency, and mainly comprises the following steps: firstly, analyzing operation action parameters and an operation mechanism of a thread pool, setting action parameters and an algorithm flow of congestion self-adaptive control, comparing the thread pool and a congestion self-adaptive control algorithm based on the operation principle and the characteristics of the thread pool and the operation mechanism, and clarifying the feasibility of the congestion self-adaptive control algorithm in the thread pool intelligent algorithm; secondly, analyzing and comparing action parameters of the thread pool and the congestion control algorithm, constructing a combination model of the congestion self-adaptive control algorithm and the thread pool intelligent algorithm, providing an influence factor for selecting the congestion self-adaptive control algorithm, and selecting and improving the congestion self-adaptive control algorithm suitable for the thread pool intelligent algorithm; thirdly, based on the thread pool design method and design factors of the invention, the intelligent algorithm of the thread pool is analyzed, and in combination with the congestion adaptive control algorithm of the invention, the intelligent algorithm of the thread pool based on the congestion adaptive control is provided, and a specific method for applying action parameters in the congestion adaptive control to the thread pool is provided and is realized in the thread pool, so that the server system with large instantaneous concurrency can still keep shorter response time;
the method for realizing the intelligent control of the thread pool congestion comprises the following steps:
firstly, setting corresponding strategies according to different conditions in the running process of the code, acquiring required parameters when the process starts, namely the number jsck of tasks arriving in a time interval from the last moment to the current moment and the number ysck of completed tasks, judging whether the size of the current thread pool is in an ascending stage, a balancing stage or a descending stage based on the comparison of the two parameters,
secondly, correspondingly adjusting a current thread pool according to strategies of different stages, simultaneously predicting the number of threads required in the next period according to the task increase condition in the period, if the number is in the increase stage, multiplying the thread pool size by one time, adopting a thread pool increase algorithm based on improved slow start, if the number is in the decrease stage, adopting two modes for parallel processing, respectively adopting a thread pool decrease algorithm based on STCP and congestion prevention, respectively obtaining results according to the two algorithms, when the STCP result can meet the number of threads which are larger than the number of the threads which are running, using the STCP result as a reference factor, then obtaining a smaller value between the STCP result and the threads which are running, and reserving a certain number of threads for preventing burst transient requests in order to deal with the condition that the thread pool is increased in the next stage, and if the STCP result is in the balance stage, not making any change;
thirdly, based on the existence of the upper limit value and the lower limit value of the thread pool, the size of the thread pool cannot be increased or decreased infinitely, after the steps are carried out, the current size of the thread pool is compared with the upper limit value and the lower limit value, if the size of the thread pool is in a thread pool size increasing stage, the current size of the thread pool is compared with the upper limit value, the size of the thread pool is prevented from being increased infinitely, and the size of the thread pool is smaller than the size of the thread pool; if the thread pool size is in the descending stage, the thread pool size is compared with a lower limit value to prevent the thread pool size from being infinitely reduced, the thread pool size is larger than the lower limit value, the thread pool can finally reach the required size, the predicted thread pool size is slightly larger than the possible task request number no matter the thread pool size is increased or reduced, the user request can be quickly responded, the effect of reducing the user response time is achieved, a waiting state is entered after the judgment is completed, a sleep mode is set, and the detection adjusting program runs once at intervals.
The intelligent control method for the instantaneous high concurrency server thread pool congestion further comprises the steps of improving the congestion adaptive control algorithm designed by the invention and applying the congestion adaptive control algorithm in the thread pool, and finally optimizing and specifically realizing the congestion adaptive control algorithm in the thread pool, wherein the core of the size adjustment of the thread pool is to minimize the resource occupancy rate of an application server under the condition of meeting the user requirement as much as possible, and the size adjustment of the thread pool follows the following two criteria:
criterion one is as follows: the response time of a user is as short as possible for a single user, and the response time of a user is an average value obtained by a plurality of measurements, i.e., R ═ (R ═ R)1+R2+……+Rn) The R value is as small as possible;
criterion two: the system needs to have higher throughput and as little load as possible when this condition is met;
the intelligent adjustment algorithm of the thread pool is divided into two parts, namely an algorithm for increasing the size of the thread pool and an algorithm for reducing the size of the thread pool, wherein the algorithm for increasing the size of the thread pool is based on improved slow start, and the algorithm for reducing the size of the thread pool is based on STCP and congestion prevention.
An intelligent control method for instantaneous high concurrency server thread pool congestion is further based on an improved slow-start thread pool increasing algorithm: the thread pool has high instantaneous concurrent processing performance, then can in time reduce the thread pool size after the peak period passes, but need consider when carrying out the thread pool and reduce and reserve certain thread number and handle the incident, carry out the optimization of the jam adaptive control mode of thread pool according to above-mentioned relevant main points, its main points include:
the first point is that a certain thread needs to exist when the system is started, and enough threads need to be maintained to run when the system is idle so as to prevent a sudden task, so that an R needs to be setMinThe value is used as the minimum critical value of the algorithm, a pre-estimation method is adopted during design, and a value slightly larger than an actual result is estimated and set by a developer in advance;
the second point is that the influence of redundant threads on system performance after enough threads are created is considered during optimization, the problem of insufficient resources may occur to too many threads, the response time is increased, and the result that two threads compete for resources mutually and deadlock occurs is more likely to occur, so that a sufficiently large R is setMaxThe value is used as the upper limit of the thread pool, the maximum number of the thread pool is limited, and the setting is carried out according to the integral performance of the server and the proportion occupied by the configuration;
at the upper limit RMaxWith a lower limit RMinThe limit of the number of threads in the thread pool between the two is set according to a congestion algorithm.
An intelligent control method for instantaneous high concurrency server thread pool congestion is further based on an improved slow-start thread pool increasing algorithm: the size increase in the thread pool intelligent algorithm is designed and realized by beginning to adopt slow start, and the slow start comprises three parameters: the method comprises the steps of sending a window, a congestion window and a receiving window, wherein the size of the sending window is the size of a sent data packet, the congestion window is the rate of the data packet which can be sent by the whole sending end is adjusted, the size of the sending window is determined by the congestion window, and the size of the receiving window is only used in the initial stage;
the intelligent algorithm of the thread pool firstly adopts a slow start algorithm, sets parameters of a sending window, a congestion window and a receiving window, uses the core thread number corePoolSize in the thread pool to replace according to the action of the sending window, and the congestion window is not directly replaced by the parameters;
when jsck > ysck, the number of the tasks arriving in a time interval is larger than the number of the tasks arriving, the thread pool is in an increasing state, when jsck < ysck, the number of the tasks arriving is larger than the number of the tasks arriving, the thread pool has redundant threads at the moment, the thread pool is in a decreasing state, and the running state of the thread pool is grasped through the comparison of the two parameters;
then, a corresponding value is obtained by comparing the two parameters, which is expressed as jsck > ysck at the slow start stage, so that the thread increase number xczds from the previous moment to the current moment is the difference between the number of arriving tasks and the number of completed tasks, the size of the thread pool at the current moment is the sum of the number of threads currently running, workxczds and the thread increase number, in the slow start algorithm in the congestion adaptive control, the increase amount of the congestion window is changed according to the received confirmation frame, the thread increase state at the next moment needs to be predicted, the core thread number of the thread pool at the current moment becomes the sum of twice the increase number of the thread pool and the number of threads currently running, and the algorithm is as follows 4:
Rntokxczds + (jsck-ysck) 2 formula 4
The maximum thread number R needs to be set when the thread pool intelligent algorithm is carried out by using the slow start algorithmMaxIf the increased number of core threads is less than the maximum number of threads, the value is kept unchanged, and if the increased number of core threads is greater than the maximum number of threads, the number of core threads is taken as the maximum number of threads, and the judgment formula is as follows:
Rn=min{Rn,Rmaxequation 5.
An intelligent control method for instantaneous high concurrency server thread pool congestion, further, a thread pool reduction algorithm based on STCP and congestion prevention: the intelligent thread pool reducing algorithm is realized by adopting a mode of improving and combining a congestion preventing algorithm and an STCP algorithm, the congestion preventing algorithm adopts a new parameter, namely a slow start critical value mqdljz when reducing the size of a congestion window, the mqdljz is half of the congestion window, the sending rate is reduced, a certain idle thread is also required to be reserved when the size of the thread pool is reduced, the phenomenon that the response time of a server is too long due to an emergency is avoided through the thread, the thread pool adopts two parameters to process in parallel to replace the congestion window, which are respectively jsck and ysck, in a thread pool reducing stage, the task completion quantity in unit time is larger than the task request quantity, namely ysck is larger than jsck, in this case, the redundant thread quantity xczds is the absolute value of the difference between the two, a certain thread is reserved, the redundant thread quantity is halved, and therefore, the next thread quantity is predicted to be the sum of the thread quantity in the current operation and half of the redundant thread quantity, the algorithm is as follows:
Figure BDA0003044554600000061
the algorithm for reducing the size of the thread pool by the STCP has a smoother curve, is applied to the intelligent algorithm of the thread pool, is related to a congestion window and is unrelated to other parameters, and is set, and the algorithm formula is as follows:
Figure BDA0003044554600000062
after a predicted value of the size of the thread pool of the STCP algorithm is obtained through the formula 7, whether the predicted value is smaller than the number of working threads which are currently running is judged, when the predicted value is larger than the number of the working threads, the predicted value is directly compared with the result of the congestion prevention algorithm to obtain the minimum value, if the predicted value is smaller than the number of the working threads, the running threads cannot directly stop running, and the size of the thread pool cannot be adjusted to the value, so that the result is discarded, the value is directly defaulted to be infinite, and the predicted value is compared with the congestion prevention algorithm:
Rn=min{R1n,R2nformula 8
Formulas 6 and 7 respectively represent algorithm improvements of a congestion prevention algorithm and an STCP algorithm applied to a thread pool, the two algorithms reduce the size of the thread pool, a better result value between the two is selected as an optimal solution through a formula 8, a certain thread is reserved while the spare thread is reduced as much as possible, and finally the lower limit value of the thread pool is judged, wherein the algorithm is as follows:
Rn=max{Rn,Rminformula 9
When jsck is equal to ysck, the state is in a balanced state, the requested task amount and the completion amount are equal, the size of the thread pool is not changed, and processing is not performed at the moment.
The invention relates to an intelligent control method for instantaneous high-concurrency server thread pool congestion, which mainly considers the following factors according to the design standard of a congestion self-adaptive control model:
criterion one, feasibility in thread pool;
second, instantaneous high concurrency processing performance;
the size of the thread pool is reasonably reduced, the size of the thread pool is increased, meanwhile, the size of the thread pool is reduced according to requirements, and a congestion self-adaptive control algorithm can process instantaneous concurrent data to reasonably reduce the number of idle threads of the thread pool;
the algorithm consumes less time, the thread pool has high requirement on time precision, and the algorithm for adjusting the size of the thread pool consumes as little time as possible;
according to the system requirements and the congestion adaptive control characteristics, when the congestion adaptive control design is carried out, the first standard and the fourth standard are met, and the second standard or the third standard can be met.
An intelligent control method for instantaneous high concurrency server thread pool congestion further comprises the following core of a slow start algorithm: when a sending end sends data, because the network condition is not clear, if a large amount of data is injected into the network immediately, network congestion may be caused, the preferred method is to try out, the sent data amount is gradually increased from small to large, and the implementation process of the slow start algorithm is as follows: firstly, a sending end and a target end establish connection, at the moment, the size of a congestion window is initialized, the size of the congestion window is set to be the size of a data packet, a returned confirmation frame is obtained, the size of a receiving window is obtained, the size of a sending window is determined according to the congestion window and the receiving window, and the relation among the three is shown as formula 1:
fsck ═ min { ysck, jsck } equation 1
fsck represents a sending window, ysck represents a congestion window, jsck represents a receiving window, the size of the sending window is the minimum value of the congestion window and the receiving window, in the later operation process, when a sending end receives a message acknowledgement frame ACK fed back by a receiving end, the congestion window of the sending end increases the packet size of the number of the received ACKs, when network congestion does not occur, the congestion window is increased by one time every other RTT time, the exponential increase is presented, so that TCP flow reaches the maximum value of network capacity as soon as possible, and the bandwidth utilization rate is improved.
The intelligent control method for the instantaneous high concurrency server thread pool congestion further comprises the following steps that the action parameters of a slow start algorithm are a congestion window, a sending window and a receiving window, and the algorithm is analyzed to be applied to the thread pool according to the three parameters and the design standard of a congestion self-adaptive control model: the method has the advantages that feasibility is achieved, timely response to instantaneous concurrent data is achieved, a slow-start algorithm congestion window is exponentially increased, the number of the congestion windows in the initial stage is small, the window size is rapidly increased along with the increase of time, and the maximum capacity of a network is achieved in the shortest time, so that timely response to the data with large instantaneous concurrent amount can be met.
An intelligent control method for instantaneous high concurrency server thread pool congestion, further comprising a congestion prevention algorithm: first, assuming that packet loss is not caused by packet damage, if packet loss indicates that congestion has occurred somewhere in the network transmission process, the data packet loss is confirmed in two ways: if the retransmission timer is overtime or the receiving end continuously receives the repeated confirmation frame, the congestion is indicated when the transmitting end is overtime or continuously receives 3 repeated ACKs, and at the moment, a congestion prevention algorithm is started;
the congestion prevention workflow comprises the following steps: the slow start algorithm enables the congestion window to be multiplied all the time, the process cannot be continued all the time, a slow start critical value mqdljz needs to be set, the congestion window is not doubled when reaching the value, the congestion window is linearly increased instead, once data transmission is overtime, the congestion window is reset to be 1, the slow start algorithm is started again, the congestion prevention algorithm mainly processes the condition that the slow start algorithm is increased too fast, the congestion window is reduced, the increase rate of the slow start window is limited, and the network can be recovered to the normal state.
An intelligent control method for instantaneous high concurrent server thread pool congestion, further, STCP is a protocol based on integral increase and integral decrease strategy, which is divided into two parts, namely increase of congestion window and decrease of congestion window, when receiving ACK acknowledgement frame, congestion window is increased, at this time, the increasing method is shown as formula 2:
ysck + a a 0.01 formula 2
When congestion occurs, the algorithm is shown in formula 3:
ysck-b-ysck b-0.125 formula 3
The STCP algorithm adjusts the increase and decrease of the congestion window by two parameters, the parameters a and b are constants between (0, 1), in the embodiment, a is 0.01, b is 0.125 most suitable, the congestion window is increased by 0.01 when an acknowledgement data frame is received, when the congestion is detected, the congestion window is decreased by one eighth, the STCP algorithm has 70 RTT time for doubling the sending rate no matter what the initial sending rate is, the updating algorithm of the congestion window can be expanded, the STCP algorithm has two action parameters, namely the congestion window and the sending window, and the adjustment of the sending rate is achieved by adjusting the congestion window;
the congestion control algorithm is analyzed, the congestion adaptive control algorithm is designed according to influence factors and design algorithm standards, the algorithm which is feasible and can be applied to the thread pool comprises a slow start algorithm, a congestion prevention algorithm and an STCP algorithm, a congestion window of the slow start algorithm is exponentially increased, so that the instantaneous concurrency capability is met, and the algorithm is applied to the algorithm adjustment for increasing the size of the thread pool, wherein the congestion prevention algorithm and the STCP algorithm are more suitable for being applied to the algorithm stage for reducing the size of the thread pool.
Compared with the prior art, the invention has the following contributions and innovation points:
first, the invention provides an intelligent control method for the thread pool congestion of an instantaneous high-concurrency server, which can keep shorter response time in a server system with large instantaneous concurrency, by analyzing the operation mechanism and the implementation principle of the thread pool and the congestion control algorithm, the feasibility of the implementation of the congestion control algorithm in the thread pool is clarified, the action parameters of the thread pool and the congestion control algorithm are analyzed and compared, the condition for selecting the congestion control algorithm is determined, the congestion control algorithm is analyzed and the algorithm meeting the condition is selected, the algorithm is improved and implemented in the thread pool by combining the selected congestion control algorithm characteristics meeting the application of the thread pool, and the experimental result proves that the method has better adaptability to the server with large instantaneous concurrency, can ensure shorter response time, has strong expandability, and has high practical value and wide application prospect;
secondly, the method takes the response time as a first target, the size change of the thread pool is set to be slightly larger than the number of task requests of the current user as much as possible under the target, and the waiting time of the user is reduced; from the aspect of resource occupation, as the number of users increases, although the resource occupation conditions of the two are basically equal, the occupation of the congestion self-adaptive control thread pool is less than that of the average pool thread pool. The method is combined with two performance indexes for evaluation, the response time of the congestion self-adaptive control thread pool algorithm is obviously improved, the resource occupation condition can be basically kept level, and the performance of the congestion self-adaptive control thread pool algorithm basically reaches the standard;
thirdly, the invention improves and optimizes the thread pool intelligent algorithm based on the congestion self-adaptive control algorithm, optimizes the performance of the server under instantaneous high concurrency, analyzes the operation action parameters and the operation mechanism of the thread pool, sets the action parameters and the algorithm flow of the congestion self-adaptive control, constructs a combination model of the congestion self-adaptive control algorithm and the thread pool intelligent algorithm based on the operation principles and the characteristics of the two, provides an influence factor for selecting the congestion self-adaptive control algorithm, and selects and improves the congestion self-adaptive control algorithm suitable for the thread pool intelligent algorithm; providing a specific method for applying action parameters in the congestion adaptive control to a thread pool, and providing a flow step of the instantaneous high-concurrency server thread pool congestion intelligent control; the method is applied to the actual verification, and the result proves that the method has the advantages of correctness and high efficiency, improves the performance of the server and meets the application requirement under instantaneous high concurrency;
fourthly, the method can be well applied to the instantaneous high-concurrency server, has stronger capacity of adjusting the thread number according to the request, can respond to the user request in time and avoids the loss of the request; the algorithm statistics and prediction method consumes less resources and can deal with emergencies; the method can respond to the concurrent instantaneous requests, has no use limitation, and has no limitation in application scene; the method has the advantages of no need of counting the access frequency of the user, no need of storing historical data, less resource consumption, simpler implementation mode, high efficiency, low response time, high throughput and service resource saving of network service.
Drawings
Fig. 1 is a schematic diagram of a congestion curve of the slow start algorithm of the present invention.
Fig. 2 is a schematic workflow diagram of the congestion prevention algorithm of the present invention.
FIG. 3 is a flow chart of the thread pool increasing algorithm based on the improved slow start of the present invention.
FIG. 4 is a flow chart of the STCP and congestion prevention based thread pool reduction algorithm of the present invention.
Fig. 5 is a flow chart of an intelligent control method for the instantaneous high concurrency server thread pool congestion.
Detailed Description
The technical solution of the intelligent control method for instantaneous high-concurrency server thread pool congestion provided by the present invention is further described below with reference to the accompanying drawings, so that those skilled in the art can better understand the present invention and can implement the present invention.
With the rapid development of the information industry, a variety of network applications appear, and great challenges are provided for network services. How to make network services efficient, low response time, high throughput, and save service resources becomes key, and thread pools provide a solution to this problem. The thread pool is a multithreading processing mode, and does not need to frequently create a destroy thread, so that the response speed of the system is improved, and the resource consumption is reduced.
The invention provides an intelligent control method for the congestion of a thread pool of an instantaneous high-concurrency server, aiming at ensuring that the short response time can still be kept in a server system with large instantaneous concurrency, the feasibility of the implementation of a congestion control algorithm in the thread pool is clarified through the operation mechanism and the implementation principle of an analysis thread pool and a congestion control algorithm, the action parameters of the analysis thread pool and the congestion control algorithm are compared, the condition of selecting the congestion control algorithm is determined, the congestion control algorithm is analyzed and the algorithm meeting the condition is selected, the algorithm is improved and implemented in the thread pool by combining the selected congestion control algorithm characteristic meeting the application of the thread pool, and the experimental result proves that the method has good adaptability to the server with large instantaneous concurrency and can ensure the short response time.
First, the reason why congestion control is applied to the thread pool
The thread pool is divided into a fixed thread pool and a dynamic thread pool, the dynamic thread pool is adopted for improving the response speed of the server and reducing the response time of a task request, the dynamic thread pool in the prior art has certain limitation, when a large number of users access simultaneously at the same time, the thread number is increased untimely, the task number is in a waiting state at the moment, the task is discarded due to overlong waiting, and finally the similar congestion is caused, when the server responds untimely and discards the task, a related function is called to process the task and the congestion condition of the system is fed back to the server, a thread pool congestion control method needs to be provided for the system, the congestion control adaptively adjusts the speed of a sending end according to the network condition, when the network condition is good, the congestion control increases the sending speed and reaches the maximum capacity of a network channel as soon as possible; when network congestion is found according to the feedback information, the congestion control adjusts the sending rate by processing the sending end, and reduces the occurrence condition of the network congestion.
Compared with the similar characteristics of a thread pool and congestion control, the invention provides a method for improving a congestion control algorithm and applying the congestion control algorithm to a thread pool self-adaptive algorithm, and the method mainly has the following similar characteristics based on the thread pool and the congestion control algorithm:
firstly, the method has a dynamic adjustment characteristic, the realization of a dynamic thread pool is based on the current user request quantity, an intelligent scheduling mechanism is combined with a thread pool algorithm, the size of the thread pool is adjusted between a specified upper critical value and a specified lower critical value based on task properties and user request waiting time factors, the response time of the thread pool is reduced, the initial purpose of congestion control is to reduce data packet loss in the network transmission process and prevent congestion collapse caused by unlimited packet sending, the congestion control uses a congestion control algorithm to intelligently adjust the packet sending frequency by receiving feedback confirmation packet information, the network is idle and increases the packet sending rate, the network is busy and reduces the packet sending quantity, the situation of the network packet loss collapse rate is finally avoided, and the size is automatically adjusted according to the corresponding scene conditions to achieve the required purpose.
Secondly, the method has similar performance trends, the throughput load trend of congestion control presents a parabola, two inflection points are arranged on the parabola and respectively represent a knee point and a cliff point, the two points are used as dividing lines to divide a trend graph into three parts, the first part is a congestion prevention stage, the throughput is also increased along with the increase of load quantity, the throughput and the cliff point are increased in a linear proportion at the moment, the increase amplitude of the throughput is gradually reduced along with the increase of the load after the load reaches a certain stage, namely the load exceeds the knee point, the throughput reaches the top point when the load reaches the cliff point, the interval between the knee point and the cliff point is a congestion recovery interval, the throughput is rapidly reduced along with the increase of the load after the load exceeds the cliff point, the congestion collapse occurs, the interval behind the cliff point is a congestion collapse interval, a system thread pool also forms a parabola along with the increase of the number of working threads, and the system performance is improved along with the increase of the number of the working threads at the initial stage, when a certain limit value is exceeded, the system performance begins to gradually decrease as the number of working threads increases.
By comparing and analyzing the running characteristics and the load graph of the thread pool and the congestion control algorithm, the congestion control has sensitive response speed when processing the load, can quickly adjust the strategy according to the corresponding conditions and timely respond to the system requirements, and the running trends of the thread pool and the congestion control algorithm are similar, so the congestion control algorithm is applied to the thread pool after being improved.
Secondly, designing a congestion adaptive control model of a thread pool
Design standard of adaptive control model of congestion
The design criteria of the adaptive congestion control model mainly consider the following factors:
criterion one, feasibility in thread pool;
second, instantaneous high concurrency processing performance;
the size of the thread pool is reasonably reduced, the size of the thread pool is increased, meanwhile, the size of the thread pool is reduced according to requirements, and a congestion self-adaptive control algorithm can process instantaneous concurrent data to reasonably reduce the number of idle threads of the thread pool;
the algorithm consumes less time, the thread pool has high requirement on time precision, and the algorithm for adjusting the size of the thread pool consumes as little time as possible;
according to the system requirements and the congestion adaptive control characteristics, when the congestion adaptive control design is carried out, the first standard and the fourth standard are met, and the second standard or the third standard can be met.
Congestion adaptive control algorithm analysis design
The invention determines the adaptive control algorithm of the thread pool congestion by combining the design standard of the adaptive control model of the congestion.
1. Slow start algorithm
The core of the slow start algorithm is as follows: when the sending end sends data, because the network condition is not clear, if a large amount of data is injected into the network immediately, network congestion may be caused, and a better method is to probe to gradually increase the sent data amount from small to large. The slow start algorithm is realized by the following steps: firstly, a sending end and a target end establish connection, at the moment, the size of a congestion window is initialized, the size of the congestion window is set to be the size of a data packet, a returned confirmation frame is obtained, the size of a receiving window is obtained, the size of a sending window is determined according to the congestion window and the receiving window, and the relation among the three is shown as formula 1:
fsck ═ min { ysck, jsck } equation 1
fsck represents a sending window, ysck represents a congestion window, jsck represents a receiving window, the size of the sending window is the minimum value of the congestion window and the receiving window, in the later operation process, when a sending end receives a message acknowledgement frame ACK fed back by a receiving end, the congestion window of the sending end increases the packet size of the number of the received ACKs, when network congestion does not occur, the congestion window is increased by one time every other RTT time, the exponential increase is presented, so that TCP flow reaches the maximum value of network capacity as soon as possible, and the bandwidth utilization rate is improved.
The action parameters of the slow start algorithm are a congestion window, a sending window and a receiving window, and the algorithm is analyzed to be applied in a thread pool according to the three parameters and the design standard of a congestion self-adaptive control model: the method has the advantages that feasibility is achieved firstly, then timely response is conducted on instantaneous concurrent data, as shown in the figure 1, a slow-start algorithm congestion window is increased exponentially, the number of the congestion windows in the initial stage is small, the window size is rapidly increased along with the increase of time, and the maximum capacity of a network is reached in the shortest time, so that the timely response to the data with large instantaneous concurrent quantity can be met.
2. Congestion prevention algorithm
First, assuming that packet loss is not caused by packet damage, if packet loss indicates that congestion has occurred somewhere in the network transmission process, the data packet loss is confirmed in two ways: if the retransmission timer is overtime or the receiving end continuously receives the repeated confirmation frame, the congestion is indicated when the transmitting end is overtime or continuously receives 3 repeated ACKs, and at the moment, the congestion prevention algorithm is started.
The congestion prevention workflow is shown in fig. 2: the slow start algorithm multiplies the congestion window all the time, the process cannot be continued all the time, a slow start critical value mqdljz needs to be set, the congestion window is not doubled when reaching the value, the value is linearly increased instead, once the data transmission is overtime, the congestion window is reset to 1, and the slow start algorithm is started again. The congestion prevention algorithm mainly processes the condition that the slow start algorithm is increased too fast, reduces a congestion window and limits the increasing rate of the slow start window, so that the network can be recovered to a normal state.
The action parameters of the congestion prevention algorithm are a congestion window, a slow start critical value and a sending window, and the algorithm is analyzed to be applied in the thread pool according to the three parameters and the algorithm selection standard: the congestion prevention algorithm firstly slows down the increase rate of the congestion window value, and has feasibility, the congestion prevention algorithm adopts the algorithm characteristics of addition increase and multiplication reduction, when the congestion window is increased, a mode of increasing 1/ysck every time a confirmation frame window is received is adopted, so that the timely response of instantaneous concurrent data of a thread pool cannot be met, in the process of multiplication reduction of the algorithm, the congestion prevention can quickly change the window size, so that the standard of reasonable reduction of the idle thread number of the thread pool is met, the consumed time of the algorithm is considered under the condition of meeting the third standard, the processing is more convenient, the consumed time of the algorithm is less, the fourth standard is met, and in conclusion, the algorithm meets the first, the third and the fourth standards and can be applied to the thread pool algorithm.
3. STCP Algorithm
The STCP is a protocol based on a multiplicative increase and multiplicative decrease strategy, and is divided into two parts, namely an increase of a congestion window and a decrease of the congestion window, wherein when an ACK acknowledgement frame is received, the congestion window is increased, and at this time, the increasing method is as shown in formula 2:
ysck + a a 0.01 formula 2
When congestion occurs, the algorithm is shown in formula 3:
ysck-b-ysck b-0.125 formula 3
The STCP algorithm adjusts the increase and decrease of the congestion window by two parameters, the parameters a and b are constants between (0, 1), in the embodiment, a is 0.01, b is 0.125 most suitable, the congestion window is increased by 0.01 when an acknowledgement data frame is received, when the congestion is detected, the congestion window is decreased by one eighth, the STCP algorithm has 70 RTT time for doubling the sending rate no matter what the initial sending rate is, the updating algorithm of the congestion window can be expanded, the STCP algorithm has two action parameters, namely the congestion window and the sending window, and the adjustment of the sending rate is achieved by adjusting the congestion window.
Analyzing the algorithm application in the thread pool according to the parameters and the algorithm design standard: firstly, the STCP algorithm only needs to change the size of a congestion window, the changed parameters are set well, the STCP algorithm can be directly applied and has feasibility, the STCP algorithm adopts a linear increasing method when the window is increased, the STCP algorithm cannot respond to a thread pool with large instantaneous concurrency in time and does not meet the design standard two, meanwhile, the window reduction of the STCP algorithm is data for reducing the size of one eighth of the current window, the design standard three of the thread pool is met, the algorithm only needs to perform addition, subtraction, multiplication and division operation, the running time is small, the STCP algorithm accords with the design standard four, and in sum, the STCP algorithm meets the design standards one, three and four and can be applied to the thread pool algorithm.
The congestion control algorithm is analyzed, the congestion adaptive control algorithm is designed according to influence factors and design algorithm standards, the algorithm which is feasible and can be applied to the thread pool comprises a slow start algorithm, a congestion prevention algorithm and an STCP algorithm, a congestion window of the slow start algorithm is exponentially increased, so that the instantaneous concurrency capability is met, and the algorithm is applied to the algorithm adjustment for increasing the size of the thread pool, wherein the congestion prevention algorithm and the STCP algorithm are more suitable for being applied to the algorithm stage for reducing the size of the thread pool.
Thread pool intelligent algorithm optimization
Intelligent control rule for congestion of thread pool
The intelligent control rule for the thread pool congestion comprises an intelligent adjustment method for the thread pool congestion, intelligent regulation and control factors for the thread pool congestion and a thread pool performance evaluation system.
1. Intelligent adjustment method for thread pool congestion
The intelligent adjustment of the thread pool congestion is to dynamically change the size of the intelligent adjustment, and a method for dynamically adjusting the thread number of the thread pool is adopted.
2. Intelligent regulation and control factor for thread pool congestion
The adjustment of the thread pool size avoids two extremes: the number of threads is too small or too many, the number of threads in the thread pool is too small, the thread pool cannot respond to the requests of all users in time, even the user requests are rejected, the number of threads in the thread pool is too large, excessive system resources are consumed, great burden is brought to a server, and the adjustment of the size of the thread pool comprises the following aspects: firstly, initializing the thread number of a thread pool; secondly, the proper thread number in the program operation; third, the maximum number of threads in the thread pool.
When the thread pool is initialized, a certain thread number is specified, the thread number is the lower limit of the thread pool, the user request amount under the ordinary condition needs to be met, and the value is determined by a measuring method.
The maximum thread number of the thread pool is obtained according to the bearing capacity and configuration evaluation of developers on the whole system, the thread number in the thread pool is limited according to the value, and the problem that the performance of the system is reduced due to the fact that too many threads are created is avoided.
3. Thread pool performance evaluation system
The thread pool performance evaluation system comprises: the response time is the time interval from the time when the user sends the request to the server to the time when the result returned from the server is received, and the length of the response time is directly related to the user experience; second, throughput is the number of user requests processed by the server in a unit time; thirdly, resource utilization rate: is the consumption situation of the system to the resources in the running process.
Performance resolution of thread pool intelligence algorithms
The thread pool algorithm is mainly used for a dynamic thread pool, the dynamic thread pool sets a critical value with an upper limit and a lower limit for the number of threads, and the function of the thread pool is to keep the number of threads within a certain range, so that the reduction of the utilization rate of system resources caused by excessive or insufficient number of threads and the like is avoided, and the response time of the system is influenced. The number of threads between the upper limit and the lower limit needs to be adjusted according to a thread pool algorithm, the number of thread pools is automatically adjusted by a better thread pool algorithm according to the current task amount and other related factors, and meanwhile, the factors such as system response time, system resource utilization rate and the like are considered.
Although the average-based thread pool dynamic algorithm has stability, the predicted thread pool size result is predicted according to the previous stage, and the hysteresis is difficult to avoid generating problems in the face of instantaneous concurrent application environments; the adjustment of the thread pool dynamic adjustment algorithm based on the segmented intelligence is an improvement of the first algorithm and has stability, but the last result is adopted as an adjustment base number when the prediction is carried out, so that the increase amplitude is smooth, and the problem of untimely response to the condition of large instantaneous concurrency is also solved; the intelligent algorithm based on the average processing time has the advantages that the processing time of the average task can be directly compared with the previous time according to the calculation average task, fine adjustment can be carried out to meet the required requirement if the requirement is not met in a range, therefore, the adjustment of the thread pool size is more accurate under the general condition, but if the instantaneous concurrent task is faced, the adjustment takes too much time due to large time gap, and the requirement is difficult to meet.
(III) thread pool optimization of congestion adaptive control algorithm
The optimization of the thread pool of the congestion adaptive control algorithm is to improve the congestion adaptive control algorithm designed by the invention, apply the congestion adaptive control algorithm in the thread pool, optimize and realize the optimization in the thread pool, and the core of the adjustment of the size of the thread pool is to minimize the resource occupancy rate of an application server under the condition of meeting the user requirement as much as possible, and the size adjustment of the thread pool follows the following two criteria:
criterion one is as follows: the response time of a user is as short as possible for a single user, and the response time of a user is an average value obtained by a plurality of measurements, i.e., R ═ (R ═ R)1+R2+……+Rn) The R value is as small as possible;
criterion two: the system needs to have a higher throughput and a load as small as possible when this condition is met.
The intelligent adjustment algorithm of the thread pool is divided into two parts, namely the increase of the size of the thread pool and the reduction of the size of the thread pool, the increase of the size of the thread pool mainly depends on a slow start algorithm, and the reduction of the size of the thread pool is improved by adopting a congestion prevention algorithm and an STCP algorithm.
1. Thread pool increasing algorithm based on improved slow start
The thread pool has high instantaneous concurrent processing performance, then can in time reduce the thread pool size after the peak period passes, but need consider when carrying out the thread pool and reduce and reserve certain thread number and handle the incident, carry out the optimization of the jam adaptive control mode of thread pool according to above-mentioned relevant main points, its main points include:
the first point is that a certain thread needs to exist when the system is started, and enough threads need to be maintained to run when the system is idle so as to prevent a sudden task, so that an R needs to be setMinThe value is used as the minimum critical value of the algorithm, a pre-estimation method is adopted during design, and a value slightly larger than an actual result is estimated and set by a developer in advance;
the second point is that the influence of redundant threads on system performance after enough threads are created is considered in optimization, the problem of insufficient resources can occur to excessive threads, and the response is increasedIn addition, the result that two threads mutually compete for resources and deadlock occurs is more likely to occur, so that a sufficiently large R is setMaxThe value is used as the upper limit of the thread pool, the maximum number of the thread pool is limited, and the setting is carried out according to the integral performance of the server and the proportion occupied by the configuration;
at the upper limit RMaxWith a lower limit RMinThe limit of the number of threads in the thread pool between the two is set according to a congestion algorithm.
The size increase in the thread pool intelligent algorithm is designed and realized by beginning to adopt slow start, and the slow start comprises three parameters: the size of the sending window is the size of a sent data packet, the congestion window is the rate of the data packet which can be sent by the whole sending end is adjusted, the size of the sending window is determined by the congestion window, and the size of the receiving window is only used in the initial stage and does not play a role in determination.
The intelligent algorithm of the thread pool firstly adopts a slow start algorithm, sets parameters of a sending window, a congestion window and a receiving window, uses the core thread number corePoolSize in the thread pool to replace according to the action of the sending window, the congestion window is not directly replaced by the parameters.
When jsck > ysck, the number of the tasks arriving in a time interval is larger than the number of the tasks arriving, the thread pool is in an increasing state, when jsck < ysck, the number of the tasks arriving is larger than the number of the tasks arriving, the thread pool has redundant threads at the moment, the thread pool is in a decreasing state, and the running state of the thread pool is grasped through the comparison of the two parameters.
Then, a corresponding value is obtained by comparing the two parameters, which is expressed as jsck > ysck at the slow start stage, so that the thread increase number xczds from the previous moment to the current moment is the difference between the number of arriving tasks and the number of completed tasks, the size of the thread pool at the current moment is the sum of the number of threads currently running, workxczds and the thread increase number, in the slow start algorithm in the congestion adaptive control, the increase amount of the congestion window is changed according to the received confirmation frame, the thread increase state at the next moment needs to be predicted, the core thread number of the thread pool at the current moment becomes the sum of twice the increase number of the thread pool and the number of threads currently running, and the algorithm is as follows 4:
Rntokxczds + (jsck-ysck) 2 formula 4
The maximum thread number R needs to be set when the thread pool intelligent algorithm is carried out by using the slow start algorithmMaxIf the increased number of core threads is less than the maximum number of threads, the value is kept unchanged, and if the increased number of core threads is greater than the maximum number of threads, the number of core threads is taken as the maximum number of threads, and the judgment formula is as follows:
Rn=min{Rn,Rmaxformula 5
A flow chart of the thread pool size increase algorithm is shown in fig. 3.
2. Thread pool reduction algorithm based on STCP and congestion prevention
The intelligent increasing algorithm of the thread pool is realized by adopting a thread pool increasing algorithm based on improved slow start, the intelligent reducing algorithm of the thread pool is realized by adopting a mode of improving and combining a congestion prevention algorithm and an STCP algorithm, the congestion prevention algorithm adopts a new parameter, namely a slow start critical value mqdljz which is half of a congestion window when the size of the congestion window is reduced, the sending rate is reduced, a certain idle thread is also required to be reserved when the size of the thread pool is reduced, the excessive response time of a server caused by an emergency is avoided through the thread, the thread pool adopts two parameters to process in parallel to replace the congestion window which is respectively jsck and ysck, the task completion quantity in unit time is larger than the task request quantity in a thread pool reducing stage, namely ysck is larger than jsck, the redundant thread quantity xczds in the condition is an absolute value of the difference between the two, a certain thread is reserved, and the redundant thread quantity is reduced by half, therefore, the next thread number is predicted to be the sum of the thread number in the current operation and half of the redundant thread number, and the arithmetic formula is as follows:
Figure BDA0003044554600000161
the STCP algorithm for increasing the size of the thread pool has certain limitation and cannot meet the requirement, the algorithm for reducing the size of the thread pool has a smoother curve, and the STCP algorithm is applied to the intelligent algorithm of the thread pool, is related to a congestion window and is unrelated to other parameters, and is set, and the algorithm formula is as follows:
Figure BDA0003044554600000162
after a predicted value of the size of the thread pool of the STCP algorithm is obtained through the formula 7, whether the predicted value is smaller than the number of working threads which are currently running is judged, when the predicted value is larger than the number of the working threads, the predicted value is directly compared with the result of the congestion prevention algorithm to obtain the minimum value, if the predicted value is smaller than the number of the working threads, the running threads cannot directly stop running, and the size of the thread pool cannot be adjusted to the value, so that the result is discarded, the value is directly defaulted to be infinite, and the predicted value is compared with the congestion prevention algorithm:
Rn=min{R1n,R2nformula 8
Formulas 6 and 7 respectively represent algorithm improvements of a congestion prevention algorithm and an STCP algorithm applied to a thread pool, the two algorithms reduce the size of the thread pool, a better result value between the two is selected as an optimal solution through a formula 8, a certain thread is reserved while the spare thread is reduced as much as possible, and finally the lower limit value of the thread pool is judged, wherein the algorithm is as follows:
Rn=max{Rn,Rminformula 9
The flow chart of the reduction of the thread pool is shown in FIG. 4.
When jsck is equal to ysck, the state is in a balanced state, the requested task amount and the completion amount are equal, the size of the thread pool is not changed, and processing is not performed at the moment.
3. Implementation of intelligent control of thread pool congestion
The intelligent control of the thread pool congestion is realized by setting corresponding strategies according to different conditions in the running process of a code, and realizing the intelligent control method of the instantaneous high-concurrency server thread pool congestion, wherein the flow is shown in figure 5, required parameters, namely the number jsck of tasks arriving in a time interval from the last moment to the current moment and the number ysck of completed tasks are obtained at the beginning of the flow, whether the size of the current thread pool is in an ascending stage, a balancing stage or a descending stage is judged based on the comparison of the two parameters, then the current thread pool is correspondingly adjusted according to the strategies in different stages, the number of threads required in the next period is predicted according to the task increasing condition in the period, if the number is in the increasing stage, the thread pool size is exponentially increased by one time, a thread pool increasing algorithm based on improved slow start is adopted, if the number is in the decreasing stage, two modes are adopted for parallel processing, respectively adopting a thread pool reduction algorithm based on STCP and congestion prevention, respectively calculating results according to the two algorithms, taking the STCP result as a reference factor when the STCP result can meet the condition that the number of threads is larger than the number of the threads in operation, then calculating a smaller value between the STCP result and the reference factor, reserving a certain number of threads to prevent burst transient requests in order to deal with the condition that the thread pool is increased in the next stage, and if the STCP result is in the balance stage, not making any change.
Based on the existence of the upper limit value and the lower limit value of the thread pool, the size of the thread pool cannot be infinitely increased or decreased, after the steps are carried out, the current size of the thread pool is compared with the upper limit value and the lower limit value, if the size of the thread pool is in an ascending stage, the current size of the thread pool is compared with the upper limit value, the size of the thread pool is prevented from being infinitely increased, and the size of the thread pool is smaller than the size of the thread pool; if the thread pool size is in the descending stage, the thread pool size is compared with a lower limit value to prevent the thread pool size from being infinitely reduced, the thread pool size is larger than the lower limit value, the thread pool can finally reach the required size, the predicted thread pool size is slightly larger than the possible task request number no matter the thread pool size is increased or reduced, the user request can be quickly responded, the effect of reducing the user response time is achieved, a waiting state is entered after the judgment is completed, a sleep mode is set, and the detection adjusting program runs once at intervals.
Fourth, experimental test and performance evaluation
The experimental test is carried out by taking a water conservancy disaster early warning project as a background, so that the requirement on average response time is higher, the concurrent requests of 15 to 160 users are tested by the experimental test, and the concurrent requests are compared with a thread pool algorithm based on an average number in the prior art, so that the improvement of the average response time performance is more obvious along with the increase of the number of users.
From the aspect of resource occupation, as the number of users increases, although the resource occupation conditions of the two are basically equal, the occupation of the congestion self-adaptive control thread pool is less than that of the average pool thread pool.
The method has higher application value in an actual water conservancy disaster early warning system, can better solve the problem of the congestion of the instantaneous high-concurrency server thread pool, and achieves the expected target.
The invention improves and optimizes the thread pool intelligent algorithm based on the congestion self-adaptive control algorithm, optimizes the performance of the server under the instantaneous high concurrency, and mainly comprises the following points: firstly, analyzing operation action parameters and an operation mechanism of a thread pool, setting action parameters and an algorithm flow of congestion self-adaptive control, comparing the thread pool and a congestion self-adaptive control algorithm based on the operation principle and the characteristics of the thread pool and the congestion self-adaptive control algorithm, determining the feasibility of the congestion self-adaptive control algorithm in the thread pool intelligent algorithm, constructing a combination model of the congestion self-adaptive control algorithm and the thread pool intelligent algorithm, providing an influence factor for selecting the congestion self-adaptive control algorithm, and selecting and improving the congestion self-adaptive control algorithm suitable for the thread pool intelligent algorithm; secondly, analyzing a thread pool intelligent algorithm based on the thread pool design method and design factors of the invention, providing a thread pool intelligent algorithm based on congestion self-adaptive control by combining the congestion self-adaptive control algorithm of the invention, providing a specific method for applying action parameters in the congestion self-adaptive control to the thread pool, and providing a flow step of the instantaneous high-concurrency server thread pool congestion intelligent control; thirdly, the algorithm of the invention is verified in practice, and the result proves the correctness and high efficiency of the method provided by the invention, the performance of the server is improved, and the application requirement under instantaneous high concurrency is met.

Claims (10)

1. The intelligent control method for the thread pool congestion of the instantaneous high-concurrency server is characterized in that the intelligent algorithm of the thread pool is improved and optimized based on a congestion self-adaptive control algorithm, and the performance of the optimized server under the instantaneous high-concurrency condition mainly comprises the following steps: firstly, analyzing operation action parameters and an operation mechanism of a thread pool, setting action parameters and an algorithm flow of congestion self-adaptive control, comparing the thread pool and a congestion self-adaptive control algorithm based on the operation principle and the characteristics of the thread pool and the operation mechanism, and clarifying the feasibility of the congestion self-adaptive control algorithm in the thread pool intelligent algorithm; secondly, analyzing and comparing action parameters of the thread pool and the congestion control algorithm, constructing a combination model of the congestion self-adaptive control algorithm and the thread pool intelligent algorithm, providing an influence factor for selecting the congestion self-adaptive control algorithm, and selecting and improving the congestion self-adaptive control algorithm suitable for the thread pool intelligent algorithm; thirdly, based on the thread pool design method and design factors of the invention, the intelligent algorithm of the thread pool is analyzed, and in combination with the congestion adaptive control algorithm of the invention, the intelligent algorithm of the thread pool based on the congestion adaptive control is provided, and a specific method for applying action parameters in the congestion adaptive control to the thread pool is provided and is realized in the thread pool, so that the server system with large instantaneous concurrency can still keep shorter response time;
the method for realizing the intelligent control of the thread pool congestion comprises the following steps:
firstly, setting corresponding strategies according to different conditions in the running process of the code, acquiring required parameters when the process starts, namely the number jsck of tasks arriving in a time interval from the last moment to the current moment and the number ysck of completed tasks, judging whether the size of the current thread pool is in an ascending stage, a balancing stage or a descending stage based on the comparison of the two parameters,
secondly, correspondingly adjusting a current thread pool according to strategies of different stages, simultaneously predicting the number of threads required in the next period according to the task increase condition in the period, if the number is in the increase stage, multiplying the thread pool size by one time, adopting a thread pool increase algorithm based on improved slow start, if the number is in the decrease stage, adopting two modes for parallel processing, respectively adopting a thread pool decrease algorithm based on STCP and congestion prevention, respectively obtaining results according to the two algorithms, when the STCP result can meet the number of threads which are larger than the number of the threads which are running, using the STCP result as a reference factor, then obtaining a smaller value between the STCP result and the threads which are running, and reserving a certain number of threads for preventing burst transient requests in order to deal with the condition that the thread pool is increased in the next stage, and if the STCP result is in the balance stage, not making any change;
thirdly, based on the existence of the upper limit value and the lower limit value of the thread pool, the size of the thread pool cannot be increased or decreased infinitely, after the steps are carried out, the current size of the thread pool is compared with the upper limit value and the lower limit value, if the size of the thread pool is in a thread pool size increasing stage, the current size of the thread pool is compared with the upper limit value, the size of the thread pool is prevented from being increased infinitely, and the size of the thread pool is smaller than the size of the thread pool; if the thread pool size is in the descending stage, the thread pool size is compared with a lower limit value to prevent the thread pool size from being infinitely reduced, the thread pool size is larger than the lower limit value, the thread pool can finally reach the required size, the predicted thread pool size is slightly larger than the possible task request number no matter the thread pool size is increased or reduced, the user request can be quickly responded, the effect of reducing the user response time is achieved, a waiting state is entered after the judgment is completed, a sleep mode is set, and the detection adjusting program runs once at intervals.
2. The intelligent control method for the instantaneous congestion of the thread pool of the high-concurrency server according to claim 1, wherein the optimization of the thread pool of the congestion adaptive control algorithm is to improve the congestion adaptive control algorithm designed by the invention and apply the congestion adaptive control algorithm in the thread pool, and finally optimize and specifically realize the optimization in the thread pool, the core of the adjustment of the size of the thread pool is to reduce the resource occupancy rate of an application server as little as possible under the condition of meeting the user requirement as much as possible, and the size adjustment of the thread pool follows the following two criteria:
criterion one is as follows: the response time of a user is as short as possible for a single user, and the response time of a user is an average value obtained by a plurality of measurements, i.e., R ═ (R ═ R)1+R2+……+Rn) The R value is as small as possible;
criterion two: the system needs to have higher throughput and as little load as possible when this condition is met;
the intelligent adjustment algorithm of the thread pool is divided into two parts, namely an algorithm for increasing the size of the thread pool and an algorithm for reducing the size of the thread pool, wherein the algorithm for increasing the size of the thread pool is based on improved slow start, and the algorithm for reducing the size of the thread pool is based on STCP and congestion prevention.
3. The intelligent control method for transient high concurrency server thread pool congestion recited in claim 1, wherein based on an improved slow start thread pool increase algorithm: the thread pool has high instantaneous concurrent processing performance, then can in time reduce the thread pool size after the peak period passes, but need consider when carrying out the thread pool and reduce and reserve certain thread number and handle the incident, carry out the optimization of the jam adaptive control mode of thread pool according to above-mentioned relevant main points, its main points include:
the first point is that a certain thread needs to exist when the system is started, and enough threads need to be maintained to run when the system is idle so as to prevent a sudden task, so that an R needs to be setMinThe value is used as the minimum critical value of the algorithm, a pre-estimation method is adopted during design, and a value slightly larger than an actual result is estimated and set by a developer in advance;
the second point is that the influence of redundant threads on system performance after enough threads are created is considered in optimization, and resources can appear in excessive threadsInsufficient problem, increased response time and more possibility of deadlock caused by mutual contention of two threads for resources, so that a sufficiently large R is setMaxThe value is used as the upper limit of the thread pool, the maximum number of the thread pool is limited, and the setting is carried out according to the integral performance of the server and the proportion occupied by the configuration;
at the upper limit RMaxWith a lower limit RMinThe limit of the number of threads in the thread pool between the two is set according to a congestion algorithm.
4. The intelligent control method for transient high concurrency server thread pool congestion according to claim 3, wherein based on the improved slow start thread pool increasing algorithm: the size increase in the thread pool intelligent algorithm is designed and realized by beginning to adopt slow start, and the slow start comprises three parameters: the method comprises the steps of sending a window, a congestion window and a receiving window, wherein the size of the sending window is the size of a sent data packet, the congestion window is the rate of the data packet which can be sent by the whole sending end is adjusted, the size of the sending window is determined by the congestion window, and the size of the receiving window is only used in the initial stage;
the intelligent algorithm of the thread pool firstly adopts a slow start algorithm, sets parameters of a sending window, a congestion window and a receiving window, uses the core thread number corePoolSize in the thread pool to replace according to the action of the sending window, and the congestion window is not directly replaced by the parameters;
when jsck > ysck, the number of the tasks arriving in a time interval is larger than the number of the tasks arriving, the thread pool is in an increasing state, when jsck < ysck, the number of the tasks arriving is larger than the number of the tasks arriving, the thread pool has redundant threads at the moment, the thread pool is in a decreasing state, and the running state of the thread pool is grasped through the comparison of the two parameters;
then, a corresponding value is obtained by comparing the two parameters, which is expressed as jsck > ysck at the slow start stage, so that the thread increase number xczds from the previous moment to the current moment is the difference between the number of arriving tasks and the number of completed tasks, the size of the thread pool at the current moment is the sum of the number of threads currently running, workxczds and the thread increase number, in the slow start algorithm in the congestion adaptive control, the increase amount of the congestion window is changed according to the received confirmation frame, the thread increase state at the next moment needs to be predicted, the core thread number of the thread pool at the current moment becomes the sum of twice the increase number of the thread pool and the number of threads currently running, and the algorithm is as follows 4:
Rntokxczds + (jsck-ysck) 2 formula 4
The maximum thread number R needs to be set when the thread pool intelligent algorithm is carried out by using the slow start algorithmMaxIf the increased number of core threads is less than the maximum number of threads, the value is kept unchanged, and if the increased number of core threads is greater than the maximum number of threads, the number of core threads is taken as the maximum number of threads, and the judgment formula is as follows:
Rn=min{Rn,Rmaxequation 5.
5. The intelligent control method for instantaneous high concurrency server thread pool congestion according to claim 1, wherein the thread pool reduction algorithm based on STCP and congestion prevention is: the intelligent thread pool reducing algorithm is realized by adopting a mode of improving and combining a congestion preventing algorithm and an STCP algorithm, the congestion preventing algorithm adopts a new parameter, namely a slow start critical value mqdljz when reducing the size of a congestion window, the mqdljz is half of the congestion window, the sending rate is reduced, a certain idle thread is also required to be reserved when the size of the thread pool is reduced, the phenomenon that the response time of a server is too long due to an emergency is avoided through the thread, the thread pool adopts two parameters to process in parallel to replace the congestion window, which are respectively jsck and ysck, in a thread pool reducing stage, the task completion quantity in unit time is larger than the task request quantity, namely ysck is larger than jsck, in this case, the redundant thread quantity xczds is the absolute value of the difference between the two, a certain thread is reserved, the redundant thread quantity is halved, and therefore, the next thread quantity is predicted to be the sum of the thread quantity in the current operation and half of the redundant thread quantity, the algorithm is as follows:
Figure FDA0003044554590000031
the algorithm for reducing the size of the thread pool by the STCP has a smoother curve, is applied to the intelligent algorithm of the thread pool, is related to a congestion window and is unrelated to other parameters, and is set, and the algorithm formula is as follows:
Figure FDA0003044554590000032
after a predicted value of the size of the thread pool of the STCP algorithm is obtained through the formula 7, whether the predicted value is smaller than the number of working threads which are currently running is judged, when the predicted value is larger than the number of the working threads, the predicted value is directly compared with the result of the congestion prevention algorithm to obtain the minimum value, if the predicted value is smaller than the number of the working threads, the running threads cannot directly stop running, and the size of the thread pool cannot be adjusted to the value, so that the result is discarded, the value is directly defaulted to be infinite, and the predicted value is compared with the congestion prevention algorithm:
Rn=min{R1n,R2nformula 8
Formulas 6 and 7 respectively represent algorithm improvements of a congestion prevention algorithm and an STCP algorithm applied to a thread pool, the two algorithms reduce the size of the thread pool, a better result value between the two is selected as an optimal solution through a formula 8, a certain thread is reserved while the spare thread is reduced as much as possible, and finally the lower limit value of the thread pool is judged, wherein the algorithm is as follows:
Rn=max{Rn,Rminformula 9
When jsck is equal to ysck, the state is in a balanced state, the requested task amount and the completion amount are equal, the size of the thread pool is not changed, and processing is not performed at the moment.
6. The intelligent control method for the instantaneous high-concurrency server thread pool congestion as claimed in claim 1, wherein the design criteria of the congestion adaptive control model of the invention mainly consider the following factors:
criterion one, feasibility in thread pool;
second, instantaneous high concurrency processing performance;
the size of the thread pool is reasonably reduced, the size of the thread pool is increased, meanwhile, the size of the thread pool is reduced according to requirements, and a congestion self-adaptive control algorithm can process instantaneous concurrent data to reasonably reduce the number of idle threads of the thread pool;
the algorithm consumes less time, the thread pool has high requirement on time precision, and the algorithm for adjusting the size of the thread pool consumes as little time as possible;
according to the system requirements and the congestion adaptive control characteristics, when the congestion adaptive control design is carried out, the first standard and the fourth standard are met, and the second standard or the third standard can be met.
7. The intelligent control method for instantaneous high concurrency server thread pool congestion as recited in claim 6, wherein the core of the slow start algorithm is: when a sending end sends data, because the network condition is not clear, if a large amount of data is injected into the network immediately, network congestion may be caused, the preferred method is to try out, the sent data amount is gradually increased from small to large, and the implementation process of the slow start algorithm is as follows: firstly, a sending end and a target end establish connection, at the moment, the size of a congestion window is initialized, the size of the congestion window is set to be the size of a data packet, a returned confirmation frame is obtained, the size of a receiving window is obtained, the size of a sending window is determined according to the congestion window and the receiving window, and the relation among the three is shown as formula 1:
fsck ═ min { ysck, jsck } equation 1
fsck represents a sending window, ysck represents a congestion window, jsck represents a receiving window, the size of the sending window is the minimum value of the congestion window and the receiving window, in the later operation process, when a sending end receives a message acknowledgement frame ACK fed back by a receiving end, the congestion window of the sending end increases the packet size of the number of the received ACKs, when network congestion does not occur, the congestion window is increased by one time every other RTT time, the exponential increase is presented, so that TCP flow reaches the maximum value of network capacity as soon as possible, and the bandwidth utilization rate is improved.
8. The intelligent control method for the congestion of the thread pool of the instantaneous high-concurrency server according to claim 7, wherein the action parameters of the slow-start algorithm are a congestion window, a sending window and a receiving window, and the algorithm is analyzed and applied in the thread pool according to the three parameters and the design criteria of the adaptive control model of the congestion: the method has the advantages that feasibility is achieved, timely response to instantaneous concurrent data is achieved, a slow-start algorithm congestion window is exponentially increased, the number of the congestion windows in the initial stage is small, the window size is rapidly increased along with the increase of time, and the maximum capacity of a network is achieved in the shortest time, so that timely response to the data with large instantaneous concurrent amount can be met.
9. The intelligent control method for transient high concurrency server thread pool congestion according to claim 6, wherein the congestion prevention algorithm: first, assuming that packet loss is not caused by packet damage, if packet loss indicates that congestion has occurred somewhere in the network transmission process, the data packet loss is confirmed in two ways: if the retransmission timer is overtime or the receiving end continuously receives the repeated confirmation frame, the congestion is indicated when the transmitting end is overtime or continuously receives 3 repeated ACKs, and at the moment, a congestion prevention algorithm is started;
the congestion prevention workflow comprises the following steps: the slow start algorithm enables the congestion window to be multiplied all the time, the process cannot be continued all the time, a slow start critical value mqdljz needs to be set, the congestion window is not doubled when reaching the value, the congestion window is linearly increased instead, once data transmission is overtime, the congestion window is reset to be 1, the slow start algorithm is started again, the congestion prevention algorithm mainly processes the condition that the slow start algorithm is increased too fast, the congestion window is reduced, the increase rate of the slow start window is limited, and the network can be recovered to the normal state.
10. The intelligent control method for instantaneous high concurrency server thread pool congestion according to claim 6, wherein STCP is a protocol based on a product increase and product decrease strategy, and is divided into two parts, namely increase of congestion window and decrease of congestion window, when receiving ACK acknowledgement frame, the congestion window is increased, and at this time, the increasing method is as shown in equation 2:
ysck + a a 0.01 formula 2
When congestion occurs, the algorithm is shown in formula 3:
ysck-b-ysck b-0.125 formula 3
The STCP algorithm adjusts the increase and decrease of the congestion window by two parameters, the parameters a and b are constants between (0, 1), in the embodiment, a is 0.01, b is 0.125 most suitable, the congestion window is increased by 0.01 when an acknowledgement data frame is received, when the congestion is detected, the congestion window is decreased by one eighth, the STCP algorithm has 70 RTT time for doubling the sending rate no matter what the initial sending rate is, the updating algorithm of the congestion window can be expanded, the STCP algorithm has two action parameters, namely the congestion window and the sending window, and the adjustment of the sending rate is achieved by adjusting the congestion window;
the congestion control algorithm is analyzed, the congestion adaptive control algorithm is designed according to influence factors and design algorithm standards, the algorithm which is feasible and can be applied to the thread pool comprises a slow start algorithm, a congestion prevention algorithm and an STCP algorithm, a congestion window of the slow start algorithm is exponentially increased, so that the instantaneous concurrency capability is met, and the algorithm is applied to the algorithm adjustment for increasing the size of the thread pool, wherein the congestion prevention algorithm and the STCP algorithm are more suitable for being applied to the algorithm stage for reducing the size of the thread pool.
CN202110466974.9A 2021-04-28 2021-04-28 Intelligent control method for instantaneous high-concurrency server thread pool congestion Pending CN113194040A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110466974.9A CN113194040A (en) 2021-04-28 2021-04-28 Intelligent control method for instantaneous high-concurrency server thread pool congestion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110466974.9A CN113194040A (en) 2021-04-28 2021-04-28 Intelligent control method for instantaneous high-concurrency server thread pool congestion

Publications (1)

Publication Number Publication Date
CN113194040A true CN113194040A (en) 2021-07-30

Family

ID=76980321

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110466974.9A Pending CN113194040A (en) 2021-04-28 2021-04-28 Intelligent control method for instantaneous high-concurrency server thread pool congestion

Country Status (1)

Country Link
CN (1) CN113194040A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113961362A (en) * 2021-11-14 2022-01-21 苏州浪潮智能科技有限公司 Process identification method, system, storage medium and equipment
CN114338816A (en) * 2021-12-22 2022-04-12 阿里巴巴(中国)有限公司 Concurrency control method, device, equipment and storage medium under server-free architecture
CN117251275A (en) * 2023-11-17 2023-12-19 北京卡普拉科技有限公司 Multi-application asynchronous I/O request scheduling method, system, equipment and medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5430850A (en) * 1991-07-22 1995-07-04 Massachusetts Institute Of Technology Data processing system with synchronization coprocessor for multiple threads
US6941379B1 (en) * 2000-05-23 2005-09-06 International Business Machines Corporation Congestion avoidance for threads in servers
US20100218196A1 (en) * 2008-02-08 2010-08-26 Reservoir Labs, Inc. System, methods and apparatus for program optimization for multi-threaded processor architectures
CN103428272A (en) * 2013-07-16 2013-12-04 无限极(中国)有限公司 System and method for monitoring and scheduling of middleware threads
CN106059951A (en) * 2016-06-08 2016-10-26 中南大学 Transmission control method for DCN (Data Center Network) based on multilevel congestion feedback
CN107360101A (en) * 2017-08-04 2017-11-17 武汉理工大学 A kind of TCP congestion avoidance algorithms based on auto-adaptive parameter
CN107832146A (en) * 2017-10-27 2018-03-23 北京计算机技术及应用研究所 Thread pool task processing method in highly available cluster system
CN108874537A (en) * 2018-04-11 2018-11-23 哈尔滨工程大学 The method that adaptive dynamic based on segmentation adjusts thread pool size
CN111142943A (en) * 2019-12-27 2020-05-12 中国银行股份有限公司 Automatic control concurrency method and device
CN111930484A (en) * 2020-07-24 2020-11-13 国家电网有限公司 Method and system for optimizing performance of thread pool of power grid information communication server

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5430850A (en) * 1991-07-22 1995-07-04 Massachusetts Institute Of Technology Data processing system with synchronization coprocessor for multiple threads
US6941379B1 (en) * 2000-05-23 2005-09-06 International Business Machines Corporation Congestion avoidance for threads in servers
US20100218196A1 (en) * 2008-02-08 2010-08-26 Reservoir Labs, Inc. System, methods and apparatus for program optimization for multi-threaded processor architectures
CN103428272A (en) * 2013-07-16 2013-12-04 无限极(中国)有限公司 System and method for monitoring and scheduling of middleware threads
CN106059951A (en) * 2016-06-08 2016-10-26 中南大学 Transmission control method for DCN (Data Center Network) based on multilevel congestion feedback
CN107360101A (en) * 2017-08-04 2017-11-17 武汉理工大学 A kind of TCP congestion avoidance algorithms based on auto-adaptive parameter
CN107832146A (en) * 2017-10-27 2018-03-23 北京计算机技术及应用研究所 Thread pool task processing method in highly available cluster system
CN108874537A (en) * 2018-04-11 2018-11-23 哈尔滨工程大学 The method that adaptive dynamic based on segmentation adjusts thread pool size
CN111142943A (en) * 2019-12-27 2020-05-12 中国银行股份有限公司 Automatic control concurrency method and device
CN111930484A (en) * 2020-07-24 2020-11-13 国家电网有限公司 Method and system for optimizing performance of thread pool of power grid information communication server

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
TOM KELLY: "Scalable TCP: Improving Performance in Highspeed Wide Area Networks", 《ACM SIGCOMM COMPUTER COMMUNICATIONS》, vol. 33, no. 2, pages 1 - 3 *
何建新;: "有线无线网络拥塞控制算法研究", 湖南城市学院学报(自然科学版), no. 01 *
孙旭东;韩江洪;刘征宇;解新胜;: "基于分段的线程池尺寸自适应调整算法", 计算机工程, no. 02, pages 1 - 3 *
梁峰;: "基于TCP端口的拥塞控制算法研究", 电脑知识与技术, no. 35 *
贺仁宇;: "保证QoS的无线TCP拥塞控制机制跨层设计方法", 激光杂志, no. 08 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113961362A (en) * 2021-11-14 2022-01-21 苏州浪潮智能科技有限公司 Process identification method, system, storage medium and equipment
CN113961362B (en) * 2021-11-14 2024-01-16 苏州浪潮智能科技有限公司 Process identification method, system, storage medium and equipment
CN114338816A (en) * 2021-12-22 2022-04-12 阿里巴巴(中国)有限公司 Concurrency control method, device, equipment and storage medium under server-free architecture
CN117251275A (en) * 2023-11-17 2023-12-19 北京卡普拉科技有限公司 Multi-application asynchronous I/O request scheduling method, system, equipment and medium
CN117251275B (en) * 2023-11-17 2024-01-30 北京卡普拉科技有限公司 Multi-application asynchronous I/O request scheduling method, system, equipment and medium

Similar Documents

Publication Publication Date Title
CN113194040A (en) Intelligent control method for instantaneous high-concurrency server thread pool congestion
CN111953758B (en) Edge network computing unloading and task migration method and device
Rong et al. Extending the lifetime of a network of battery-powered mobile devices by remote processing: a markovian decision-based approach
EP2399183B1 (en) Energy-aware server management
US20120195324A1 (en) Sharing bandwidth among multiple users of network applications
Zhang et al. A-SARSA: A predictive container auto-scaling algorithm based on reinforcement learning
CN113672383A (en) Cloud computing resource scheduling method, system, terminal and storage medium
CN107708152A (en) The task discharging method of isomery cellular network
CN111338807B (en) QoE (quality of experience) perception service enhancement method for edge artificial intelligence application
CN114217993A (en) Method, system, terminal device and storage medium for controlling thread pool congestion
Tran et al. A survey of autoscaling in kubernetes
CN110320813B (en) Power management method and device for Internet of things equipment
CN117336300B (en) Resource management system for state machine
CN109857574B (en) Service quality improving method capable of sensing overload load in low-energy-consumption cluster environment
CN114185674A (en) CPU task real-time scheduling method, device, equipment and storage medium
CN116643844B (en) Intelligent management system and method for automatic expansion of power super-computing cloud resources
CN116302578B (en) QoS (quality of service) constraint stream application delay ensuring method and system
CN115858155A (en) Dynamic capacity expansion and contraction method and device for application resources of computing power network platform
CN117076117A (en) Intelligent media meeting place scheduling method and system based on new communication architecture
CN109144664B (en) Dynamic migration method of virtual machine based on user service quality demand difference
US20020124041A1 (en) System and method for managing real-time processing
CN113849282A (en) OpenRESTY reverse proxy queuing processing method based on dynamic weight
CN114490018A (en) Service scheduling algorithm based on resource feature matching
CN113672372A (en) Multi-edge cooperative load balancing task scheduling method based on reinforcement learning
CN112532459A (en) Bandwidth resource adjusting method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination