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

Method, device, computer equipment and storage medium for setting thread pool parameters

A thread pool and parameter technology, applied in the computer field, can solve problems such as waste of resources, task execution failure, thread pool cannot execute tasks in time, and achieve the effect of reducing failures

Active Publication Date: 2020-11-20
BEIJING SANKUAI ONLINE TECH CO LTD
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The setting of the corePoolSize parameter is very important. If the corePoolSize parameter is set too large, the thread pool will create many useless threads, thus wasting a lot of resources.
If the corePoolSize parameter is set too small, the thread pool cannot execute tasks in time, making many tasks need to wait, and even the task execution fails due to timeout
[0004] At present, the product of the experience value and the number of CPUs (Central Processing Unit, central processing unit) is usually set as the corePoolSize parameter, but the corePoolSize parameter set based on the experience value may not be suitable for different working scenarios of the device, and in turn, may cause the device to appear Fault

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
  • Method, device, computer equipment and storage medium for setting thread pool parameters
  • Method, device, computer equipment and storage medium for setting thread pool parameters
  • Method, device, computer equipment and storage medium for setting thread pool parameters

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0073] Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with aspects of the present disclosure as recited in the appended claims.

[0074] The embodiment of the present disclosure provides a method for setting thread pool parameters, which can be implemented by computer equipment.

[0075] An exemplary embodiment of the present disclosure provides a method for setting thread pool parameters, such as figure 1 As shown, the processing flow of the method may include the following steps:

[0076] Step S101, based on ...

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 relates to a method and device for setting the thread pool parameters, a computer device and a storage medium, and belongs to the technical field of computers. The method comprises the steps of estimating the degree of parallelism of each type of tasks at different moments based on the average execution duration and the execution frequency of each type of tasks, wherein the degree ofparallelism is the number of the tasks executed in parallel; and setting a thread pool core scale of a thread pool based on the degree of parallelism of each type of tasks at different moments. By adopting the method, the thread pool core scale can be set according to the statistical value corresponding to each type of tasks executed within the preset historical duration, and the set thread poolcore scale can be suitable for different working scenes of the devices, so that the method provided by the embodiment of the invention can reduce the device faults.

Description

technical field [0001] The present application relates to the field of computer technology, in particular to a method, device, computer equipment and storage medium for setting thread pool parameters. Background technique [0002] The thread pool is a common thread management tool, which can perform operations such as creating threads, placing threads, and ending threads. When using the thread pool, you need to set the thread pool parameters. The core parameter of the thread pool can be corePoolSize (thread pool core size), and the corePoolSize parameter is used to limit the number of threads currently established by the thread pool. [0003] The setting of the corePoolSize parameter is very important. If the corePoolSize parameter is set too large, the thread pool will create many useless threads, thus wasting a lot of resources. If the corePoolSize parameter is set too small, the thread pool cannot execute tasks in time, causing many tasks to wait, and even task execution...

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
Patent Type & Authority Patents(China)
IPC IPC(8): G06F8/71
CPCG06F8/71
Inventor 张致远陆晨
Owner BEIJING SANKUAI ONLINE TECH CO LTD