diff --git a/conf/kore.conf.example b/conf/kore.conf.example index 6564007..5215f5d 100644 --- a/conf/kore.conf.example +++ b/conf/kore.conf.example @@ -48,11 +48,10 @@ workers 4 # then worker_max_connections) or you have an actual reason # to not spend too much time in the accept loop this setting # will make a HUGE positive difference. -# -# This is disabled by default. If you wish to enable this -# specify the number of connections a worker will accept -# before returning from the accept loop. -#worker_accept_threshold 0 + +# Number of accept() calls a worker will do at most in one go +# before releasing the lock to others. +#worker_accept_threshold 16 # Workers bind themselves to a single CPU by default. # Turn this off by setting this option to 0 diff --git a/src/worker.c b/src/worker.c index 8de99d0..7e8e2ee 100644 --- a/src/worker.c +++ b/src/worker.c @@ -89,7 +89,7 @@ static struct wlock *accept_lock; extern volatile sig_atomic_t sig_recv; struct kore_worker *worker = NULL; u_int8_t worker_set_affinity = 1; -u_int32_t worker_accept_threshold = 0; +u_int32_t worker_accept_threshold = 16; u_int32_t worker_rlimit_nofiles = 768; u_int32_t worker_max_connections = 512; u_int32_t worker_active_connections = 0;