A method and device for determining the number of threads to be allocated by a target network device

A technology of target network and number of threads, applied in the Internet field, can solve the problems of no theoretical basis, easy to allocate too many threads, and cannot be modified, etc., to achieve the effect of improving flexibility and improving server resource utilization.

Active Publication Date: 2021-11-09
BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Existing methods for allocating the number of threads are as follows: 1) use a single thread to respond to each client request. Although this method can basically guarantee the response time, if the request volume is too large but there is no reasonable thread destruction strategy, it is easy to allocate too much thread. If there are too many threads, this will cause the entire server resources to be fully occupied, making the entire server in an unresponsive state; 2) using the thread pool, this method supports a wide range and is easy to use, only need to set a few core parameters (number of core threads, The number of waiting queues and the maximum number of threads) can meet almost all the needs, but there is no theoretical basis for the design of core parameters, and they cannot be modified, and cannot cope with emergencies (such as a surge in requests), and cannot automatically adjust Adapt to the number of allocated threads, and the flexibility of thread allocation is low

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
  • A method and device for determining the number of threads to be allocated by a target network device
  • A method and device for determining the number of threads to be allocated by a target network device
  • A method and device for determining the number of threads to be allocated by a target network device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0015] The present invention will be described in further detail below in conjunction with the accompanying drawings.

[0016] figure 1 Shown is a thread determination device 1 for determining the number of threads to be allocated to a target network device according to one aspect of the present invention, wherein the thread determination device 1 includes a method for determining the average number of threads in the target network device within a first time period A device for using information (hereinafter referred to as "the first determining device 11"); for determining the number of threads to be allocated in the second time period in the target network device according to the average usage information of the number of threads and the predetermined thread satisfaction rate device (hereinafter referred to as "the second determining device 12"), wherein the second time period is immediately after the first time period and has the same time interval as the first time period....

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 object of the present invention is to provide a method and device for determining the number of threads to be allocated by a target network device. Specifically, determine the average usage information of the number of threads in the first time period in the target network device; determine the threads that need to be allocated in the second time period in the target network device according to the average usage information of the number of threads and the predetermined thread satisfaction rate number, wherein the second time period is immediately after the first time period and has the same time interval as the first time period. Compared with the prior art, the present invention determines the number of threads to be allocated in the next time period of the server based on the average usage information of the number of threads in the server in the previous time period, combined with the predetermined thread satisfaction rate, that is, based on the past Statistically and dynamically modify the number of thread pool cores to adaptively allocate the number of threads, which not only improves the flexibility of thread allocation, but also improves the utilization of server resources, and can deal with many emergencies.

Description

technical field [0001] The invention relates to the technical field of the Internet, in particular to a technique for determining the number of threads to be allocated by a target network device. Background technique [0002] In the design of background programs, throughput and response time are two important indicators. In order to ensure user experience, the design principle of the system is to increase throughput as much as possible under the premise of ensuring a certain response time (such as within 200ms). quantity. For background engineers, due to limited server resources, computing resources are the most scarce resources. In order to meet the two hard requirements of throughput and response time, background development engineers need to squeeze out server resources as effectively as possible, which requires reasonable allocation. number of threads. Existing methods for allocating the number of threads are such as: 1) use a single thread to respond to each client re...

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): G06F9/48G06F9/50
CPCG06F9/4881G06F9/5027G06F2209/485G06F2209/5011
Inventor 尚斌杨静孙正柱张美娜
Owner BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products