[master] f88ca87 Apply queue limits only to requests
Nils Goroll
nils.goroll at uplex.de
Tue Nov 1 10:14:05 CET 2016
commit f88ca87d8e6106ec2d7a3813d750a35814aa60bf
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Thu Oct 27 07:52:46 2016 +0200
Apply queue limits only to requests
We should queue bo tasks to avoid failing client requests
unnecessarily.
The detailed parameter description of the queue_limit was already
correct, improve the short one.
diff --git a/bin/varnishd/cache/cache_wrk.c b/bin/varnishd/cache/cache_wrk.c
index c497451..e1cdde1 100644
--- a/bin/varnishd/cache/cache_wrk.c
+++ b/bin/varnishd/cache/cache_wrk.c
@@ -243,8 +243,11 @@ Pool_Task(struct pool *pp, struct pool_task *task, enum task_how how)
return (0);
}
- /* Acceptors are not subject to queue limits */
- if (how == TASK_QUEUE_VCA ||
+ /*
+ * queue limits only apply to client threads - all other
+ * work is vital and needs do be done at the earliest
+ */
+ if (how != TASK_QUEUE_REQ ||
pp->lqueue < cache_param->wthread_max +
cache_param->wthread_queue_limit + pp->nthr) {
pp->nqueued++;
diff --git a/bin/varnishd/mgt/mgt_pool.c b/bin/varnishd/mgt/mgt_pool.c
index 1e75953..8791a44 100644
--- a/bin/varnishd/mgt/mgt_pool.c
+++ b/bin/varnishd/mgt/mgt_pool.c
@@ -178,7 +178,7 @@ struct parspec WRK_parspec[] = {
"10", "requests" },
{ "thread_queue_limit", tweak_uint, &mgt_param.wthread_queue_limit,
"0", NULL,
- "Permitted queue length per thread-pool.\n"
+ "Permitted request queue length per thread-pool.\n"
"\n"
"This sets the number of requests we will queue, waiting "
"for an available thread. Above this limit sessions will "
diff --git a/include/tbl/params.h b/include/tbl/params.h
index 71e2949..1e01384 100644
--- a/include/tbl/params.h
+++ b/include/tbl/params.h
@@ -1215,7 +1215,7 @@ PARAM(
/* units */ NULL,
/* flags */ EXPERIMENTAL,
/* s-text */
- "Permitted queue length per thread-pool.\n"
+ "Permitted request queue length per thread-pool.\n"
"\n"
"This sets the number of requests we will queue, waiting for an "
"available thread. Above this limit sessions will be dropped "
More information about the varnish-commit
mailing list