[master] e635f1c84 param: Lower rush_exponent minimum value
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Wed Aug 27 15:23:07 UTC 2025
commit e635f1c846f78e04f2e23f3ae666ac6ba51670e8
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Mon Dec 9 10:11:21 2024 +0100
param: Lower rush_exponent minimum value
To ease test coverage for waitling list operations, requiring less
disembarked requests for specific cases. Added is a test case showing
that a rush miss propagates further wake ups.
diff --git a/bin/varnishtest/tests/c00138.vtc b/bin/varnishtest/tests/c00138.vtc
new file mode 100644
index 000000000..cf0cb8c19
--- /dev/null
+++ b/bin/varnishtest/tests/c00138.vtc
@@ -0,0 +1,64 @@
+varnishtest "subsequent rush on rush miss"
+
+barrier b1 cond 2
+barrier b2 cond 2
+barrier b3 cond 2
+barrier b4 cond 2
+
+server s1 {
+ rxreq
+ expect req.http.user-agent == c1
+ barrier b1 sync
+ barrier b2 sync
+ txresp -hdr "Vary: accept"
+
+ rxreq
+ expect req.http.user-agent == c2
+ txresp -hdr "Vary: accept"
+} -start
+
+varnish v1 -cliok "param.set thread_pools 1"
+varnish v1 -cliok "param.set rush_exponent 1"
+varnish v1 -cliok "param.set debug +syncvsl,+waitinglist"
+varnish v1 -vcl+backend "" -start
+
+client c1 {
+ txreq
+ rxresp
+ expect resp.http.x-varnish == 1001
+} -start
+
+barrier b1 sync
+
+logexpect l1 -v v1 -q Debug -g raw {
+ expect * * Debug "on waiting list"
+} -start
+
+client c2 {
+ txreq -hdr "accept: nothing"
+ rxresp
+ expect resp.http.x-varnish == 1004
+} -start
+
+logexpect l1 -wait -start
+
+client c3 {
+ txreq
+ rxresp
+ expect resp.http.x-varnish == "1006 1002"
+} -start
+
+logexpect l1 -wait
+
+barrier b2 sync
+
+client c1 -wait
+client c2 -wait
+client c3 -wait
+
+varnish v1 -expect cache_miss == 2
+varnish v1 -expect cache_hit == 1
+varnish v1 -expect cache_hit_grace == 0
+varnish v1 -expect s_bgfetch == 0
+varnish v1 -expect busy_sleep == 2
+varnish v1 -expect busy_wakeup == 2
diff --git a/include/tbl/params.h b/include/tbl/params.h
index df7415536..e66a653cb 100644
--- a/include/tbl/params.h
+++ b/include/tbl/params.h
@@ -910,7 +910,7 @@ PARAM_SIMPLE(
PARAM_SIMPLE(
/* name */ rush_exponent,
/* type */ uint,
- /* min */ "2",
+ /* min */ "1",
/* max */ NULL,
/* def */ "3",
/* units */ "requests per request",
@@ -918,7 +918,9 @@ PARAM_SIMPLE(
"How many parked request we start for each completed request on "
"the object.\n"
"NB: Even with the implicit delay of delivery, this parameter "
- "controls an exponential increase in number of worker threads.",
+ "controls an exponential increase in number of worker threads. "
+ "A value of 1 will instead serialize requests resumption and is "
+ "only useful for testing purposes.",
/* flags */ EXPERIMENTAL
)
More information about the varnish-commit
mailing list