1VARNISHD(1) VARNISHD(1)
2
3
4
6 varnishd - HTTP accelerator daemon
7
9 varnishd
10 [-a [name=][listen_address[,PROTO]] [-b [host[:port]|path]] [-C]
11 [-d] [-F] [-f config] [-h type[,options]] [-I clifile] [-i iden‐
12 tity] [-j jail[,jailoptions]] [-l vsl] [-M address:port] [-n
13 workdir] [-P file] [-p param=value] [-r param[,param...]] [-S
14 secret-file] [-s [name=]kind[,options]] [-T address[:port]] [-t
15 TTL] [-V] [-W waiter]
16
17 varnishd [-x parameter|vsl|cli|builtin|optstring]
18
19 varnishd [-?]
20
22 The varnishd daemon accepts HTTP requests from clients, passes them on
23 to a backend server and caches the returned documents to better satisfy
24 future requests for the same document.
25
27 Basic options
28 -a <[name=][listen_address[,PROTO]]>
29 Accept for client requests on the specified listen_address (see
30 below).
31
32 Name is referenced in logs. If name is not specified, "a0",
33 "a1", etc. is used.
34
35 PROTO can be "HTTP" (the default) or "PROXY". Both version 1
36 and 2 of the proxy protocol can be used.
37
38 Multiple -a arguments are allowed.
39
40 If no -a argument is given, the default -a :80 will listen to
41 all IPv4 and IPv6 interfaces.
42
43 -a <[name=][ip_address][:port][,PROTO]>
44 The ip_address can be a host name ("localhost"), an IPv4 dot‐
45 ted-quad ("127.0.0.1") or an IPv6 address enclosed in square
46 brackets ("[::1]")
47
48 If port is not specified, port 80 (http) is used.
49
50 At least one of ip_address or port is required.
51
52 -a <[name=][path][,PROTO][,user=name][,group=name][,mode=octal]>
53 (VCL4.1 and higher)
54
55 Accept connections on a Unix domain socket. Path must be abso‐
56 lute ("/path/to/listen.sock").
57
58 The user, group and mode sub-arguments may be used to specify
59 the permissions of the socket file -- use names for user and
60 group, and a 3-digit octal value for mode.
61
62 -b <[host[:port]|path]>
63 Use the specified host as backend server. If port is not speci‐
64 fied, the default is 8080.
65
66 If the value of -b begins with /, it is interpreted as the abso‐
67 lute path of a Unix domain socket to which Varnish connects. In
68 that case, the value of -b must satisfy the conditions required
69 for the .path field of a backend declaration, see vcl(7). Back‐
70 ends with Unix socket addresses may only be used with VCL ver‐
71 sions >= 4.1.
72
73 -b can be used only once, and not together with f.
74
75 -f config
76 Use the specified VCL configuration file instead of the builtin
77 default. See vcl(7) for details on VCL syntax.
78
79 If a single -f option is used, then the VCL instance loaded from
80 the file is named "boot" and immediately becomes active. If more
81 than one -f option is used, the VCL instances are named "boot0",
82 "boot1" and so forth, in the order corresponding to the -f argu‐
83 ments, and the last one is named "boot", which becomes active.
84
85 Either -b or one or more -f options must be specified, but not
86 both, and they cannot both be left out, unless -d is used to
87 start varnishd in debugging mode. If the empty string is speci‐
88 fied as the sole -f option, then varnishd starts without start‐
89 ing the worker process, and the management process will accept
90 CLI commands. You can also combine an empty -f option with an
91 initialization script (-I option) and the child process will be
92 started if there is an active VCL at the end of the initializa‐
93 tion.
94
95 When used with a relative file name, config is searched in the
96 vcl_path. It is possible to set this path prior to using -f op‐
97 tions with a -p option. During startup, varnishd doesn't com‐
98 plain about unsafe VCL paths: unlike the varnish-cli(7) that
99 could later be accessed remotely, starting varnishd requires lo‐
100 cal privileges.
101
102 -n workdir
103 Runtime directory for the shared memory, compiled VCLs etc.
104
105 In performance critical applications, this directory should be
106 on a RAM backed filesystem.
107
108 Relative paths will be appended to /var/run/ (NB: Binary pack‐
109 ages of Varnish may have adjusted this to the platform.)
110
111 The default value is /var/run/varnishd (NB: as above.)
112
113 Documentation options
114 For these options, varnishd prints information to standard output and
115 exits. When a -x option is used, it must be the only option (it outputs
116 documentation in reStructuredText, aka RST).
117
118 -?
119 Print the usage message.
120
121 -x parameter
122 Print documentation of the runtime parameters (-p options), see
123 List of Parameters.
124
125 -x vsl Print documentation of the tags used in the Varnish shared mem‐
126 ory log, see vsl(7).
127
128 -x cli Print documentation of the command line interface, see var‐
129 nish-cli(7).
130
131 -x builtin
132 Print the contents of the default VCL program builtin.vcl.
133
134 -x optstring
135 Print the optstring parameter to getopt(3) to help writing wrap‐
136 per scripts.
137
138 Operations options
139 -F Do not fork, run in the foreground. Only one of -F or -d can be
140 specified, and -F cannot be used together with -C.
141
142 -T <address[:port]>
143 Offer a management interface on the specified address and port.
144 See varnish-cli(7) for documentation of the management commands.
145 To disable the management interface use none.
146
147 -M <address:port>
148 Connect to this port and offer the command line interface.
149 Think of it as a reverse shell. When running with -M and there
150 is no backend defined the child process (the cache) will not
151 start initially.
152
153 -P file
154 Write the PID of the process to the specified file.
155
156 -i identity
157 Specify the identity of the Varnish server. This can be accessed
158 using server.identity from VCL and with VSM_Name() from utili‐
159 ties. If not specified the output of gethostname(3) is used.
160
161 -I clifile
162 Execute the management commands in the file given as clifile be‐
163 fore the the worker process starts, see CLI Command File.
164
165 Tuning options
166 -t TTL Specifies the default time to live (TTL) for cached objects.
167 This is a shortcut for specifying the default_ttl run-time pa‐
168 rameter.
169
170 -p <param=value>
171 Set the parameter specified by param to the specified value, see
172 List of Parameters for details. This option can be used multiple
173 times to specify multiple parameters.
174
175 -s <[name=]type[,options]>
176 Use the specified storage backend. See Storage Backend section.
177
178 This option can be used multiple times to specify multiple stor‐
179 age files. Name is referenced in logs, VCL, statistics, etc. If
180 name is not specified, "s0", "s1" and so forth is used.
181
182 -l <vsl>
183 Specifies size of the space for the VSL records, shorthand for
184 -p vsl_space=<vsl>. Scaling suffixes like 'K' and 'M' can be
185 used up to (G)igabytes. See vsl_space for more information.
186
187 Security options
188 -r <param[,param...]>
189 Make the listed parameters read only. This gives the system ad‐
190 ministrator a way to limit what the Varnish CLI can do. Con‐
191 sider making parameters such as cc_command, vcc_allow_inline_c
192 and vmod_path read only as these can potentially be used to es‐
193 calate privileges from the CLI.
194
195 -S secret-file
196 Path to a file containing a secret used for authorizing access
197 to the management port. To disable authentication use none.
198
199 If this argument is not provided, a secret drawn from the system
200 PRNG will be written to a file called _.secret in the working
201 directory (see opt_n) with default ownership and permissions of
202 the user having started varnish.
203
204 Thus, users wishing to delegate control over varnish will proba‐
205 bly want to create a custom secret file with appropriate permis‐
206 sions (ie. readable by a unix group to delegate control to).
207
208 -j <jail[,jailoptions]>
209 Specify the jailing mechanism to use. See Jail section.
210
211 Advanced, development and debugging options
212 -d Enables debugging mode: The parent process runs in the fore‐
213 ground with a CLI connection on stdin/stdout, and the child
214 process must be started explicitly with a CLI command. Terminat‐
215 ing the parent process will also terminate the child.
216
217 Only one of -d or -F can be specified, and -d cannot be used to‐
218 gether with -C.
219
220 -C Print VCL code compiled to C language and exit. Specify the VCL
221 file to compile with the -f option. Either -f or -b must be used
222 with -C, and -C cannot be used with -F or -d.
223
224 -V Display the version number and exit. This must be the only op‐
225 tion.
226
227 -h <type[,options]>
228 Specifies the hash algorithm. See Hash Algorithm section for a
229 list of supported algorithms.
230
231 -W waiter
232 Specifies the waiter type to use.
233
234 Hash Algorithm
235 The following hash algorithms are available:
236
237 -h critbit
238 self-scaling tree structure. The default hash algorithm in Var‐
239 nish Cache 2.1 and onwards. In comparison to a more traditional
240 B tree the critbit tree is almost completely lockless. Do not
241 change this unless you are certain what you're doing.
242
243 -h simple_list
244 A simple doubly-linked list. Not recommended for production
245 use.
246
247 -h <classic[,buckets]>
248 A standard hash table. The hash key is the CRC32 of the object's
249 URL modulo the size of the hash table. Each table entry points
250 to a list of elements which share the same hash key. The buckets
251 parameter specifies the number of entries in the hash table.
252 The default is 16383.
253
254 Storage Backend
255 The argument format to define storage backends is:
256
257 -s <[name]=kind[,options]>
258 If name is omitted, Varnish will name storages sN, starting with
259 s0 and incrementing N for every new storage.
260
261 For kind and options see details below.
262
263 Storages can be used in vcl as storage.name, so, for example if myStor‐
264 age was defined by -s myStorage=malloc,5G, it could be used in VCL like
265 so:
266
267 set beresp.storage = storage.myStorage;
268
269 A special name is Transient which is the default storage for un‐
270 cacheable objects as resulting from a pass, hit-for-miss or
271 hit-for-pass.
272
273 If no -s options are given, the default is:
274
275 -s default,100m
276
277 If no Transient storage is defined, the default is an unbound default
278 storage as if defined as:
279
280 -s Transient=default
281
282 The following storage types and options are available:
283
284 -s <default[,size]>
285 The default storage type resolves to umem where available and
286 malloc otherwise.
287
288 -s <malloc[,size]>
289 malloc is a memory based backend.
290
291 -s <umem[,size]>
292 umem is a storage backend which is more efficient than malloc on
293 platforms where it is available.
294
295 See the section on umem in chapter Storage backends of The Var‐
296 nish Users Guide for details.
297
298 -s <file,path[,size[,granularity[,advice]]]>
299 The file backend stores data in a file on disk. The file will be
300 accessed using mmap. Note that this storage provide no cache
301 persistence.
302
303 The path is mandatory. If path points to a directory, a tempo‐
304 rary file will be created in that directory and immediately un‐
305 linked. If path points to a non-existing file, the file will be
306 created.
307
308 If size is omitted, and path points to an existing file with a
309 size greater than zero, the size of that file will be used. If
310 not, an error is reported.
311
312 Granularity sets the allocation block size. Defaults to the sys‐
313 tem page size or the filesystem block size, whichever is larger.
314
315 Advice tells the kernel how varnishd expects to use this mapped
316 region so that the kernel can choose the appropriate read-ahead
317 and caching techniques. Possible values are normal, random and
318 sequential, corresponding to MADV_NORMAL, MADV_RANDOM and
319 MADV_SEQUENTIAL madvise() advice argument, respectively. De‐
320 faults to random.
321
322 -s <persistent,path,size>
323 Persistent storage. Varnish will store objects in a file in a
324 manner that will secure the survival of most of the objects in
325 the event of a planned or unplanned shutdown of Varnish. The
326 persistent storage backend has multiple issues with it and will
327 likely be removed from a future version of Varnish.
328
329 Jail
330 Varnish jails are a generalization over various platform specific meth‐
331 ods to reduce the privileges of varnish processes. They may have spe‐
332 cific options. Available jails are:
333
334 -j <solaris[,worker=`privspec`]>
335 Reduce privileges(5) for varnishd and sub-process to the mini‐
336 mally required set. Only available on platforms which have the
337 setppriv(2) call.
338
339 The optional worker argument can be used to pass a privi‐
340 lege-specification (see ppriv(1)) by which to extend the effec‐
341 tive set of the varnish worker process. While extended privi‐
342 leges may be required by custom vmods, it is always the more se‐
343 cure to not use the worker option.
344
345 Example to grant basic privileges to the worker process:
346
347 -j solaris,worker=basic
348
349 -j <unix[,user=`user`][,ccgroup=`group`][,workuser=`user`]>
350 Default on all other platforms when varnishd is started with an
351 effective uid of 0 ("as root").
352
353 With the unix jail mechanism activated, varnish will switch to
354 an alternative user for subprocesses and change the effective
355 uid of the master process whenever possible.
356
357 The optional user argument specifies which alternative user to
358 use. It defaults to varnish.
359
360 The optional ccgroup argument specifies a group to add to var‐
361 nish subprocesses requiring access to a c-compiler. There is no
362 default.
363
364 The optional workuser argument specifies an alternative user to
365 use for the worker process. It defaults to vcache.
366
367 -j none
368 last resort jail choice: With jail mechanism none, varnish will
369 run all processes with the privileges it was started with.
370
371 Management Interface
372 If the -T option was specified, varnishd will offer a command-line man‐
373 agement interface on the specified address and port. The recommended
374 way of connecting to the command-line management interface is through
375 varnishadm(1).
376
377 The commands available are documented in varnish-cli(7).
378
379 CLI Command File
380 The -I option makes it possible to run arbitrary management commands
381 when varnishd is launched, before the worker process is started. In
382 particular, this is the way to load configurations, apply labels to
383 them, and make a VCL instance active that uses those labels on startup:
384
385 vcl.load panic /etc/varnish_panic.vcl
386 vcl.load siteA0 /etc/varnish_siteA.vcl
387 vcl.load siteB0 /etc/varnish_siteB.vcl
388 vcl.load siteC0 /etc/varnish_siteC.vcl
389 vcl.label siteA siteA0
390 vcl.label siteB siteB0
391 vcl.label siteC siteC0
392 vcl.load main /etc/varnish_main.vcl
393 vcl.use main
394
395 Every line in the file, including the last line, must be terminated by
396 a newline or carriage return.
397
398 If a command in the file is prefixed with '-', failure will not abort
399 the startup.
400
401 Note that it is necessary to include an explicit vcl.use command to se‐
402 lect which VCL should be the active VCL when relying on CLI Command
403 File to load the configurations at startup.
404
406 Run Time Parameter Flags
407 Runtime parameters are marked with shorthand flags to avoid repeating
408 the same text over and over in the table below. The meaning of the
409 flags are:
410
411 • experimental
412
413 We have no solid information about good/bad/optimal values for this
414 parameter. Feedback with experience and observations are most wel‐
415 come.
416
417 • delayed
418
419 This parameter can be changed on the fly, but will not take effect
420 immediately.
421
422 • restart
423
424 The worker process must be stopped and restarted, before this parame‐
425 ter takes effect.
426
427 • reload
428
429 The VCL programs must be reloaded for this parameter to take effect.
430
431 • wizard
432
433 Do not touch unless you really know what you're doing.
434
435 • only_root
436
437 Only works if varnishd is running as root.
438
439 Default Value Exceptions on 32 bit Systems
440 Be aware that on 32 bit systems, certain default or maximum values are
441 reduced relative to the values listed below, in order to conserve VM
442 space:
443
444 • workspace_client: 24k
445
446 • workspace_backend: 20k
447
448 • http_resp_size: 8k
449
450 • http_req_size: 12k
451
452 • gzip_buffer: 4k
453
454 • vsl_buffer: 4k
455
456 • vsl_space: 1G (maximum)
457
458 • thread_pool_stack: 64k
459
460 List of Parameters
461 This text is produced from the same text you will find in the CLI if
462 you use the param.show command:
463
464 accept_filter
465 NB: This parameter depends on a feature which is not available on all
466 platforms.
467
468 • Units: bool
469
470 • Default: on (if your platform supports accept filters)
471
472 Enable kernel accept-filters. This may require a kernel module to be
473 loaded to have an effect when enabled.
474
475 Enabling accept_filter may prevent some requests to reach Varnish in
476 the first place. Malformed requests may go unnoticed and not increase
477 the client_req_400 counter. GET or HEAD requests with a body may be
478 blocked altogether.
479
480 acceptor_sleep_decay
481 • Default: 0.9
482
483 • Minimum: 0
484
485 • Maximum: 1
486
487 • Flags: experimental
488
489 If we run out of resources, such as file descriptors or worker threads,
490 the acceptor will sleep between accepts. This parameter (multiplica‐
491 tively) reduce the sleep duration for each successful accept. (ie: 0.9
492 = reduce by 10%)
493
494 acceptor_sleep_incr
495 • Units: seconds
496
497 • Default: 0.000
498
499 • Minimum: 0.000
500
501 • Maximum: 1.000
502
503 • Flags: experimental
504
505 If we run out of resources, such as file descriptors or worker threads,
506 the acceptor will sleep between accepts. This parameter control how
507 much longer we sleep, each time we fail to accept a new connection.
508
509 acceptor_sleep_max
510 • Units: seconds
511
512 • Default: 0.050
513
514 • Minimum: 0.000
515
516 • Maximum: 10.000
517
518 • Flags: experimental
519
520 If we run out of resources, such as file descriptors or worker threads,
521 the acceptor will sleep between accepts. This parameter limits how
522 long it can sleep between attempts to accept new connections.
523
524 auto_restart
525 • Units: bool
526
527 • Default: on
528
529 Automatically restart the child/worker process if it dies.
530
531 backend_idle_timeout
532 • Units: seconds
533
534 • Default: 60.000
535
536 • Minimum: 1.000
537
538 Timeout before we close unused backend connections.
539
540 backend_local_error_holddown
541 • Units: seconds
542
543 • Default: 10.000
544
545 • Minimum: 0.000
546
547 • Flags: experimental
548
549 When connecting to backends, certain error codes (EADDRNOTAVAIL, EAC‐
550 CESS, EPERM) signal a local resource shortage or configuration issue
551 for which retrying connection attempts may worsen the situation due to
552 the complexity of the operations involved in the kernel. This parame‐
553 ter prevents repeated connection attempts for the configured duration.
554
555 backend_remote_error_holddown
556 • Units: seconds
557
558 • Default: 0.250
559
560 • Minimum: 0.000
561
562 • Flags: experimental
563
564 When connecting to backends, certain error codes (ECONNREFUSED, ENETUN‐
565 REACH) signal fundamental connection issues such as the backend not ac‐
566 cepting connections or routing problems for which repeated connection
567 attempts are considered useless This parameter prevents repeated con‐
568 nection attempts for the configured duration.
569
570 ban_cutoff
571 • Units: bans
572
573 • Default: 0
574
575 • Minimum: 0
576
577 • Flags: experimental
578
579 Expurge long tail content from the cache to keep the number of bans be‐
580 low this value. 0 disables.
581
582 When this parameter is set to a non-zero value, the ban lurker contin‐
583 ues to work the ban list as usual top to bottom, but when it reaches
584 the ban_cutoff-th ban, it treats all objects as if they matched a ban
585 and expurges them from cache. As actively used objects get tested
586 against the ban list at request time and thus are likely to be associ‐
587 ated with bans near the top of the ban list, with ban_cutoff, least re‐
588 cently accessed objects (the "long tail") are removed.
589
590 This parameter is a safety net to avoid bad response times due to bans
591 being tested at lookup time. Setting a cutoff trades response time for
592 cache efficiency. The recommended value is proportional to
593 rate(bans_lurker_tests_tested) / n_objects while the ban lurker is
594 working, which is the number of bans the system can sustain. The addi‐
595 tional latency due to request ban testing is in the order of ban_cutoff
596 / rate(bans_lurker_tests_tested). For example, for
597 rate(bans_lurker_tests_tested) = 2M/s and a tolerable latency of 100ms,
598 a good value for ban_cutoff may be 200K.
599
600 ban_dups
601 • Units: bool
602
603 • Default: on
604
605 Eliminate older identical bans when a new ban is added. This saves CPU
606 cycles by not comparing objects to identical bans. This is a waste of
607 time if you have many bans which are never identical.
608
609 ban_lurker_age
610 • Units: seconds
611
612 • Default: 60.000
613
614 • Minimum: 0.000
615
616 The ban lurker will ignore bans until they are this old. When a ban is
617 added, the active traffic will be tested against it as part of object
618 lookup. Because many applications issue bans in bursts, this parameter
619 holds the ban-lurker off until the rush is over. This should be set to
620 the approximate time which a ban-burst takes.
621
622 ban_lurker_batch
623 • Default: 1000
624
625 • Minimum: 1
626
627 The ban lurker sleeps ${ban_lurker_sleep} after examining this many ob‐
628 jects. Use this to pace the ban-lurker if it eats too many resources.
629
630 ban_lurker_holdoff
631 • Units: seconds
632
633 • Default: 0.010
634
635 • Minimum: 0.000
636
637 • Flags: experimental
638
639 How long the ban lurker sleeps when giving way to lookup due to lock
640 contention.
641
642 ban_lurker_sleep
643 • Units: seconds
644
645 • Default: 0.010
646
647 • Minimum: 0.000
648
649 How long the ban lurker sleeps after examining ${ban_lurker_batch} ob‐
650 jects. Use this to pace the ban-lurker if it eats too many resources.
651 A value of zero will disable the ban lurker entirely.
652
653 between_bytes_timeout
654 • Units: seconds
655
656 • Default: 60.000
657
658 • Minimum: 0.000
659
660 We only wait for this many seconds between bytes received from the
661 backend before giving up the fetch. VCL values, per backend or per
662 backend request take precedence. This parameter does not apply to
663 pipe'ed requests.
664
665 cc_command
666 NB: The actual default value for this parameter depends on the Varnish
667 build environment and options.
668
669 • Default: exec $CC $CFLAGS %w -shared -o %o %s
670
671 • Flags: must_reload
672
673 The command used for compiling the C source code to a dlopen(3) load‐
674 able object. The following expansions can be used:
675
676 • %s: the source file name
677
678 • %o: the output file name
679
680 • %w: the cc_warnings parameter
681
682 • %d: the raw default cc_command
683
684 • %D: the expanded default cc_command
685
686 • %n: the working directory (-n option)
687
688 • %%: a percent sign
689
690 Unknown percent expansion sequences are ignored, and to avoid future
691 incompatibilities percent characters should be escaped with a double
692 percent sequence.
693
694 The %d and %D expansions allow passing the parameter's default value to
695 a wrapper script to perform additional processing.
696
697 cc_warnings
698 NB: The actual default value for this parameter depends on the Varnish
699 build environment and options.
700
701 • Default: -Wall -Werror
702
703 • Flags: must_reload
704
705 Warnings used when compiling the C source code with the cc_command pa‐
706 rameter. By default, VCL is compiled with the same set of warnings as
707 Varnish itself.
708
709 cli_limit
710 • Units: bytes
711
712 • Default: 48k
713
714 • Minimum: 128b
715
716 • Maximum: 99999999b
717
718 Maximum size of CLI response. If the response exceeds this limit, the
719 response code will be 201 instead of 200 and the last line will indi‐
720 cate the truncation.
721
722 cli_timeout
723 • Units: seconds
724
725 • Default: 60.000
726
727 • Minimum: 0.000
728
729 Timeout for the child's replies to CLI requests from the mgt_param.
730
731 clock_skew
732 • Units: seconds
733
734 • Default: 10
735
736 • Minimum: 0
737
738 How much clockskew we are willing to accept between the backend and our
739 own clock.
740
741 clock_step
742 • Units: seconds
743
744 • Default: 1.000
745
746 • Minimum: 0.000
747
748 How much observed clock step we are willing to accept before we panic.
749
750 connect_timeout
751 • Units: seconds
752
753 • Default: 3.500
754
755 • Minimum: 0.000
756
757 Default connection timeout for backend connections. We only try to con‐
758 nect to the backend for this many seconds before giving up. VCL can
759 override this default value for each backend and backend request.
760
761 critbit_cooloff
762 • Units: seconds
763
764 • Default: 180.000
765
766 • Minimum: 60.000
767
768 • Maximum: 254.000
769
770 • Flags: wizard
771
772 How long the critbit hasher keeps deleted objheads on the cooloff list.
773
774 debug
775 • Default: none
776
777 Enable/Disable various kinds of debugging.
778
779 none Disable all debugging
780
781 Use +/- prefix to set/reset individual bits:
782
783 req_state
784 VSL Request state engine
785
786 workspace
787 VSL Workspace operations
788
789 waitinglist
790 VSL Waitinglist events
791
792 syncvsl
793 Make VSL synchronous
794
795 hashedge
796 Edge cases in Hash
797
798 vclrel Rapid VCL release
799
800 lurker VSL Ban lurker
801
802 esi_chop
803 Chop ESI fetch to bits
804
805 flush_head
806 Flush after http1 head
807
808 vtc_mode
809 Varnishtest Mode
810
811 witness
812 Emit WITNESS lock records
813
814 vsm_keep
815 Keep the VSM file on restart
816
817 slow_acceptor
818 Slow down Acceptor
819
820 h2_nocheck
821 Disable various H2 checks
822
823 vmod_so_keep
824 Keep copied VMOD libraries
825
826 processors
827 Fetch/Deliver processors
828
829 protocol
830 Protocol debugging
831
832 vcl_keep
833 Keep VCL C and so files
834
835 lck Additional lock statistics
836
837 default_grace
838 • Units: seconds
839
840 • Default: 10.000
841
842 • Minimum: 0.000
843
844 • Flags: obj_sticky
845
846 Default grace period. We will deliver an object this long after it has
847 expired, provided another thread is attempting to get a new copy.
848
849 default_keep
850 • Units: seconds
851
852 • Default: 0.000
853
854 • Minimum: 0.000
855
856 • Flags: obj_sticky
857
858 Default keep period. We will keep a useless object around this long,
859 making it available for conditional backend fetches. That means that
860 the object will be removed from the cache at the end of ttl+grace+keep.
861
862 default_ttl
863 • Units: seconds
864
865 • Default: 120.000
866
867 • Minimum: 0.000
868
869 • Flags: obj_sticky
870
871 The TTL assigned to objects if neither the backend nor the VCL code as‐
872 signs one.
873
874 experimental
875 • Default: none
876
877 Enable/Disable experimental features.
878
879 none Disable all experimental features
880
881 Use +/- prefix to set/reset individual bits:
882
883 drop_pools
884 Drop thread pools
885
886 feature
887 • Default: +validate_headers
888
889 Enable/Disable various minor features.
890
891 default
892 Set default value
893
894 none Disable all features.
895
896 Use +/- prefix to enable/disable individual feature:
897
898 http2 Enable HTTP/2 protocol support.
899
900 short_panic
901 Short panic message.
902
903 no_coredump
904 No coredumps. Must be set before child process starts.
905
906 https_scheme
907 Extract host from full URI in the HTTP/1 request line, if the
908 scheme is https.
909
910 http_date_postel
911 Tolerate non compliant timestamp headers like Date, Last-Mod‐
912 ified, Expires etc.
913
914 esi_ignore_https
915 Convert <esi:include src"https://... to http://...
916
917 esi_disable_xml_check
918 Allow ESI processing on non-XML ESI bodies
919
920 esi_ignore_other_elements
921 Ignore XML syntax errors in ESI bodies.
922
923 esi_remove_bom
924 Ignore UTF-8 BOM in ESI bodies.
925
926 esi_include_onerror
927 Parse the onerror attribute of <esi:include> tags.
928
929 wait_silo
930 Wait for persistent silos to completely load before serving
931 requests.
932
933 validate_headers
934 Validate all header set operations to conform to RFC7230.
935
936 busy_stats_rate
937 Make busy workers comply with thread_stats_rate.
938
939 fetch_chunksize
940 • Units: bytes
941
942 • Default: 16k
943
944 • Minimum: 4k
945
946 • Flags: experimental
947
948 The default chunksize used by fetcher. This should be bigger than the
949 majority of objects with short TTLs. Internal limits in the stor‐
950 age_file module makes increases above 128kb a dubious idea.
951
952 fetch_maxchunksize
953 • Units: bytes
954
955 • Default: 0.25G
956
957 • Minimum: 64k
958
959 • Flags: experimental
960
961 The maximum chunksize we attempt to allocate from storage. Making this
962 too large may cause delays and storage fragmentation.
963
964 first_byte_timeout
965 • Units: seconds
966
967 • Default: 60.000
968
969 • Minimum: 0.000
970
971 Default timeout for receiving first byte from backend. We only wait for
972 this many seconds for the first byte before giving up. VCL can over‐
973 ride this default value for each backend and backend request. This pa‐
974 rameter does not apply to pipe'ed requests.
975
976 gzip_buffer
977 • Units: bytes
978
979 • Default: 32k
980
981 • Minimum: 2k
982
983 • Flags: experimental
984
985 Size of malloc buffer used for gzip processing. These buffers are used
986 for in-transit data, for instance gunzip'ed data being sent to a
987 client.Making this space to small results in more overhead, writes to
988 sockets etc, making it too big is probably just a waste of memory.
989
990 gzip_level
991 • Default: 6
992
993 • Minimum: 0
994
995 • Maximum: 9
996
997 Gzip compression level: 0=debug, 1=fast, 9=best
998
999 gzip_memlevel
1000 • Default: 8
1001
1002 • Minimum: 1
1003
1004 • Maximum: 9
1005
1006 Gzip memory level 1=slow/least, 9=fast/most compression. Memory impact
1007 is 1=1k, 2=2k, ... 9=256k.
1008
1009 h2_header_table_size
1010 • Units: bytes
1011
1012 • Default: 4k
1013
1014 • Minimum: 0b
1015
1016 HTTP2 header table size. This is the size that will be used for the
1017 HPACK dynamic decoding table.
1018
1019 h2_initial_window_size
1020 • Units: bytes
1021
1022 • Default: 65535b
1023
1024 • Minimum: 65535b
1025
1026 • Maximum: 2147483647b
1027
1028 HTTP2 initial flow control window size.
1029
1030 h2_max_concurrent_streams
1031 • Units: streams
1032
1033 • Default: 100
1034
1035 • Minimum: 0
1036
1037 HTTP2 Maximum number of concurrent streams. This is the number of re‐
1038 quests that can be active at the same time for a single HTTP2 connec‐
1039 tion.
1040
1041 h2_max_frame_size
1042 • Units: bytes
1043
1044 • Default: 16k
1045
1046 • Minimum: 16k
1047
1048 • Maximum: 16777215b
1049
1050 HTTP2 maximum per frame payload size we are willing to accept.
1051
1052 h2_max_header_list_size
1053 • Units: bytes
1054
1055 • Default: 2147483647b
1056
1057 • Minimum: 0b
1058
1059 HTTP2 maximum size of an uncompressed header list.
1060
1061 h2_rx_window_increment
1062 • Units: bytes
1063
1064 • Default: 1M
1065
1066 • Minimum: 1M
1067
1068 • Maximum: 1G
1069
1070 • Flags: wizard
1071
1072 HTTP2 Receive Window Increments. How big credits we send in WINDOW_UP‐
1073 DATE frames Only affects incoming request bodies (ie: POST, PUT etc.)
1074
1075 h2_rx_window_low_water
1076 • Units: bytes
1077
1078 • Default: 10M
1079
1080 • Minimum: 65535b
1081
1082 • Maximum: 1G
1083
1084 • Flags: wizard
1085
1086 HTTP2 Receive Window low water mark. We try to keep the window at
1087 least this big Only affects incoming request bodies (ie: POST, PUT
1088 etc.)
1089
1090 h2_rxbuf_storage
1091 • Default: Transient
1092
1093 • Flags: must_restart
1094
1095 The name of the storage backend that HTTP/2 receive buffers should be
1096 allocated from.
1097
1098 http1_iovs
1099 • Units: struct iovec (=16 bytes)
1100
1101 • Default: 64
1102
1103 • Minimum: 5
1104
1105 • Maximum: 1024
1106
1107 • Flags: wizard
1108
1109 Number of io vectors to allocate for HTTP1 protocol transmission. A
1110 HTTP1 header needs 7 + 2 per HTTP header field. Allocated from
1111 workspace_thread.
1112
1113 http_gzip_support
1114 • Units: bool
1115
1116 • Default: on
1117
1118 Enable gzip support. When enabled Varnish request compressed objects
1119 from the backend and store them compressed. If a client does not sup‐
1120 port gzip encoding Varnish will uncompress compressed objects on de‐
1121 mand. Varnish will also rewrite the Accept-Encoding header of clients
1122 indicating support for gzip to:
1123 Accept-Encoding: gzip
1124
1125 Clients that do not support gzip will have their Accept-Encoding header
1126 removed. For more information on how gzip is implemented please see the
1127 chapter on gzip in the Varnish reference.
1128
1129 When gzip support is disabled the variables beresp.do_gzip and
1130 beresp.do_gunzip have no effect in VCL.
1131
1132 http_max_hdr
1133 • Units: header lines
1134
1135 • Default: 64
1136
1137 • Minimum: 32
1138
1139 • Maximum: 65535
1140
1141 Maximum number of HTTP header lines we allow in
1142 {req|resp|bereq|beresp}.http (obj.http is autosized to the exact number
1143 of headers). Cheap, ~20 bytes, in terms of workspace memory. Note
1144 that the first line occupies five header lines.
1145
1146 http_range_support
1147 • Units: bool
1148
1149 • Default: on
1150
1151 Enable support for HTTP Range headers.
1152
1153 http_req_hdr_len
1154 • Units: bytes
1155
1156 • Default: 8k
1157
1158 • Minimum: 40b
1159
1160 Maximum length of any HTTP client request header we will allow. The
1161 limit is inclusive its continuation lines.
1162
1163 http_req_size
1164 • Units: bytes
1165
1166 • Default: 32k
1167
1168 • Minimum: 0.25k
1169
1170 Maximum number of bytes of HTTP client request we will deal with. This
1171 is a limit on all bytes up to the double blank line which ends the HTTP
1172 request. The memory for the request is allocated from the client
1173 workspace (param: workspace_client) and this parameter limits how much
1174 of that the request is allowed to take up.
1175
1176 http_resp_hdr_len
1177 • Units: bytes
1178
1179 • Default: 8k
1180
1181 • Minimum: 40b
1182
1183 Maximum length of any HTTP backend response header we will allow. The
1184 limit is inclusive its continuation lines.
1185
1186 http_resp_size
1187 • Units: bytes
1188
1189 • Default: 32k
1190
1191 • Minimum: 0.25k
1192
1193 Maximum number of bytes of HTTP backend response we will deal with.
1194 This is a limit on all bytes up to the double blank line which ends the
1195 HTTP response. The memory for the response is allocated from the back‐
1196 end workspace (param: workspace_backend) and this parameter limits how
1197 much of that the response is allowed to take up.
1198
1199 idle_send_timeout
1200 • Units: seconds
1201
1202 • Default: 60.000
1203
1204 • Minimum: 0.000
1205
1206 • Flags: delayed
1207
1208 Send timeout for individual pieces of data on client connections. May
1209 get extended if 'send_timeout' applies.
1210
1211 When this timeout is hit, the session is closed.
1212
1213 See the man page for setsockopt(2) or socket(7) under SO_SNDTIMEO for
1214 more information.
1215
1216 listen_depth
1217 • Units: connections
1218
1219 • Default: 1024
1220
1221 • Minimum: 0
1222
1223 • Flags: must_restart
1224
1225 Listen queue depth.
1226
1227 lru_interval
1228 • Units: seconds
1229
1230 • Default: 2.000
1231
1232 • Minimum: 0.000
1233
1234 • Flags: experimental
1235
1236 Grace period before object moves on LRU list. Objects are only moved
1237 to the front of the LRU list if they have not been moved there already
1238 inside this timeout period. This reduces the amount of lock operations
1239 necessary for LRU list access.
1240
1241 max_esi_depth
1242 • Units: levels
1243
1244 • Default: 5
1245
1246 • Minimum: 0
1247
1248 Maximum depth of esi:include processing.
1249
1250 max_restarts
1251 • Units: restarts
1252
1253 • Default: 4
1254
1255 • Minimum: 0
1256
1257 Upper limit on how many times a request can restart.
1258
1259 max_retries
1260 • Units: retries
1261
1262 • Default: 4
1263
1264 • Minimum: 0
1265
1266 Upper limit on how many times a backend fetch can retry.
1267
1268 max_vcl
1269 • Default: 100
1270
1271 • Minimum: 0
1272
1273 Threshold of loaded VCL programs. (VCL labels are not counted.) Pa‐
1274 rameter max_vcl_handling determines behaviour.
1275
1276 max_vcl_handling
1277 • Default: 1
1278
1279 • Minimum: 0
1280
1281 • Maximum: 2
1282
1283 Behaviour when attempting to exceed max_vcl loaded VCL.
1284
1285 • 0 - Ignore max_vcl parameter.
1286
1287 • 1 - Issue warning.
1288
1289 • 2 - Refuse loading VCLs.
1290
1291 nuke_limit
1292 • Units: allocations
1293
1294 • Default: 50
1295
1296 • Minimum: 0
1297
1298 • Flags: experimental
1299
1300 Maximum number of objects we attempt to nuke in order to make space for
1301 a object body.
1302
1303 pcre2_depth_limit
1304 • Default: 20
1305
1306 • Minimum: 1
1307
1308 The recursion depth-limit for the internal match logic in a
1309 pcre2_match().
1310
1311 (See: pcre2_set_depth_limit() in pcre2 docs.)
1312
1313 This puts an upper limit on the amount of stack used by PCRE2 for cer‐
1314 tain classes of regular expressions.
1315
1316 We have set the default value low in order to prevent crashes, at the
1317 cost of possible regexp matching failures.
1318
1319 Matching failures will show up in the log as VCL_Error messages.
1320
1321 pcre2_jit_compilation
1322 • Units: bool
1323
1324 • Default: on
1325
1326 Use the pcre2 JIT compiler if available.
1327
1328 pcre2_match_limit
1329 • Default: 10000
1330
1331 • Minimum: 1
1332
1333 The limit for the number of calls to the internal match logic in
1334 pcre2_match().
1335
1336 (See: pcre2_set_match_limit() in pcre2 docs.)
1337
1338 This parameter limits how much CPU time regular expression matching can
1339 soak up.
1340
1341 ping_interval
1342 • Units: seconds
1343
1344 • Default: 3
1345
1346 • Minimum: 0
1347
1348 • Flags: must_restart
1349
1350 Interval between pings from parent to child. Zero will disable pinging
1351 entirely, which makes it possible to attach a debugger to the child.
1352
1353 pipe_sess_max
1354 • Units: connections
1355
1356 • Default: 0
1357
1358 • Minimum: 0
1359
1360 Maximum number of sessions dedicated to pipe transactions.
1361
1362 pipe_timeout
1363 • Units: seconds
1364
1365 • Default: 60.000
1366
1367 • Minimum: 0.000
1368
1369 Idle timeout for PIPE sessions. If nothing have been received in either
1370 direction for this many seconds, the session is closed.
1371
1372 pool_req
1373 • Default: 10,100,10
1374
1375 Parameters for per worker pool request memory pool.
1376
1377 The three numbers are:
1378
1379 min_pool
1380 minimum size of free pool.
1381
1382 max_pool
1383 maximum size of free pool.
1384
1385 max_age
1386 max age of free element.
1387
1388 pool_sess
1389 • Default: 10,100,10
1390
1391 Parameters for per worker pool session memory pool.
1392
1393 The three numbers are:
1394
1395 min_pool
1396 minimum size of free pool.
1397
1398 max_pool
1399 maximum size of free pool.
1400
1401 max_age
1402 max age of free element.
1403
1404 pool_vbo
1405 • Default: 10,100,10
1406
1407 Parameters for backend object fetch memory pool.
1408
1409 The three numbers are:
1410
1411 min_pool
1412 minimum size of free pool.
1413
1414 max_pool
1415 maximum size of free pool.
1416
1417 max_age
1418 max age of free element.
1419
1420 prefer_ipv6
1421 • Units: bool
1422
1423 • Default: off
1424
1425 Prefer IPv6 address when connecting to backends which have both IPv4
1426 and IPv6 addresses.
1427
1428 rush_exponent
1429 • Units: requests per request
1430
1431 • Default: 3
1432
1433 • Minimum: 2
1434
1435 • Flags: experimental
1436
1437 How many parked request we start for each completed request on the ob‐
1438 ject. NB: Even with the implict delay of delivery, this parameter con‐
1439 trols an exponential increase in number of worker threads.
1440
1441 send_timeout
1442 • Units: seconds
1443
1444 • Default: 600.000
1445
1446 • Minimum: 0.000
1447
1448 • Flags: delayed
1449
1450 Total timeout for ordinary HTTP1 responses. Does not apply to some in‐
1451 ternally generated errors and pipe mode.
1452
1453 When 'idle_send_timeout' is hit while sending an HTTP1 response, the
1454 timeout is extended unless the total time already taken for sending the
1455 response in its entirety exceeds this many seconds.
1456
1457 When this timeout is hit, the session is closed
1458
1459 shortlived
1460 • Units: seconds
1461
1462 • Default: 10.000
1463
1464 • Minimum: 0.000
1465
1466 Objects created with (ttl+grace+keep) shorter than this are always put
1467 in transient storage.
1468
1469 sigsegv_handler
1470 • Units: bool
1471
1472 • Default: on
1473
1474 • Flags: must_restart
1475
1476 Install a signal handler which tries to dump debug information on seg‐
1477 mentation faults, bus errors and abort signals.
1478
1479 syslog_cli_traffic
1480 • Units: bool
1481
1482 • Default: on
1483
1484 Log all CLI traffic to syslog(LOG_INFO).
1485
1486 tcp_fastopen
1487 NB: This parameter depends on a feature which is not available on all
1488 platforms.
1489
1490 • Units: bool
1491
1492 • Default: off
1493
1494 • Flags: must_restart
1495
1496 Enable TCP Fast Open extension.
1497
1498 tcp_keepalive_intvl
1499 NB: This parameter depends on a feature which is not available on all
1500 platforms.
1501
1502 • Units: seconds
1503
1504 • Default: platform dependent
1505
1506 • Minimum: 1.000
1507
1508 • Maximum: 100.000
1509
1510 • Flags: experimental
1511
1512 The number of seconds between TCP keep-alive probes. Ignored for Unix
1513 domain sockets.
1514
1515 tcp_keepalive_probes
1516 NB: This parameter depends on a feature which is not available on all
1517 platforms.
1518
1519 • Units: probes
1520
1521 • Default: platform dependent
1522
1523 • Minimum: 1
1524
1525 • Maximum: 100
1526
1527 • Flags: experimental
1528
1529 The maximum number of TCP keep-alive probes to send before giving up
1530 and killing the connection if no response is obtained from the other
1531 end. Ignored for Unix domain sockets.
1532
1533 tcp_keepalive_time
1534 NB: This parameter depends on a feature which is not available on all
1535 platforms.
1536
1537 • Units: seconds
1538
1539 • Default: platform dependent
1540
1541 • Minimum: 1.000
1542
1543 • Maximum: 7200.000
1544
1545 • Flags: experimental
1546
1547 The number of seconds a connection needs to be idle before TCP begins
1548 sending out keep-alive probes. Ignored for Unix domain sockets.
1549
1550 thread_pool_add_delay
1551 • Units: seconds
1552
1553 • Default: 0.000
1554
1555 • Minimum: 0.000
1556
1557 • Flags: experimental
1558
1559 Wait at least this long after creating a thread.
1560
1561 Some (buggy) systems may need a short (sub-second) delay between creat‐
1562 ing threads. Set this to a few milliseconds if you see the
1563 'threads_failed' counter grow too much.
1564
1565 Setting this too high results in insufficient worker threads.
1566
1567 thread_pool_destroy_delay
1568 • Units: seconds
1569
1570 • Default: 1.000
1571
1572 • Minimum: 0.010
1573
1574 • Flags: delayed, experimental
1575
1576 Wait this long after destroying a thread.
1577
1578 This controls the decay of thread pools when idle(-ish).
1579
1580 thread_pool_fail_delay
1581 • Units: seconds
1582
1583 • Default: 0.200
1584
1585 • Minimum: 0.010
1586
1587 • Flags: experimental
1588
1589 Wait at least this long after a failed thread creation before trying to
1590 create another thread.
1591
1592 Failure to create a worker thread is often a sign that the end is
1593 near, because the process is running out of some resource. This delay
1594 tries to not rush the end on needlessly.
1595
1596 If thread creation failures are a problem, check that thread_pool_max
1597 is not too high.
1598
1599 It may also help to increase thread_pool_timeout and thread_pool_min,
1600 to reduce the rate at which treads are destroyed and later recreated.
1601
1602 thread_pool_max
1603 • Units: threads
1604
1605 • Default: 5000
1606
1607 • Minimum: thread_pool_min
1608
1609 • Flags: delayed
1610
1611 The maximum number of worker threads in each pool.
1612
1613 Do not set this higher than you have to, since excess worker threads
1614 soak up RAM and CPU and generally just get in the way of getting work
1615 done.
1616
1617 thread_pool_min
1618 • Units: threads
1619
1620 • Default: 100
1621
1622 • Minimum: 5
1623
1624 • Maximum: thread_pool_max
1625
1626 • Flags: delayed
1627
1628 The minimum number of worker threads in each pool.
1629
1630 Increasing this may help ramp up faster from low load situations or
1631 when threads have expired.
1632
1633 Technical minimum is 5 threads, but this parameter is strongly recom‐
1634 mended to be at least 10
1635
1636 thread_pool_reserve
1637 • Units: threads
1638
1639 • Default: 0 (auto-tune: 5% of thread_pool_min)
1640
1641 • Maximum: 95% of thread_pool_min
1642
1643 • Flags: delayed
1644
1645 The number of worker threads reserved for vital tasks in each pool.
1646
1647 Tasks may require other tasks to complete (for example, client requests
1648 may require backend requests, http2 sessions require streams, which re‐
1649 quire requests). This reserve is to ensure that lower priority tasks do
1650 not prevent higher priority tasks from running even under high load.
1651
1652 The effective value is at least 5 (the number of internal priority
1653 classes), irrespective of this parameter.
1654
1655 thread_pool_stack
1656 • Units: bytes
1657
1658 • Default: 80k
1659
1660 • Minimum: sysconf(_SC_THREAD_STACK_MIN)
1661
1662 • Flags: delayed
1663
1664 Worker thread stack size. This will likely be rounded up to a multiple
1665 of 4k (or whatever the page_size might be) by the kernel.
1666
1667 The required stack size is primarily driven by the depth of the
1668 call-tree. The most common relevant determining factors in varnish core
1669 code are GZIP (un)compression, ESI processing and regular expression
1670 matches. VMODs may also require significant amounts of additional
1671 stack. The nesting depth of VCL subs is another factor, although typi‐
1672 cally not predominant.
1673
1674 The stack size is per thread, so the maximum total memory required for
1675 worker thread stacks is in the order of size = thread_pools x
1676 thread_pool_max x thread_pool_stack.
1677
1678 Thus, in particular for setups with many threads, keeping the stack
1679 size at a minimum helps reduce the amount of memory required by Var‐
1680 nish.
1681
1682 On the other hand, thread_pool_stack must be large enough under all
1683 circumstances, otherwise varnish will crash due to a stack overflow.
1684 Usually, a stack overflow manifests itself as a segmentation fault (aka
1685 segfault / SIGSEGV) with the faulting address being near the stack
1686 pointer (sp).
1687
1688 Unless stack usage can be reduced, thread_pool_stack must be increased
1689 when a stack overflow occurs. Setting it in 150%-200% increments is
1690 recommended until stack overflows cease to occur.
1691
1692 thread_pool_timeout
1693 • Units: seconds
1694
1695 • Default: 300.000
1696
1697 • Minimum: 10.000
1698
1699 • Flags: delayed, experimental
1700
1701 Thread idle threshold.
1702
1703 Threads in excess of thread_pool_min, which have been idle for at least
1704 this long, will be destroyed.
1705
1706 thread_pool_watchdog
1707 • Units: seconds
1708
1709 • Default: 60.000
1710
1711 • Minimum: 0.100
1712
1713 • Flags: experimental
1714
1715 Thread queue stuck watchdog.
1716
1717 If no queued work have been released for this long, the worker process
1718 panics itself.
1719
1720 thread_pools
1721 • Units: pools
1722
1723 • Default: 2
1724
1725 • Minimum: 1
1726
1727 • Maximum: 32
1728
1729 • Flags: delayed, experimental
1730
1731 Number of worker thread pools.
1732
1733 Increasing the number of worker pools decreases lock contention. Each
1734 worker pool also has a thread accepting new connections, so for very
1735 high rates of incoming new connections on systems with many cores, in‐
1736 creasing the worker pools may be required.
1737
1738 Too many pools waste CPU and RAM resources, and more than one pool for
1739 each CPU is most likely detrimental to performance.
1740
1741 Can be increased on the fly, but decreases require a restart to take
1742 effect, unless the drop_pools experimental debug flag is set.
1743
1744 thread_queue_limit
1745 • Units: requests
1746
1747 • Default: 20
1748
1749 • Minimum: 0
1750
1751 • Flags: experimental
1752
1753 Permitted request queue length per thread-pool.
1754
1755 This sets the number of requests we will queue, waiting for an avail‐
1756 able thread. Above this limit sessions will be dropped instead of
1757 queued.
1758
1759 thread_stats_rate
1760 • Units: requests
1761
1762 • Default: 10
1763
1764 • Minimum: 0
1765
1766 • Flags: experimental
1767
1768 Worker threads accumulate statistics, and dump these into the global
1769 stats counters if the lock is free when they finish a job (re‐
1770 quest/fetch etc.) This parameters defines the maximum number of jobs a
1771 worker thread may handle, before it is forced to dump its accumulated
1772 stats into the global counters.
1773
1774 timeout_idle
1775 • Units: seconds
1776
1777 • Default: 5.000
1778
1779 • Minimum: 0.000
1780
1781 Idle timeout for client connections.
1782
1783 A connection is considered idle until we have received the full request
1784 headers.
1785
1786 This parameter is particularly relevant for HTTP1 keepalive connec‐
1787 tions which are closed unless the next request is received before this
1788 timeout is reached.
1789
1790 timeout_linger
1791 • Units: seconds
1792
1793 • Default: 0.050
1794
1795 • Minimum: 0.000
1796
1797 • Flags: experimental
1798
1799 How long the worker thread lingers on an idle session before handing it
1800 over to the waiter. When sessions are reused, as much as half of all
1801 reuses happen within the first 100 msec of the previous request com‐
1802 pleting. Setting this too high results in worker threads not doing
1803 anything for their keep, setting it too low just means that more ses‐
1804 sions take a detour around the waiter.
1805
1806 vary_notice
1807 • Units: variants
1808
1809 • Default: 10
1810
1811 • Minimum: 1
1812
1813 How many variants need to be evaluated to log a Notice that there might
1814 be too many variants.
1815
1816 vcc_allow_inline_c
1817 • Units: bool
1818
1819 • Default: off
1820
1821 Allow inline C code in VCL.
1822
1823 vcc_err_unref
1824 • Units: bool
1825
1826 • Default: on
1827
1828 Unreferenced VCL objects result in error.
1829
1830 vcc_unsafe_path
1831 • Units: bool
1832
1833 • Default: on
1834
1835 Allow '/' in vmod & include paths. Allow 'import ... from ...'.
1836
1837 vcl_cooldown
1838 • Units: seconds
1839
1840 • Default: 600.000
1841
1842 • Minimum: 1.000
1843
1844 How long a VCL is kept warm after being replaced as the active VCL
1845 (granularity approximately 30 seconds).
1846
1847 vcl_path
1848 NB: The actual default value for this parameter depends on the Varnish
1849 build environment and options.
1850
1851 • Default: ${sysconfdir}/varnish:${datadir}/varnish/vcl
1852
1853 Directory (or colon separated list of directories) from which relative
1854 VCL filenames (vcl.load and include) are to be found. By default Var‐
1855 nish searches VCL files in both the system configuration and shared
1856 data directories to allow packages to drop their VCL files in a stan‐
1857 dard location where relative includes would work.
1858
1859 vmod_path
1860 NB: The actual default value for this parameter depends on the Varnish
1861 build environment and options.
1862
1863 • Default: ${libdir}/varnish/vmods
1864
1865 Directory (or colon separated list of directories) where VMODs are to
1866 be found.
1867
1868 vsl_buffer
1869 • Units: bytes
1870
1871 • Default: 16k
1872
1873 • Minimum: vsl_reclen + 12 bytes
1874
1875 Bytes of (req-/backend-)workspace dedicated to buffering VSL records.
1876 When this parameter is adjusted, most likely workspace_client and
1877 workspace_backend will have to be adjusted by the same amount.
1878
1879 Setting this too high costs memory, setting it too low will cause more
1880 VSL flushes and likely increase lock-contention on the VSL mutex.
1881
1882 vsl_mask
1883 • Default: -Debug,-ObjProtocol,-ObjStatus,-ObjReason,-Obj‐
1884 Header,-VCL_trace,-ExpKill,-WorkThread,-Hash,-VfpAcct,-H2Rx‐
1885 Hdr,-H2RxBody,-H2TxHdr,-H2TxBody,-VdpAcct
1886
1887 Mask individual VSL messages from being logged.
1888
1889 default
1890 Set default value
1891
1892 Use +/- prefix in front of VSL tag name to unmask/mask individual VSL
1893 messages.
1894
1895 vsl_reclen
1896 • Units: bytes
1897
1898 • Default: 255b
1899
1900 • Minimum: 16b
1901
1902 • Maximum: vsl_buffer - 12 bytes
1903
1904 Maximum number of bytes in SHM log record.
1905
1906 vsl_space
1907 • Units: bytes
1908
1909 • Default: 80M
1910
1911 • Minimum: 1M
1912
1913 • Maximum: 4G
1914
1915 • Flags: must_restart
1916
1917 The amount of space to allocate for the VSL fifo buffer in the VSM mem‐
1918 ory segment. If you make this too small, varnish{ncsa|log} etc will
1919 not be able to keep up. Making it too large just costs memory re‐
1920 sources.
1921
1922 vsm_free_cooldown
1923 • Units: seconds
1924
1925 • Default: 60.000
1926
1927 • Minimum: 10.000
1928
1929 • Maximum: 600.000
1930
1931 How long VSM memory is kept warm after a deallocation (granularity ap‐
1932 proximately 2 seconds).
1933
1934 workspace_backend
1935 • Units: bytes
1936
1937 • Default: 96k
1938
1939 • Minimum: 1k
1940
1941 • Flags: delayed
1942
1943 Bytes of HTTP protocol workspace for backend HTTP req/resp. If larger
1944 than 4k, use a multiple of 4k for VM efficiency.
1945
1946 workspace_client
1947 • Units: bytes
1948
1949 • Default: 96k
1950
1951 • Minimum: 9k
1952
1953 • Flags: delayed
1954
1955 Bytes of HTTP protocol workspace for clients HTTP req/resp. Use a mul‐
1956 tiple of 4k for VM efficiency. For HTTP/2 compliance this must be at
1957 least 20k, in order to receive fullsize (=16k) frames from the client.
1958 That usually happens only in POST/PUT bodies. For other traffic-pat‐
1959 terns smaller values work just fine.
1960
1961 workspace_session
1962 • Units: bytes
1963
1964 • Default: 0.75k
1965
1966 • Minimum: 384b
1967
1968 • Flags: delayed
1969
1970 Allocation size for session structure and workspace. The workspace
1971 is primarily used for TCP connection addresses. If larger than 4k, use
1972 a multiple of 4k for VM efficiency.
1973
1974 workspace_thread
1975 • Units: bytes
1976
1977 • Default: 2k
1978
1979 • Minimum: 0.25k
1980
1981 • Maximum: 8k
1982
1983 • Flags: delayed
1984
1985 Bytes of auxiliary workspace per thread. This workspace is used for
1986 certain temporary data structures during the operation of a worker
1987 thread. One use is for the IO-vectors used during delivery. Setting
1988 this parameter too low may increase the number of writev() syscalls,
1989 setting it too high just wastes space. ~0.1k + UIO_MAXIOV *
1990 sizeof(struct iovec) (typically = ~16k for 64bit) is considered the
1991 maximum sensible value under any known circumstances (excluding exotic
1992 vmod use).
1993
1995 Varnish and bundled tools will, in most cases, exit with one of the
1996 following codes
1997
1998 • 0 OK
1999
2000 • 1 Some error which could be system-dependent and/or transient
2001
2002 • 2 Serious configuration / parameter error - retrying with the same
2003 configuration / parameters is most likely useless
2004
2005 The varnishd master process may also OR its exit code
2006
2007 • with 0x20 when the varnishd child process died,
2008
2009 • with 0x40 when the varnishd child process was terminated by a signal
2010 and
2011
2012 • with 0x80 when a core was dumped.
2013
2015 • varnishlog(1)
2016
2017 • varnishhist(1)
2018
2019 • varnishncsa(1)
2020
2021 • varnishstat(1)
2022
2023 • varnishtop(1)
2024
2025 • varnish-cli(7)
2026
2027 • vcl(7)
2028
2030 The varnishd daemon was developed by Poul-Henning Kamp in cooperation
2031 with Verdens Gang AS and Varnish Software.
2032
2033 This manual page was written by Dag-Erling Smørgrav with updates by
2034 Stig Sandbeck Mathisen <ssm@debian.org>, Nils Goroll and others.
2035
2037 This document is licensed under the same licence as Varnish itself. See
2038 LICENCE for details.
2039
2040 • Copyright (c) 2007-2015 Varnish Software AS
2041
2042
2043
2044
2045 VARNISHD(1)