Justify epoll_instances config existing
This commit is contained in:
@@ -23,7 +23,7 @@ Controls server networking, threading, and request handling behavior.
|
||||
| `unix_socket_path` | string | `""` (empty) | Unix domain socket path. If specified, takes precedence over TCP |
|
||||
| `max_request_size_bytes` | integer | `1048576` (1MB) | Maximum size for incoming requests. Requests exceeding this limit receive a `413 Content Too Large` response |
|
||||
| `io_threads` | integer | `1` | Number of I/O threads for handling connections and network events |
|
||||
| `epoll_instances` | integer | `2` | Number of epoll instances to reduce kernel contention (max: io_threads). Higher values reduce epoll_ctl contention but increase memory usage |
|
||||
| `epoll_instances` | integer | `io_threads` | Number of epoll instances to reduce kernel contention (max: io_threads). Lower values allow multiple threads per epoll for better load balancing, higher values reduce contention |
|
||||
| `event_batch_size` | integer | `32` | Number of events to process in each epoll batch |
|
||||
| `max_connections` | integer | `50000` | Maximum number of concurrent connections (0 = unlimited). Note: Due to race conditions between connection acceptance and cleanup, it's possible to trip this limit without actually having that many concurrent connections, especially under high connection churn. |
|
||||
| `read_buffer_size` | integer | `16384` (16KB) | Buffer size for reading from socket connections |
|
||||
@@ -61,7 +61,7 @@ port = 8080
|
||||
# Performance tuning
|
||||
max_request_size_bytes = 2097152 # 2MB
|
||||
io_threads = 8
|
||||
epoll_instances = 3 # Reduce kernel contention (max: io_threads)
|
||||
epoll_instances = 8 # Reduce kernel contention (max: io_threads)
|
||||
event_batch_size = 64
|
||||
max_connections = 50000
|
||||
read_buffer_size = 32768 # 32KB
|
||||
|
||||
Reference in New Issue
Block a user