Calculate MAX_WORKERS default value by CPU number (#26177)

To avoid consuming user's 100% CPU, limit the default value of
MAX_WORKERS

Fix #26063 (the CPU 100% problem mentioned in it)
This commit is contained in:
wxiaoguang 2023-07-27 16:40:35 +08:00 committed by GitHub
parent 73fb1ecdcf
commit 8baa42c8d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 18 deletions

View file

@ -1420,8 +1420,8 @@ LEVEL = Info
;; Provides the suffix of the default redis/disk unique queue set name - specific queues can be overridden within in their [queue.name] sections.
;SET_NAME = "_unique"
;;
;; Dynamically scale the worker pool to at this many workers
;MAX_WORKERS = 10
;; Maximum number of worker go-routines for the queue. Default value is "CpuNum/2" clipped to between 1 and 10.
;MAX_WORKERS = ; (dynamic)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;