Skip to content

Commit a2ee1b5

Browse files
oliweroktalz
authored andcommitted
MINOR: global: Add a bunch of new tunables
Add support for the new keywords: - tune.applet.zero-copy-forwarding - tune.buffers.limit - tune.buffers.reserve - tune.h2.be.glitches-threshold - tune.h2.fe.glitches-threshold - tune.h2.fe.max-total-streams - tune.quic.reorder-ratio - tune.quic.zero-copy-fwd-send - tune.ring.queues
1 parent 00dddab commit a2ee1b5

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

section-parsers.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ func (p *configParser) getGlobalParser() *Parsers { //nolint: maintidx
261261
addParser(parser, &sequence, &parsers.HTTPClientSSLVerify{})
262262
addParser(parser, &sequence, &simple.Enabled{Name: "limited-quic"})
263263
addParser(parser, &sequence, &simple.Enabled{Name: "prealloc-fd"})
264+
addParser(parser, &sequence, &simple.OnOff{Name: "tune.applet.zero-copy-forwarding"})
264265
addParser(parser, &sequence, &simple.Number{Name: "tune.buffers.limit"})
265266
addParser(parser, &sequence, &simple.Number{Name: "tune.buffers.reserve"})
266267
addParser(parser, &sequence, &simple.Number{Name: "tune.bufsize"})
@@ -271,12 +272,15 @@ func (p *configParser) getGlobalParser() *Parsers { //nolint: maintidx
271272
addParser(parser, &sequence, &simple.OnOff{Name: "tune.fd.edge-triggered"})
272273
addParser(parser, &sequence, &simple.OnOff{Name: "tune.h1.zero-copy-fwd-recv"})
273274
addParser(parser, &sequence, &simple.OnOff{Name: "tune.h1.zero-copy-fwd-send"})
275+
addParser(parser, &sequence, &simple.Number{Name: "tune.h2.be.glitches-threshold"})
274276
addParser(parser, &sequence, &simple.Number{Name: "tune.h2.be.initial-window-size"})
275-
addParser(parser, &sequence, &simple.Number{Name: "tune.h2.header-table-size"})
276-
addParser(parser, &sequence, &simple.Number{Name: "tune.h2.initial-window-size"})
277277
addParser(parser, &sequence, &simple.Number{Name: "tune.h2.be.max-concurrent-streams"})
278+
addParser(parser, &sequence, &simple.Number{Name: "tune.h2.fe.glitches-threshold"})
278279
addParser(parser, &sequence, &simple.Number{Name: "tune.h2.fe.initial-window-size"})
279280
addParser(parser, &sequence, &simple.Number{Name: "tune.h2.fe.max-concurrent-streams"})
281+
addParser(parser, &sequence, &simple.Number{Name: "tune.h2.fe.max-total-streams"})
282+
addParser(parser, &sequence, &simple.Number{Name: "tune.h2.header-table-size"})
283+
addParser(parser, &sequence, &simple.Number{Name: "tune.h2.initial-window-size"})
280284
addParser(parser, &sequence, &simple.Number{Name: "tune.h2.max-concurrent-streams"})
281285
addParser(parser, &sequence, &simple.Number{Name: "tune.h2.max-frame-size"})
282286
addParser(parser, &sequence, &simple.OnOff{Name: "tune.h2.zero-copy-fwd-send"})
@@ -311,6 +315,7 @@ func (p *configParser) getGlobalParser() *Parsers { //nolint: maintidx
311315
addParser(parser, &sequence, &simple.Number{Name: "tune.rcvbuf.frontend"})
312316
addParser(parser, &sequence, &simple.Number{Name: "tune.rcvbuf.server"})
313317
addParser(parser, &sequence, &simple.Number{Name: "tune.recv_enough"})
318+
addParser(parser, &sequence, &simple.Number{Name: "tune.ring.queues"})
314319
addParser(parser, &sequence, &simple.Number{Name: "tune.runqueue-depth"})
315320
addParser(parser, &sequence, &simple.OnOff{Name: "tune.sched.low-latency"})
316321
addParser(parser, &sequence, &simple.Number{Name: "tune.sndbuf.backend"})
@@ -337,7 +342,9 @@ func (p *configParser) getGlobalParser() *Parsers { //nolint: maintidx
337342
addParser(parser, &sequence, &simple.Time{Name: "tune.quic.frontend.max-idle-timeout"})
338343
addParser(parser, &sequence, &simple.Number{Name: "tune.quic.frontend.max-streams-bidi"})
339344
addParser(parser, &sequence, &simple.Number{Name: "tune.quic.max-frame-loss"})
345+
addParser(parser, &sequence, &simple.Number{Name: "tune.quic.reorder-ratio"})
340346
addParser(parser, &sequence, &simple.Number{Name: "tune.quic.retry-threshold"})
347+
addParser(parser, &sequence, &simple.OnOff{Name: "tune.quic.zero-copy-fwd-send"})
341348
addParser(parser, &sequence, &parsers.QuicSocketOwner{})
342349
addParser(parser, &sequence, &simple.Enabled{Name: "no-quic"})
343350
addParser(parser, &sequence, &simple.Word{Name: "cluster-secret"})

tests/configs/haproxy.cfg.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,30 @@ global
3535
stats socket $PWD/haproxy-runtime-api.3.sock level admin mode 777 expose-fd listeners process 3
3636
stats timeout 120s
3737
limited-quic
38+
tune.applet.zero-copy-forwarding off
39+
tune.buffers.limit 30
40+
tune.buffers.reserve 3
41+
tune.bufsize 32768
3842
tune.disable-zero-copy-forwarding
3943
tune.events.max-events-at-once 150
4044
tune.h1.zero-copy-fwd-recv on
4145
tune.h1.zero-copy-fwd-send on
46+
tune.h2.be.glitches-threshold 16
47+
tune.h2.fe.glitches-threshold 24
48+
tune.h2.fe.max-total-streams 1048576
4249
tune.h2.zero-copy-fwd-send on
4350
tune.pt.zero-copy-forwarding on
51+
tune.ring.queues 8
4452
tune.ssl.default-dh-param 2048
53+
tune.quic.reorder-ratio 75
54+
tune.quic.zero-copy-fwd-send on
4555
ssl-default-bind-options no-sslv3 no-tls-tickets
4656
ssl-default-bind-ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK
4757
ssl-load-extra-del-ext
4858
log 127.0.0.1:514 local0 notice
4959
# random comment before snippet
5060
###_config-snippet_### BEGIN
5161
tune.ssl.default-dh-param 2048
52-
tune.bufsize 32768
5362
ssl-default-bind-client-sigalgs RSA+SHA256
5463
ssl-default-bind-sigalgs ECDSA+SHA256:RSA+SHA256
5564
###_config-snippet_### END

0 commit comments

Comments
 (0)