Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Commit fbcee17

Browse files
committed
set deafult reactor, worker, task worker number to cpu cores number
1 parent 24f9cc2 commit fbcee17

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

config/swoole_http.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
'log_file' => env('SWOOLE_HTTP_LOG_FILE', base_path('storage/logs/swoole_http.log')),
2323
'daemonize' => env('SWOOLE_HTTP_DAEMONIZE', false),
2424
// Normally this value should be 1~4 times larger according to your cpu cores.
25-
'reactor_num' => env('SWOOLE_HTTP_REACTOR_NUM', swoole_cpu_num() * 2),
26-
'worker_num' => env('SWOOLE_HTTP_WORKER_NUM', swoole_cpu_num() * 2),
27-
'task_worker_num' => env('SWOOLE_HTTP_TASK_WORKER_NUM', swoole_cpu_num() * 2),
25+
'reactor_num' => env('SWOOLE_HTTP_REACTOR_NUM', swoole_cpu_num()),
26+
'worker_num' => env('SWOOLE_HTTP_WORKER_NUM', swoole_cpu_num()),
27+
'task_worker_num' => env('SWOOLE_HTTP_TASK_WORKER_NUM', swoole_cpu_num()),
2828
// The data to receive can't be larger than buffer_output_size.
2929
'package_max_length' => 20 * 1024 * 1024,
3030
// The data to send can't be larger than buffer_output_size.

0 commit comments

Comments
 (0)