kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 2d8874dd2a6322296b274e2fb0d9e38611c9e7d6
parent 4e70636269a78e2e670bcf3394b2586bf9bb22ed
Author: Joris Vink <joris@coders.se>
Date:   Fri, 16 Nov 2018 11:37:09 +0100

change accept threshold default to 16.

Diffstat:
conf/kore.conf.example | 9++++-----
src/worker.c | 2+-
2 files changed, 5 insertions(+), 6 deletions(-)

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