change accept threshold default to 16.

This commit is contained in:
Joris Vink 2018-11-16 11:37:09 +01:00
parent 4e70636269
commit 2d8874dd2a
2 changed files with 5 additions and 6 deletions

View File

@ -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

View File

@ -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;