Skip to content

Commit

Permalink
param: Lower rush_exponent minimum value
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dridi committed Dec 9, 2024
1 parent 1abf6f9 commit 9115bb7
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 2 deletions.
64 changes: 64 additions & 0 deletions bin/varnishtest/tests/c00133.vtc
Original file line number Diff line number Diff line change
@@ -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
6 changes: 4 additions & 2 deletions include/tbl/params.h
Original file line number Diff line number Diff line change
Expand Up @@ -858,15 +858,17 @@ PARAM_SIMPLE(
PARAM_SIMPLE(
/* name */ rush_exponent,
/* type */ uint,
/* min */ "2",
/* min */ "1",
/* max */ NULL,
/* def */ "3",
/* units */ "requests per request",
/* descr */
"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
)

Expand Down

0 comments on commit 9115bb7

Please sign in to comment.