Followup updates for new epoll_instances design
This commit is contained in:
@@ -20,10 +20,13 @@ Controls server networking, threading, and request handling behavior.
|
||||
|-----------|------|---------|-------------|
|
||||
| `bind_address` | string | `"127.0.0.1"` | IP address to bind the server to |
|
||||
| `port` | integer | `8080` | Port number to listen on |
|
||||
| `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 |
|
||||
| `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 |
|
||||
|
||||
### Commit Configuration (`[commit]`)
|
||||
|
||||
@@ -50,12 +53,18 @@ Controls behavior of the `/v1/subscribe` endpoint and SSE streaming.
|
||||
# WeaselDB Configuration File
|
||||
|
||||
[server]
|
||||
# Network configuration
|
||||
bind_address = "0.0.0.0"
|
||||
port = 8080
|
||||
# unix_socket_path = "weaseldb.sock" # Alternative to TCP
|
||||
|
||||
# Performance tuning
|
||||
max_request_size_bytes = 2097152 # 2MB
|
||||
io_threads = 8
|
||||
epoll_instances = 3 # Reduce kernel contention (max: io_threads)
|
||||
event_batch_size = 64
|
||||
max_connections = 50000
|
||||
read_buffer_size = 32768 # 32KB
|
||||
|
||||
[commit]
|
||||
min_request_id_length = 32
|
||||
|
||||
Reference in New Issue
Block a user