]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: tasks: add a tune.sched.low-latency option
authorWilly Tarreau <w@1wt.eu>
Wed, 24 Jun 2020 09:11:02 +0000 (11:11 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 24 Jun 2020 10:21:26 +0000 (12:21 +0200)
commite7723bddd7c39ae54531f9dd405a6e059e561d65
tree8fb7328f21cc0a3f13593e4aaf01615d4e3f051a
parent59153fef8659753e2d512d574b7107c5736d1920
MEDIUM: tasks: add a tune.sched.low-latency option

Now that all tasklet queues are scanned at once by run_tasks_from_lists(),
it becomes possible to always check for lower priority classes and jump
back to them when they exist.

This patch adds tune.sched.low-latency global setting to enable this
behavior. What it does is stick to the lowest ranked priority list in
which tasks are still present with an available budget, and leave the
loop to refill the tasklet lists if the trees got new tasks or if new
work arrived into the shared urgent queue.

Doing so allows to cut the latency in half when running with extremely
deep run queues (10k-100k), thus allowing forwarding of small and large
objects to coexist better. It remains off by default since it does have
a small impact on large traffic by default (shorter batches).
doc/configuration.txt
include/haproxy/global-t.h
src/task.c