Unlock instant, AI-driven research and patent intelligence for your innovation.

Self-adaptive thread pool size dynamic adjustment method based on segmentation

A dynamic adjustment and thread pool technology, applied in resource allocation, program control design, multi-program device, etc., can solve the problems of slow system response, small number of threads, large number of threads, etc.

Inactive Publication Date: 2018-11-23
HARBIN ENG UNIV
View PDF2 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] Thread pool technology is becoming more and more popular in application services. Everything has two sides. Thread pool technology is based on multi-thread technology. Therefore, while overcoming the shortcomings of traditional multi-thread technology, there will still be certain risks in application. ,
[0007] (1) There is no upper or lower limit on the number of threads. Creating and destroying threads too frequently will increase the overhead of the system, which is contrary to the original intention of using the thread pool (reducing the overhead of thread creation and destruction); when requests surge, resources may be exhausted cause system crash
[0008] (2) The number of threads is too large, there are too many threads participating in processing requests in the system, and the increase or decrease of synchronization overhead between multiple threads becomes complicated. At the same time, the system memory overhead for maintaining thread operation increases, which will cause slow system response ;
[0009] (3) The number of threads is too small, and there are no idle threads in the thread pool. When a new request arrives, it needs to wait in the blocking queue, which affects the response speed of the system.
However, the response to tasks or user requests in the thread pool size is ignored, resulting in the failure of the adjustment strategy when using the thread pool on a multi-tasking hardware platform.
Another example is "A Thread Pool Management Method and Device" disclosed in the patent document with application number 201610154360.6. Multiple tasks share the same thread pool, which increases the complexity of thread pool scheduling, and the restrictions on the thread pool are unreasonable, which may lead to The thread pool frequently creates and destroys the thread pool, which increases the resource consumption when the thread pool is used

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Self-adaptive thread pool size dynamic adjustment method based on segmentation
  • Self-adaptive thread pool size dynamic adjustment method based on segmentation

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0022] Main technical steps of the present invention comprise:

[0023] 1) Through the scientific analysis of the historical data requested by the user, configure the upper limit T of the dynamic change size of the thread pool max and lower limit T min ;

[0024] 2) If the number of user requests is on the rise, according to different situations, use different adjustment factors to increase the size of the thread pool to meet user needs; when the number of user requests is less than the number of worker threads in the thread pool, it means that the thread pool If the number of threads in the database is sufficient, the average value of the number of user requests and the current thread pool size is used as the benchmark, and the latest request increment is used as an adjustment factor to slightly adjust the size of the thread pool; when the number of user requests is greater than the number of jobs in the thread pool When the number of threads is large, it means that the thr...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a self-adaptive thread pool size dynamic adjustment method based on segmentation. The method comprises the steps that first, an upper limit T<max> and a lower limit T<min> of the dynamically changing size of a thread pool are configured; second, if the user requested quantity is at a rising stage, adjustment factors are used to increase the size of the thread pool; third, ifthe user requested quantity is at a stable stage, when the user requested quantity is greater than the quantity of work threads in the thread pool, the user requested quantity is used as the goal ofthread pool size adjustment; fourth, if the user requested quantity is at a descending stage, the adjustment factors are used to decrease the size of the thread pool; and fifth, the adjusted size of the thread pool is compared with the upper limit T<max> and the lower limit T<min> respectively, wherein when the size is greater than T<max>, T<max> is used as the size of the thread pool, and when the size is smaller than T<min>, T<min> is used as the size of the thread pool. According to the method, by monitoring the state of the thread pool and adjusting the size of the thread pool, the demandof a user is met to the maximum extent.

Description

technical field [0001] The invention relates to a method for adjusting the size of a thread pool, in particular to a method for dynamically adjusting the size of the thread pool. Background technique [0002] Thread pool has been widely used in Internet technology. By introducing thread pool, threads can be effectively managed, the upper limit of threads can be controlled, and the overhead of creating and destroying threads can be reduced. In practical applications, as the business grows, one system calls more and more other systems. Using a unified thread pool instance in the system can effectively manage threads uniformly and reduce the overhead of creating and destroying threads. [0003] Thread pool technology is the product of reducing the need for thread creation and destruction overhead. It refers to pre-creating a certain number of threads in the server memory, and centrally manages and schedules threads to improve system concurrency. Thread pool technology has natu...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/50
CPCG06F9/5027G06F9/5044G06F2209/5011
Inventor 玄世昌苘大鹏王巍杨武李哲
Owner HARBIN ENG UNIV