[master] 8d63eb9fa Group impotent PARAM() macros at the end of the table

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon Mar 2 14:09:09 UTC 2020


commit 8d63eb9fa74df799867ccc7133276834c788651a
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Mon Mar 2 11:48:19 2020 +0100

    Group impotent PARAM() macros at the end of the table
    
    I have a plan to help them fit in the table, and regrouping them will
    make matters simpler.
    
    Much better diff with the --patience option.

diff --git a/include/tbl/params.h b/include/tbl/params.h
index 2c2b3e83b..cf07a1052 100644
--- a/include/tbl/params.h
+++ b/include/tbl/params.h
@@ -369,35 +369,6 @@ PARAM(
 	/* flags */	WIZARD
 )
 
-#if 0
-/* actual location mgt_param_bits.c*/
-/* see tbl/debug_bits.h */
-PARAM(
-	/* name */	debug,
-	/* type */	debug,
-	/* min */	NULL,
-	/* max */	NULL,
-	/* def */	NULL,
-	/* units */	NULL,
-	/* descr */
-	"Enable/Disable various kinds of debugging.\n"
-	"	none	Disable all debugging\n"
-	"\n"
-	"Use +/- prefix to set/reset individual bits:\n"
-	"	req_state	VSL Request state engine\n"
-	"	workspace	VSL Workspace operations\n"
-	"	waiter	VSL Waiter internals\n"
-	"	waitinglist	VSL Waitinglist events\n"
-	"	syncvsl	Make VSL synchronous\n"
-	"	hashedge	Edge cases in Hash\n"
-	"	vclrel	Rapid VCL release\n"
-	"	lurker	VSL Ban lurker\n"
-	"	esi_chop	Chop ESI fetch to bits\n"
-	"	flush_head	Flush after http1 head\n"
-	"	vtc_mode	Varnishtest Mode"
-)
-#endif
-
 PARAM(
 	/* name */	default_grace,
 	/* type */	timeout,
@@ -454,31 +425,6 @@ PARAM(
 	/* flags */	WIZARD
 )
 
-#if 0
-/* actual location mgt_param_bits.c*/
-/* See tbl/feature_bits.h */
-PARAM(
-	/* name */	feature,
-	/* type */	feature,
-	/* min */	NULL,
-	/* max */	NULL,
-	/* def */	NULL,
-	/* units */	NULL,
-	/* descr */
-	"Enable/Disable various minor features.\n"
-	"	none	Disable all features.\n"
-	"\n"
-	"Use +/- prefix to enable/disable individual feature:\n"
-	"	short_panic	Short panic message.\n"
-	"	wait_silo	Wait for persistent silo.\n"
-	"	no_coredump	No coredumps.\n"
-	"	esi_ignore_https	Treat HTTPS as HTTP in ESI:includes\n"
-	"	esi_disable_xml_check	Don't check of body looks like XML\n"
-	"	esi_ignore_other_elements	Ignore non-esi XML-elements\n"
-	"	esi_remove_bom	Remove UTF-8 BOM"
-)
-#endif
-
 PARAM(
 	/* name */	fetch_chunksize,
 	/* type */	bytes,
@@ -752,34 +698,6 @@ PARAM(
 	/* flags */	EXPERIMENTAL
 )
 
-#if 0
-/* actual location mgt_param_tbl.c */
-PARAM(
-	/* name */	pcre_match_limit,
-	/* type */	uint,
-	/* min */	"1",
-	/* max */	NULL,
-	/* def */	"1.000",
-	/* units */	NULL,
-	/* descr */
-	"The limit for the  number of internal matching function calls in "
-	"a pcre_exec() execution."
-)
-
-/* actual location mgt_param_tbl.c */
-PARAM(
-	/* name */	pcre_match_limit_recursion,
-	/* type */	uint,
-	/* min */	"1",
-	/* max */	NULL,
-	/* def */	"1.000",
-	/* units */	NULL,
-	/* descr */
-	"The limit for the  number of internal matching function "
-	"recursions in a pcre_exec() execution."
-)
-#endif
-
 PARAM(
 	/* name */	ping_interval,
 	/* type */	uint,
@@ -817,47 +735,6 @@ PARAM(
 	"either direction for this many seconds, the session is closed."
 )
 
-#if 0
-/* actual location mgt_param_tbl.c */
-PARAM(
-	/* name */	pool_req,
-	/* type */	poolparam,
-	/* min */	NULL,
-	/* max */	NULL,
-	/* def */	"10,100,10",
-	/* units */	NULL,
-	/* descr */
-	"Parameters for per worker pool request memory pool.\n"
-	MEMPOOL_TEXT
-)
-
-/* actual location mgt_param_tbl.c */
-PARAM(
-	/* name */	pool_sess,
-	/* type */	poolparam,
-	/* min */	NULL,
-	/* max */	NULL,
-	/* def */	"10,100,10",
-	/* units */	NULL,
-	/* descr */
-	"Parameters for per worker pool session memory pool.\n"
-	MEMPOOL_TEXT
-)
-
-/* actual location mgt_param_tbl.c */
-PARAM(
-	/* name */	pool_vbo,
-	/* type */	poolparam,
-	/* min */	NULL,
-	/* max */	NULL,
-	/* def */	"10,100,10",
-	/* units */	NULL,
-	/* descr */
-	"Parameters for backend object fetch memory pool.\n"
-	MEMPOOL_TEXT
-)
-#endif
-
 PARAM(
 	/* name */	prefer_ipv6,
 	/* type */	bool,
@@ -1013,596 +890,707 @@ PARAM(
 )
 #undef XYZZY
 
-#if 0
-/* actual location mgt_pool.c */
+#if defined(XYZZY)
+  #error "Temporary macro XYZZY already defined"
+#endif
+
+#if defined(SO_RCVTIMEO_WORKS)
+  #define XYZZY 0
+#else
+  #define XYZZY NOT_IMPLEMENTED
+#endif
 PARAM(
-	/* name */	thread_pool_add_delay,
+	/* name */	timeout_idle,
 	/* type */	timeout,
 	/* min */	"0.000",
 	/* max */	NULL,
-	/* def */	"0.000",
+	/* def */	"5.000",
 	/* units */	"seconds",
 	/* descr */
-	"Wait at least this long after creating a thread.\n"
-	"\n"
-	"Some (buggy) systems may need a short (sub-second) delay between "
-	"creating threads.\n"
-	"Set this to a few milliseconds if you see the 'threads_failed' "
-	"counter grow too much.\n"
-	"Setting this too high results in insufficient worker threads.",
-	/* flags */	EXPERIMENTAL
+	"Idle timeout for client connections.\n\n"
+	"A connection is considered idle until we have received the full"
+	" request headers.\n\n"
+	"This parameter is particularly relevant for HTTP1 keepalive "
+	" connections which are closed unless the next request is received"
+	" before this timeout is reached.",
+	/* flags */	XYZZY
 )
+#undef XYZZY
 
-/* actual location mgt_pool.c */
 PARAM(
-	/* name */	thread_pool_watchdog,
+	/* name */	timeout_linger,
 	/* type */	timeout,
-	/* min */	"0.1",
+	/* min */	"0.000",
 	/* max */	NULL,
-	/* def */	"60.000",
+	/* def */	"0.050",
 	/* units */	"seconds",
 	/* descr */
-	"Thread queue stuck watchdog.\n"
-	"\n"
-	"If no queued work have been released for this long,"
-	" the worker process panics itself.",
+	"How long the worker thread lingers on an idle session before "
+	"handing it over to the waiter.\n"
+	"When sessions are reused, as much as half of all reuses happen "
+	"within the first 100 msec of the previous request completing.\n"
+	"Setting this too high results in worker threads not doing "
+	"anything for their keep, setting it too low just means that more "
+	"sessions take a detour around the waiter.",
 	/* flags */	EXPERIMENTAL
 )
 
-/* actual location mgt_pool.c */
 PARAM(
-	/* name */	thread_pool_destroy_delay,
+	/* name */	vcl_cooldown,
 	/* type */	timeout,
-	/* min */	"0.010",
+	/* min */	"1.000",
 	/* max */	NULL,
-	/* def */	"1.000",
+	/* def */	"600.000",
 	/* units */	"seconds",
 	/* descr */
-	"Wait this long after destroying a thread.\n"
-	"This controls the decay of thread pools when idle(-ish).",
-	/* flags */	DELAYED_EFFECT| EXPERIMENTAL
+	"How long a VCL is kept warm after being replaced as the "
+	"active VCL (granularity approximately 30 seconds)."
 )
 
-/* actual location mgt_pool.c */
 PARAM(
-	/* name */	thread_pool_fail_delay,
-	/* type */	timeout,
-	/* min */	"0.010",
-	/* max */	NULL,
-	/* def */	"0.200",
-	/* units */	"seconds",
+	/* name */	max_vcl_handling,
+	/* type */	uint,
+	/* min */	"0",
+	/* max */	"2",
+	/* def */	"1",
+	/* units */	NULL,
 	/* descr */
-	"Wait at least this long after a failed thread creation before "
-	"trying to create another thread.\n"
-	"\n"
-	"Failure to create a worker thread is often a sign that  the end "
-	"is near, because the process is running out of some resource.  "
-	"This delay tries to not rush the end on needlessly.\n"
-	"\n"
-	"If thread creation failures are a problem, check that "
-	"thread_pool_max is not too high.\n"
-	"\n"
-	"It may also help to increase thread_pool_timeout and "
-	"thread_pool_min, to reduce the rate at which treads are destroyed "
-	"and later recreated.",
-	/* flags */	EXPERIMENTAL
+	"Behaviour when attempting to exceed max_vcl loaded VCL.\n"
+	"\n*  0 - Ignore max_vcl parameter.\n"
+	"\n*  1 - Issue warning.\n"
+	"\n*  2 - Refuse loading VCLs."
 )
 
-/* actual location mgt_pool.c */
 PARAM(
-	/* name */	thread_pool_max,
-	/* type */	thread_pool_max,
-	/* min */	"100",
+	/* name */	max_vcl,
+	/* type */	uint,
+	/* min */	"0",
 	/* max */	NULL,
-	/* def */	"5000",
-	/* units */	"threads",
+	/* def */	"100",
+	/* units */	NULL,
 	/* descr */
-	"The maximum number of worker threads in each pool.\n"
-	"\n"
-	"Do not set this higher than you have to, since excess worker "
-	"threads soak up RAM and CPU and generally just get in the way of "
-	"getting work done.",
-	/* flags */	DELAYED_EFFECT
+	"Threshold of loaded VCL programs.  (VCL labels are not counted.)"
+	"  Parameter max_vcl_handling determines behaviour."
 )
 
-/* actual location mgt_pool.c */
 PARAM(
-	/* name */	thread_pool_min,
-	/* type */	thread_pool_min,
-	/* min */	NULL,
-	/* max */	"5000",
-	/* def */	"100",
-	/* units */	"threads",
+	/* name */	vsm_free_cooldown,
+	/* type */	timeout,
+	/* min */	"10.000",
+	/* max */	"600.000",
+	/* def */	"60.000",
+	/* units */	"seconds",
 	/* descr */
-	"The minimum number of worker threads in each pool.\n"
-	"\n"
-	"Increasing this may help ramp up faster from low load situations "
-	"or when threads have expired."
-	"Minimum is 10 threads.",
-	/* flags */	DELAYED_EFFECT
+	"How long VSM memory is kept warm after a deallocation "
+	"(granularity approximately 2 seconds)."
 )
 
-/* actual location mgt_pool.c */
 PARAM(
-	/* name */	thread_pool_reserve,
-	/* type */	thread_pool_reserve,
-	/* min */	NULL,
+	/* name */	vsl_buffer,
+	/* type */	vsl_buffer,
+	/* min */	"267",
 	/* max */	NULL,
-	/* def */	"0",
-	/* units */	"threads",
+	/* def */	"4k",
+	/* units */	"bytes",
 	/* descr */
-	"The number of worker threads reserved for vital tasks "
-	"in each pool.\n"
-	"\n"
-	"Tasks may require other tasks to complete (for example, "
-	"client requests may require backend requests). This reserve "
-	"is to ensure that such tasks still get to run even under high "
-	"load.\n"
-	"\n"
-	"Increasing the reserve may help setups with a high number of "
-	"backend requests at the expense of client performance. "
-	"Setting it too high will waste resources by keeping threads "
-	"unused.\n"
-	"\n"
-	"Default is 0 to auto-tune (currently 5% of thread_pool_min).\n"
-	"Minimum is 1 otherwise, maximum is 95% of thread_pool_min.",
-	/* flags */	DELAYED_EFFECT| EXPERIMENTAL
+	"Bytes of (req-/backend-)workspace dedicated to buffering VSL "
+	"records.\n"
+	"When this parameter is adjusted, most likely workspace_client "
+	"and workspace_backend will have to be adjusted by the same amount.\n\n"
+	"Setting this too high costs memory, setting it too low will cause "
+	"more VSL flushes and likely increase lock-contention on the VSL "
+	"mutex.",
+	/* flags */	0,
+	/* dyn_min_reason */	"vsl_reclen + 12 bytes"
 )
 
-/* actual location mgt_pool.c */
 PARAM(
-	/* name */	thread_pool_stack,
-	/* type */	bytes,
-	/* min */	"2k",
+	/* name */	vsl_reclen,
+	/* type */	vsl_reclen,
+	/* min */	"16b",
 	/* max */	NULL,
-	/* def */	"56k",
+	/* def */	"255b",
 	/* units */	"bytes",
 	/* descr */
-	"Worker thread stack size.\n"
-	"This will likely be rounded up to a multiple of 4k (or whatever "
-	"the page_size might be) by the kernel.",
-	/* flags */	EXPERIMENTAL
+	"Maximum number of bytes in SHM log record.",
+	/* flags */	0,
+	/* dyn_min_reason */	NULL,
+	/* dyn_max_reason */	"vsl_buffer - 12 bytes"
 )
 
-/* actual location mgt_pool.c */
 PARAM(
-	/* name */	thread_pool_timeout,
-	/* type */	timeout,
-	/* min */	"10.000",
-	/* max */	NULL,
-	/* def */	"300.000",
-	/* units */	"seconds",
+	/* name */	vsl_space,
+	/* type */	bytes,
+	/* min */	"1M",
+	/* max */	"4G",
+	/* def */	"80M",
+	/* units */	"bytes",
 	/* descr */
-	"Thread idle threshold.\n"
-	"\n"
-	"Threads in excess of thread_pool_min, which have been idle for at "
-	"least this long, will be destroyed.",
-	/* flags */	DELAYED_EFFECT| EXPERIMENTAL
+	"The amount of space to allocate for the VSL fifo buffer in the "
+	"VSM memory segment.  If you make this too small, "
+	"varnish{ncsa|log} etc will not be able to keep up.  Making it too "
+	"large just costs memory resources.",
+	/* flags */	MUST_RESTART
 )
 
-/* actual location mgt_pool.c */
 PARAM(
-	/* name */	thread_pools,
-	/* type */	uint,
-	/* min */	"1",
+	/* name */	vsm_space,
+	/* type */	bytes,
+	/* min */	"1M",
+	/* max */	"1G",
+	/* def */	"1M",
+	/* units */	"bytes",
+	/* descr */
+	"DEPRECATED: This parameter is ignored.\n"
+	"There is no global limit on amount of shared memory now."
+)
+
+PARAM(
+	/* name */	workspace_backend,
+	/* type */	bytes_u,
+	/* min */	"1k",
 	/* max */	NULL,
-	/* def */	"2",
-	/* units */	"pools",
+	/* def */	"64k",
+	/* units */	"bytes",
 	/* descr */
-	"Number of worker thread pools.\n"
-	"\n"
-	"Increasing the number of worker pools decreases lock "
-	"contention. Each worker pool also has a thread accepting "
-	"new connections, so for very high rates of incoming new "
-	"connections on systems with many cores, increasing the "
-	"worker pools may be required.\n"
-	"\n"
-	"Too many pools waste CPU and RAM resources, and more than one "
-	"pool for each CPU is most likely detrimental to performance.\n"
-	"\n"
-	"Can be increased on the fly, but decreases require a restart to "
-	"take effect.",
-	/* flags */	DELAYED_EFFECT| EXPERIMENTAL
+	"Bytes of HTTP protocol workspace for backend HTTP req/resp.  If "
+	"larger than 4k, use a multiple of 4k for VM efficiency.",
+	/* flags */	DELAYED_EFFECT
 )
 
-/* actual location mgt_pool.c */
 PARAM(
-	/* name */	thread_queue_limit,
-	/* type */	uint,
-	/* min */	"0",
+	/* name */	workspace_client,
+	/* type */	bytes_u,
+	/* min */	"9k",
 	/* max */	NULL,
-	/* def */	"20",
-	/* units */	NULL,
+	/* def */	"64k",
+	/* units */	"bytes",
 	/* descr */
-	"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 "
-	"instead of queued.",
-	/* flags */	EXPERIMENTAL
+	"Bytes of HTTP protocol workspace for clients HTTP req/resp.  Use a "
+	"multiple of 4k for VM efficiency.\n"
+	"For HTTP/2 compliance this must be at least 20k, in order to "
+	"receive fullsize (=16k) frames from the client.   That usually "
+	"happens only in POST/PUT bodies.  For other traffic-patterns "
+	"smaller values work just fine.",
+	/* flags */	DELAYED_EFFECT
 )
 
-/* actual location mgt_pool.c */
 PARAM(
-	/* name */	thread_stats_rate,
-	/* type */	uint,
-	/* min */	"0",
+	/* name */	workspace_session,
+	/* type */	bytes_u,
+	/* min */	"0.25k",
 	/* max */	NULL,
-	/* def */	"10",
-	/* units */	"requests",
+	/* def */	"0.75k",
+	/* units */	"bytes",
 	/* descr */
-	"Worker threads accumulate statistics, and dump these into the "
-	"global stats counters if the lock is free when they finish a job "
-	"(request/fetch etc).\n"
-	"This parameters defines the maximum number of jobs a worker "
-	"thread may handle, before it is forced to dump its accumulated "
-	"stats into the global counters.",
-	/* flags */	EXPERIMENTAL
+	"Allocation size for session structure and workspace.    The "
+	"workspace is primarily used for TCP connection addresses.  If "
+	"larger than 4k, use a multiple of 4k for VM efficiency.",
+	/* flags */	DELAYED_EFFECT
 )
-#endif
 
-#if defined(XYZZY)
-  #error "Temporary macro XYZZY already defined"
-#endif
+PARAM(
+	/* name */	workspace_thread,
+	/* type */	bytes_u,
+	/* min */	"0.25k",
+	/* max */	"8k",
+	/* def */	"2k",
+	/* units */	"bytes",
+	/* descr */
+	"Bytes of auxiliary workspace per thread.\n"
+	"This workspace is used for certain temporary data structures "
+	"during the operation of a worker thread.\n"
+	"One use is for the IO-vectors used during delivery. Setting "
+	"this parameter too low may increase the number of writev() "
+	"syscalls, setting it too high just wastes space.  ~0.1k + "
+	"UIO_MAXIOV * sizeof(struct iovec) (typically = ~16k for 64bit) "
+	"is considered the maximum sensible value under any known "
+	"circumstances (excluding exotic vmod use).",
+	/* flags */	DELAYED_EFFECT
+)
 
-#if defined(SO_RCVTIMEO_WORKS)
-  #define XYZZY 0
-#else
-  #define XYZZY NOT_IMPLEMENTED
-#endif
 PARAM(
-	/* name */	timeout_idle,
-	/* type */	timeout,
-	/* min */	"0.000",
+	/* name */	h2_rx_window_low_water,
+	/* type */	bytes_u,
+	/* min */	"65535",
+	/* max */	"1G",
+	/* def */	"10M",
+	/* units */	"bytes",
+	/* descr */
+	"HTTP2 Receive Window low water mark.\n"
+	"We try to keep the window at least this big\n"
+	"Only affects incoming request bodies (ie: POST, PUT etc.)",
+	/* flags */	WIZARD
+)
+
+PARAM(
+	/* name */	h2_rx_window_increment,
+	/* type */	bytes_u,
+	/* min */	"1M",
+	/* max */	"1G",
+	/* def */	"1M",
+	/* units */	"bytes",
+	/* descr */
+	"HTTP2 Receive Window Increments.\n"
+	"How big credits we send in WINDOW_UPDATE frames\n"
+	"Only affects incoming request bodies (ie: POST, PUT etc.)",
+	/* flags */	WIZARD
+)
+
+PARAM(
+	/* name */	h2_header_table_size,
+	/* type */	bytes_u,
+	/* min */	"0b",
 	/* max */	NULL,
-	/* def */	"5.000",
-	/* units */	"seconds",
+	/* def */	"4k",
+	/* units */	"bytes",
 	/* descr */
-	"Idle timeout for client connections.\n\n"
-	"A connection is considered idle until we have received the full"
-	" request headers.\n\n"
-	"This parameter is particularly relevant for HTTP1 keepalive "
-	" connections which are closed unless the next request is received"
-	" before this timeout is reached.",
-	/* flags */	XYZZY
+	"HTTP2 header table size.\n"
+	"This is the size that will be used for the HPACK dynamic\n"
+	"decoding table."
 )
-#undef XYZZY
 
 PARAM(
-	/* name */	timeout_linger,
-	/* type */	timeout,
-	/* min */	"0.000",
+	/* name */	h2_max_concurrent_streams,
+	/* type */	uint,
+	/* min */	"0",
 	/* max */	NULL,
-	/* def */	"0.050",
-	/* units */	"seconds",
+	/* def */	"100",
+	/* units */	"streams",
+	/* descr */
+	"HTTP2 Maximum number of concurrent streams.\n"
+	"This is the number of requests that can be active\n"
+	"at the same time for a single HTTP2 connection."
+)
+
+PARAM(
+	/* name */	h2_initial_window_size,
+	/* type */	bytes_u,
+	/* min */	"0",
+	/* max */	"2147483647b",
+	/* def */	"65535b",
+	/* units */	"bytes",
 	/* descr */
-	"How long the worker thread lingers on an idle session before "
-	"handing it over to the waiter.\n"
-	"When sessions are reused, as much as half of all reuses happen "
-	"within the first 100 msec of the previous request completing.\n"
-	"Setting this too high results in worker threads not doing "
-	"anything for their keep, setting it too low just means that more "
-	"sessions take a detour around the waiter.",
-	/* flags */	EXPERIMENTAL
+	"HTTP2 initial flow control window size."
 )
 
-#if 0
-/* actual location mgt_param_tbl.c */
 PARAM(
-	/* name */	vcc_allow_inline_c,
-	/* type */	bool,
-	/* min */	NULL,
-	/* max */	NULL,
-	/* def */	"off",
-	/* units */	"bool",
+	/* name */	h2_max_frame_size,
+	/* type */	bytes_u,
+	/* min */	"16k",
+	/* max */	"16777215b",
+	/* def */	"16k",
+	/* units */	"bytes",
 	/* descr */
-	"Allow inline C code in VCL."
+	"HTTP2 maximum per frame payload size we are willing to accept."
 )
 
-/* actual location mgt_param_tbl.c */
 PARAM(
-	/* name */	vcc_err_unref,
-	/* type */	bool,
-	/* min */	NULL,
+	/* name */	h2_max_header_list_size,
+	/* type */	bytes_u,
+	/* min */	"0b",
 	/* max */	NULL,
-	/* def */	"on",
-	/* units */	"bool",
+	/* def */	"2147483647b",
+	/* units */	"bytes",
 	/* descr */
-	"Unreferenced VCL objects result in error."
+	"HTTP2 maximum size of an uncompressed header list."
 )
 
-/* actual location mgt_param_tbl.c */
+#if 0
+/* actual location mgt_param_bits.c*/
+/* see tbl/debug_bits.h */
 PARAM(
-	/* name */	vcc_unsafe_path,
-	/* type */	bool,
+	/* name */	debug,
+	/* type */	debug,
 	/* min */	NULL,
 	/* max */	NULL,
-	/* def */	"on",
-	/* units */	"bool",
+	/* def */	NULL,
+	/* units */	NULL,
 	/* descr */
-	"Allow '/' in vmod & include paths.\n"
-	"Allow 'import ... from ...'."
+	"Enable/Disable various kinds of debugging.\n"
+	"	none	Disable all debugging\n"
+	"\n"
+	"Use +/- prefix to set/reset individual bits:\n"
+	"	req_state	VSL Request state engine\n"
+	"	workspace	VSL Workspace operations\n"
+	"	waiter	VSL Waiter internals\n"
+	"	waitinglist	VSL Waitinglist events\n"
+	"	syncvsl	Make VSL synchronous\n"
+	"	hashedge	Edge cases in Hash\n"
+	"	vclrel	Rapid VCL release\n"
+	"	lurker	VSL Ban lurker\n"
+	"	esi_chop	Chop ESI fetch to bits\n"
+	"	flush_head	Flush after http1 head\n"
+	"	vtc_mode	Varnishtest Mode"
 )
-#endif
 
+/* actual location mgt_param_bits.c*/
+/* See tbl/feature_bits.h */
 PARAM(
-	/* name */	vcl_cooldown,
-	/* type */	timeout,
-	/* min */	"1.000",
+	/* name */	feature,
+	/* type */	feature,
+	/* min */	NULL,
 	/* max */	NULL,
-	/* def */	"600.000",
-	/* units */	"seconds",
+	/* def */	NULL,
+	/* units */	NULL,
 	/* descr */
-	"How long a VCL is kept warm after being replaced as the "
-	"active VCL (granularity approximately 30 seconds)."
+	"Enable/Disable various minor features.\n"
+	"	none	Disable all features.\n"
+	"\n"
+	"Use +/- prefix to enable/disable individual feature:\n"
+	"	short_panic	Short panic message.\n"
+	"	wait_silo	Wait for persistent silo.\n"
+	"	no_coredump	No coredumps.\n"
+	"	esi_ignore_https	Treat HTTPS as HTTP in ESI:includes\n"
+	"	esi_disable_xml_check	Don't check of body looks like XML\n"
+	"	esi_ignore_other_elements	Ignore non-esi XML-elements\n"
+	"	esi_remove_bom	Remove UTF-8 BOM"
 )
 
+/* actual location mgt_param_tbl.c */
 PARAM(
-	/* name */	max_vcl_handling,
+	/* name */	pcre_match_limit,
 	/* type */	uint,
-	/* min */	"0",
-	/* max */	"2",
-	/* def */	"1",
+	/* min */	"1",
+	/* max */	NULL,
+	/* def */	"1.000",
 	/* units */	NULL,
 	/* descr */
-	"Behaviour when attempting to exceed max_vcl loaded VCL.\n"
-	"\n*  0 - Ignore max_vcl parameter.\n"
-	"\n*  1 - Issue warning.\n"
-	"\n*  2 - Refuse loading VCLs."
+	"The limit for the  number of internal matching function calls in "
+	"a pcre_exec() execution."
 )
 
+/* actual location mgt_param_tbl.c */
 PARAM(
-	/* name */	max_vcl,
+	/* name */	pcre_match_limit_recursion,
 	/* type */	uint,
-	/* min */	"0",
+	/* min */	"1",
 	/* max */	NULL,
-	/* def */	"100",
+	/* def */	"1.000",
 	/* units */	NULL,
 	/* descr */
-	"Threshold of loaded VCL programs.  (VCL labels are not counted.)"
-	"  Parameter max_vcl_handling determines behaviour."
+	"The limit for the  number of internal matching function "
+	"recursions in a pcre_exec() execution."
 )
 
+/* actual location mgt_param_tbl.c */
 PARAM(
-	/* name */	vsm_free_cooldown,
-	/* type */	timeout,
-	/* min */	"10.000",
-	/* max */	"600.000",
-	/* def */	"60.000",
-	/* units */	"seconds",
+	/* name */	pool_req,
+	/* type */	poolparam,
+	/* min */	NULL,
+	/* max */	NULL,
+	/* def */	"10,100,10",
+	/* units */	NULL,
 	/* descr */
-	"How long VSM memory is kept warm after a deallocation "
-	"(granularity approximately 2 seconds)."
+	"Parameters for per worker pool request memory pool.\n"
+	MEMPOOL_TEXT
 )
 
+/* actual location mgt_param_tbl.c */
 PARAM(
-	/* name */	vsl_buffer,
-	/* type */	vsl_buffer,
-	/* min */	"267",
+	/* name */	pool_sess,
+	/* type */	poolparam,
+	/* min */	NULL,
 	/* max */	NULL,
-	/* def */	"4k",
-	/* units */	"bytes",
+	/* def */	"10,100,10",
+	/* units */	NULL,
 	/* descr */
-	"Bytes of (req-/backend-)workspace dedicated to buffering VSL "
-	"records.\n"
-	"When this parameter is adjusted, most likely workspace_client "
-	"and workspace_backend will have to be adjusted by the same amount.\n\n"
-	"Setting this too high costs memory, setting it too low will cause "
-	"more VSL flushes and likely increase lock-contention on the VSL "
-	"mutex.",
-	/* flags */	0,
-	/* dyn_min_reason */	"vsl_reclen + 12 bytes"
+	"Parameters for per worker pool session memory pool.\n"
+	MEMPOOL_TEXT
 )
 
-#if 0
-/* actual location mgt_param_bits.c*/
+/* actual location mgt_param_tbl.c */
 PARAM(
-	/* name */	vsl_mask,
-	/* type */	vsl_mask,
+	/* name */	pool_vbo,
+	/* type */	poolparam,
 	/* min */	NULL,
 	/* max */	NULL,
-	/* def */	"default",
+	/* def */	"10,100,10",
 	/* units */	NULL,
 	/* descr */
-	"Mask individual VSL messages from being logged.\n"
-	"	default	Set default value\n"
+	"Parameters for backend object fetch memory pool.\n"
+	MEMPOOL_TEXT
+)
+
+/* actual location mgt_pool.c */
+PARAM(
+	/* name */	thread_pool_add_delay,
+	/* type */	timeout,
+	/* min */	"0.000",
+	/* max */	NULL,
+	/* def */	"0.000",
+	/* units */	"seconds",
+	/* descr */
+	"Wait at least this long after creating a thread.\n"
 	"\n"
-	"Use +/- prefix in front of VSL tag name to unmask/mask "
-	"individual VSL messages."
+	"Some (buggy) systems may need a short (sub-second) delay between "
+	"creating threads.\n"
+	"Set this to a few milliseconds if you see the 'threads_failed' "
+	"counter grow too much.\n"
+	"Setting this too high results in insufficient worker threads.",
+	/* flags */	EXPERIMENTAL
 )
-#endif
 
+/* actual location mgt_pool.c */
 PARAM(
-	/* name */	vsl_reclen,
-	/* type */	vsl_reclen,
-	/* min */	"16b",
+	/* name */	thread_pool_watchdog,
+	/* type */	timeout,
+	/* min */	"0.1",
 	/* max */	NULL,
-	/* def */	"255b",
-	/* units */	"bytes",
+	/* def */	"60.000",
+	/* units */	"seconds",
 	/* descr */
-	"Maximum number of bytes in SHM log record.",
-	/* flags */	0,
-	/* dyn_min_reason */	NULL,
-	/* dyn_max_reason */	"vsl_buffer - 12 bytes"
+	"Thread queue stuck watchdog.\n"
+	"\n"
+	"If no queued work have been released for this long,"
+	" the worker process panics itself.",
+	/* flags */	EXPERIMENTAL
 )
 
+/* actual location mgt_pool.c */
 PARAM(
-	/* name */	vsl_space,
-	/* type */	bytes,
-	/* min */	"1M",
-	/* max */	"4G",
-	/* def */	"80M",
-	/* units */	"bytes",
+	/* name */	thread_pool_destroy_delay,
+	/* type */	timeout,
+	/* min */	"0.010",
+	/* max */	NULL,
+	/* def */	"1.000",
+	/* units */	"seconds",
 	/* descr */
-	"The amount of space to allocate for the VSL fifo buffer in the "
-	"VSM memory segment.  If you make this too small, "
-	"varnish{ncsa|log} etc will not be able to keep up.  Making it too "
-	"large just costs memory resources.",
-	/* flags */	MUST_RESTART
+	"Wait this long after destroying a thread.\n"
+	"This controls the decay of thread pools when idle(-ish).",
+	/* flags */	DELAYED_EFFECT| EXPERIMENTAL
 )
 
+/* actual location mgt_pool.c */
 PARAM(
-	/* name */	vsm_space,
-	/* type */	bytes,
-	/* min */	"1M",
-	/* max */	"1G",
-	/* def */	"1M",
-	/* units */	"bytes",
+	/* name */	thread_pool_fail_delay,
+	/* type */	timeout,
+	/* min */	"0.010",
+	/* max */	NULL,
+	/* def */	"0.200",
+	/* units */	"seconds",
 	/* descr */
-	"DEPRECATED: This parameter is ignored.\n"
-	"There is no global limit on amount of shared memory now."
+	"Wait at least this long after a failed thread creation before "
+	"trying to create another thread.\n"
+	"\n"
+	"Failure to create a worker thread is often a sign that  the end "
+	"is near, because the process is running out of some resource.  "
+	"This delay tries to not rush the end on needlessly.\n"
+	"\n"
+	"If thread creation failures are a problem, check that "
+	"thread_pool_max is not too high.\n"
+	"\n"
+	"It may also help to increase thread_pool_timeout and "
+	"thread_pool_min, to reduce the rate at which treads are destroyed "
+	"and later recreated.",
+	/* flags */	EXPERIMENTAL
 )
 
+/* actual location mgt_pool.c */
 PARAM(
-	/* name */	workspace_backend,
-	/* type */	bytes_u,
-	/* min */	"1k",
+	/* name */	thread_pool_max,
+	/* type */	thread_pool_max,
+	/* min */	"100",
 	/* max */	NULL,
-	/* def */	"64k",
-	/* units */	"bytes",
+	/* def */	"5000",
+	/* units */	"threads",
 	/* descr */
-	"Bytes of HTTP protocol workspace for backend HTTP req/resp.  If "
-	"larger than 4k, use a multiple of 4k for VM efficiency.",
+	"The maximum number of worker threads in each pool.\n"
+	"\n"
+	"Do not set this higher than you have to, since excess worker "
+	"threads soak up RAM and CPU and generally just get in the way of "
+	"getting work done.",
 	/* flags */	DELAYED_EFFECT
 )
 
+/* actual location mgt_pool.c */
 PARAM(
-	/* name */	workspace_client,
-	/* type */	bytes_u,
-	/* min */	"9k",
-	/* max */	NULL,
-	/* def */	"64k",
-	/* units */	"bytes",
+	/* name */	thread_pool_min,
+	/* type */	thread_pool_min,
+	/* min */	NULL,
+	/* max */	"5000",
+	/* def */	"100",
+	/* units */	"threads",
 	/* descr */
-	"Bytes of HTTP protocol workspace for clients HTTP req/resp.  Use a "
-	"multiple of 4k for VM efficiency.\n"
-	"For HTTP/2 compliance this must be at least 20k, in order to "
-	"receive fullsize (=16k) frames from the client.   That usually "
-	"happens only in POST/PUT bodies.  For other traffic-patterns "
-	"smaller values work just fine.",
+	"The minimum number of worker threads in each pool.\n"
+	"\n"
+	"Increasing this may help ramp up faster from low load situations "
+	"or when threads have expired."
+	"Minimum is 10 threads.",
 	/* flags */	DELAYED_EFFECT
 )
 
+/* actual location mgt_pool.c */
 PARAM(
-	/* name */	workspace_session,
-	/* type */	bytes_u,
-	/* min */	"0.25k",
+	/* name */	thread_pool_reserve,
+	/* type */	thread_pool_reserve,
+	/* min */	NULL,
 	/* max */	NULL,
-	/* def */	"0.75k",
-	/* units */	"bytes",
+	/* def */	"0",
+	/* units */	"threads",
 	/* descr */
-	"Allocation size for session structure and workspace.    The "
-	"workspace is primarily used for TCP connection addresses.  If "
-	"larger than 4k, use a multiple of 4k for VM efficiency.",
-	/* flags */	DELAYED_EFFECT
+	"The number of worker threads reserved for vital tasks "
+	"in each pool.\n"
+	"\n"
+	"Tasks may require other tasks to complete (for example, "
+	"client requests may require backend requests). This reserve "
+	"is to ensure that such tasks still get to run even under high "
+	"load.\n"
+	"\n"
+	"Increasing the reserve may help setups with a high number of "
+	"backend requests at the expense of client performance. "
+	"Setting it too high will waste resources by keeping threads "
+	"unused.\n"
+	"\n"
+	"Default is 0 to auto-tune (currently 5% of thread_pool_min).\n"
+	"Minimum is 1 otherwise, maximum is 95% of thread_pool_min.",
+	/* flags */	DELAYED_EFFECT| EXPERIMENTAL
 )
 
+/* actual location mgt_pool.c */
 PARAM(
-	/* name */	workspace_thread,
-	/* type */	bytes_u,
-	/* min */	"0.25k",
-	/* max */	"8k",
-	/* def */	"2k",
+	/* name */	thread_pool_stack,
+	/* type */	bytes,
+	/* min */	"2k",
+	/* max */	NULL,
+	/* def */	"56k",
 	/* units */	"bytes",
 	/* descr */
-	"Bytes of auxiliary workspace per thread.\n"
-	"This workspace is used for certain temporary data structures "
-	"during the operation of a worker thread.\n"
-	"One use is for the IO-vectors used during delivery. Setting "
-	"this parameter too low may increase the number of writev() "
-	"syscalls, setting it too high just wastes space.  ~0.1k + "
-	"UIO_MAXIOV * sizeof(struct iovec) (typically = ~16k for 64bit) "
-	"is considered the maximum sensible value under any known "
-	"circumstances (excluding exotic vmod use).",
-	/* flags */	DELAYED_EFFECT
+	"Worker thread stack size.\n"
+	"This will likely be rounded up to a multiple of 4k (or whatever "
+	"the page_size might be) by the kernel.",
+	/* flags */	EXPERIMENTAL
 )
 
+/* actual location mgt_pool.c */
 PARAM(
-	/* name */	h2_rx_window_low_water,
-	/* type */	bytes_u,
-	/* min */	"65535",
-	/* max */	"1G",
-	/* def */	"10M",
-	/* units */	"bytes",
+	/* name */	thread_pool_timeout,
+	/* type */	timeout,
+	/* min */	"10.000",
+	/* max */	NULL,
+	/* def */	"300.000",
+	/* units */	"seconds",
 	/* descr */
-	"HTTP2 Receive Window low water mark.\n"
-	"We try to keep the window at least this big\n"
-	"Only affects incoming request bodies (ie: POST, PUT etc.)",
-	/* flags */	WIZARD
+	"Thread idle threshold.\n"
+	"\n"
+	"Threads in excess of thread_pool_min, which have been idle for at "
+	"least this long, will be destroyed.",
+	/* flags */	DELAYED_EFFECT| EXPERIMENTAL
 )
 
+/* actual location mgt_pool.c */
 PARAM(
-	/* name */	h2_rx_window_increment,
-	/* type */	bytes_u,
-	/* min */	"1M",
-	/* max */	"1G",
-	/* def */	"1M",
-	/* units */	"bytes",
+	/* name */	thread_pools,
+	/* type */	uint,
+	/* min */	"1",
+	/* max */	NULL,
+	/* def */	"2",
+	/* units */	"pools",
 	/* descr */
-	"HTTP2 Receive Window Increments.\n"
-	"How big credits we send in WINDOW_UPDATE frames\n"
-	"Only affects incoming request bodies (ie: POST, PUT etc.)",
-	/* flags */	WIZARD
+	"Number of worker thread pools.\n"
+	"\n"
+	"Increasing the number of worker pools decreases lock "
+	"contention. Each worker pool also has a thread accepting "
+	"new connections, so for very high rates of incoming new "
+	"connections on systems with many cores, increasing the "
+	"worker pools may be required.\n"
+	"\n"
+	"Too many pools waste CPU and RAM resources, and more than one "
+	"pool for each CPU is most likely detrimental to performance.\n"
+	"\n"
+	"Can be increased on the fly, but decreases require a restart to "
+	"take effect.",
+	/* flags */	DELAYED_EFFECT| EXPERIMENTAL
 )
 
+/* actual location mgt_pool.c */
 PARAM(
-	/* name */	h2_header_table_size,
-	/* type */	bytes_u,
-	/* min */	"0b",
+	/* name */	thread_queue_limit,
+	/* type */	uint,
+	/* min */	"0",
 	/* max */	NULL,
-	/* def */	"4k",
-	/* units */	"bytes",
+	/* def */	"20",
+	/* units */	NULL,
 	/* descr */
-	"HTTP2 header table size.\n"
-	"This is the size that will be used for the HPACK dynamic\n"
-	"decoding table."
+	"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 "
+	"instead of queued.",
+	/* flags */	EXPERIMENTAL
 )
 
+/* actual location mgt_pool.c */
 PARAM(
-	/* name */	h2_max_concurrent_streams,
+	/* name */	thread_stats_rate,
 	/* type */	uint,
 	/* min */	"0",
 	/* max */	NULL,
-	/* def */	"100",
-	/* units */	"streams",
+	/* def */	"10",
+	/* units */	"requests",
 	/* descr */
-	"HTTP2 Maximum number of concurrent streams.\n"
-	"This is the number of requests that can be active\n"
-	"at the same time for a single HTTP2 connection."
+	"Worker threads accumulate statistics, and dump these into the "
+	"global stats counters if the lock is free when they finish a job "
+	"(request/fetch etc).\n"
+	"This parameters defines the maximum number of jobs a worker "
+	"thread may handle, before it is forced to dump its accumulated "
+	"stats into the global counters.",
+	/* flags */	EXPERIMENTAL
 )
 
+/* actual location mgt_param_tbl.c */
 PARAM(
-	/* name */	h2_initial_window_size,
-	/* type */	bytes_u,
-	/* min */	"0",
-	/* max */	"2147483647b",
-	/* def */	"65535b",
-	/* units */	"bytes",
+	/* name */	vcc_allow_inline_c,
+	/* type */	bool,
+	/* min */	NULL,
+	/* max */	NULL,
+	/* def */	"off",
+	/* units */	"bool",
 	/* descr */
-	"HTTP2 initial flow control window size."
+	"Allow inline C code in VCL."
 )
 
+/* actual location mgt_param_tbl.c */
 PARAM(
-	/* name */	h2_max_frame_size,
-	/* type */	bytes_u,
-	/* min */	"16k",
-	/* max */	"16777215b",
-	/* def */	"16k",
-	/* units */	"bytes",
+	/* name */	vcc_err_unref,
+	/* type */	bool,
+	/* min */	NULL,
+	/* max */	NULL,
+	/* def */	"on",
+	/* units */	"bool",
 	/* descr */
-	"HTTP2 maximum per frame payload size we are willing to accept."
+	"Unreferenced VCL objects result in error."
 )
 
+/* actual location mgt_param_tbl.c */
 PARAM(
-	/* name */	h2_max_header_list_size,
-	/* type */	bytes_u,
-	/* min */	"0b",
+	/* name */	vcc_unsafe_path,
+	/* type */	bool,
+	/* min */	NULL,
 	/* max */	NULL,
-	/* def */	"2147483647b",
-	/* units */	"bytes",
+	/* def */	"on",
+	/* units */	"bool",
 	/* descr */
-	"HTTP2 maximum size of an uncompressed header list."
+	"Allow '/' in vmod & include paths.\n"
+	"Allow 'import ... from ...'."
+)
+
+/* actual location mgt_param_bits.c*/
+PARAM(
+	/* name */	vsl_mask,
+	/* type */	vsl_mask,
+	/* min */	NULL,
+	/* max */	NULL,
+	/* def */	"default",
+	/* units */	NULL,
+	/* descr */
+	"Mask individual VSL messages from being logged.\n"
+	"	default	Set default value\n"
+	"\n"
+	"Use +/- prefix in front of VSL tag name to unmask/mask "
+	"individual VSL messages."
 )
+#endif
 
 #undef PARAM
 


More information about the varnish-commit mailing list