Skip to content

Commit

Permalink
Tune swoole params for packet processing (#427)
Browse files Browse the repository at this point in the history
  • Loading branch information
donhardman authored Jan 7, 2025
1 parent 2064fc2 commit bdb4cf8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@
'reactor_num' => $threads,
'worker_num' => max(1, (int)($threads / 4)),
'enable_reuse_port' => true,
'input_buffer_size' => 2097152,
'buffer_output_size' => 32 * 1024 * 1024, // byte in unit
'input_buffer_size' => 4 * 1024 * 1024,
'package_max_length' => 16 * 1024 * 1024, // byte in unit
'buffer_output_size' => 64 * 1024 * 1024, // byte in unit
'tcp_fastopen' => true,
// better not change, different oses different behaviour
// 'max_conn' => $threads * 2,
Expand Down

0 comments on commit bdb4cf8

Please sign in to comment.