]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: sched: change scheduler budgets to lower TL_BULK
authorWilly Tarreau <wtarreau@haproxy.com>
Sat, 21 Mar 2026 16:45:13 +0000 (16:45 +0000)
committerWilly Tarreau <w@1wt.eu>
Mon, 23 Mar 2026 05:58:37 +0000 (06:58 +0100)
Having less yielding tasks in TL_BULK and more in TL_NORMAL, we need
to rebalance these queues' priorities. Tests have shown that raising
TL_NORMAL to 40% and lowering TL_BULK to 3% seems to give about the
best tradeoffs.

src/task.c

index 7d0a1db9c6ac33e29022b7a5087ef0c179167b2f..552a0df25dc012b263c7e23e674a688dd3540b5e 100644 (file)
@@ -730,8 +730,8 @@ void process_runnable_tasks()
        struct task *t;
        const unsigned int default_weights[TL_CLASSES] = {
                [TL_URGENT] = 64, // ~50% of CPU bandwidth for I/O
-               [TL_NORMAL] = 48, // ~37% of CPU bandwidth for tasks
-               [TL_BULK]   = 16, // ~13% of CPU bandwidth for self-wakers
+               [TL_NORMAL] = 60, // ~47% of CPU bandwidth for tasks
+               [TL_BULK]   = 4,  // ~3% of CPU bandwidth for self-wakers
                [TL_HEAVY]  = 1,  // never more than 1 heavy task at once
        };
        unsigned int max[TL_CLASSES]; // max to be run per class