vinyld(1)
๐ vinyld(1) โ HTTP accelerator daemon, bestie ๐
๐ธ Name ๐ธ
vinyld โ HTTP accelerator daemon. Thatโs the whole vibe: itโs the daemon doing the caching magic. โจ
โจ SYNOPSIS โจ
vinyld [-a [name=][listen_address[,PROTO|,option=value,...]] [-b
[host[:port]|path]] [-C] [-d] [-E extension] [-F] [-f config] [-h
type[,options]] [-I clifile] [-i identity] [-j jail[,jailoptions]] [-l vsl] [-M address:port] [-n workdir] [-P
file] [-p param=value] [-r param[,param...]] [-S secret-file]
[-s [name=]kind[,options]] [-T address[:port]] [-t TTL] [-V] [-W
waiter]
vinyld [-x parameter|vsl|cli|builtin|optstring]
vinyld [-?]
๐ฆ DESCRIPTION ๐ฆ
Okay so picture this: the vinyld daemon takes HTTP requests from clients, hands them over to a backend server, and caches the documents that come back so future requests for the same document are way happier. Iconic caching behavior. ๐
๐ OPTIONS ๐
๐ Basic options ๐
-a <[name=][listen_address[,PROTO|,option=value,...]]>โ The generic girlie way to accept client requests on alisten_address. See below for the full details, bestie.nameis referenced in logs and is available to VCL aslocal.socket. Ifnameis not specified, a numerical sequence ("a0","a1", etc.) is used.- Any arguments after the
listen_addressseparated by comma are taken as either an acceptoroption=valuepair if containing a=, or as aPROTO(col)selection otherwise. - Valid options depend on the acceptor type, see below.
PROTOcan be"HTTP"(the default) or"PROXY". Both version 1 and 2 of the proxy protocol can be used.- Multiple
-aarguments are allowed. - If no
-aargument is given, the default-a :80will listen on all IPv4 and IPv6 interfaces.
-a <[name=][ip_address][:port][,PROTO]>โ The IP-address-flavored listener form. Main character energy for network listeners.- The
ip_addresscan be a host name ("localhost"), an IPv4 dotted-quad ("127.0.0.1") or an IPv6 address enclosed in square brackets ("[::1]"). - The
portcan be a port number (80), a service name (http), or a port range (80-81). Port ranges are inclusive and cannot overlap. Ifportis not specified, port80(http) is used. - At least one of
ip_addressorportis required.
- The
-a <[name=][path][,PROTO][,user=name][,group=name][,mode=octal]>โ The Unix domain socket form. VCL4.1 and higher only, bestie. ๐ฆ- Accept connections on a Unix domain socket.
pathmust be absolute ("/path/to/listen.sock") or"@"followed by the name of an abstract socket ("@myvinyld"). - The
user,groupandmodesub-arguments may be used to specify the permissions of the socket file -- use names foruserandgroup, and a 3-digit octal value formode. These sub-arguments do not apply to abstract sockets.
- Accept connections on a Unix domain socket.
-b <[host[:port]|path]>โ Use the specifiedhostas backend server. Ifportis not specified, the default is8080. ๐ซถ- If the value of
-bbegins with/, it is interpreted as the absolute path of a Unix domain socket to whichvinyldconnects. In that case, the value of-bmust satisfy the conditions required for the.pathfield of a backend declaration, seevcl(7). Backends with Unix socket addresses may only be used with VCL versions >= 4.1. -bcan be used only once, and not together with-f.
- If the value of
-f configโ Use the specified VCL configuration file instead of the builtin default. Seevcl(7)for details on VCL syntax. This is the โload my actual configโ button.- If a single
-foption is used, then the VCL instance loaded from the file is named"boot"and immediately becomes active. If more than one-foption is used, the VCL instances are named"boot0","boot1"and so forth, in the order corresponding to the-farguments, and the last one is named"boot", which becomes active. - Either
-bor one or more-foptions must be specified, but not both, and they cannot both be left out, unless-dis used to startvinyldin debugging mode. If the empty string is specified as the sole-foption, thenvinyldstarts without starting the worker process, and the management process will accept CLI commands. You can also combine an empty-foption with an initialization script (-Ioption) and the child process will be started if there is an active VCL at the end of the initialization. - When used with a relative file name,
configis searched in thevcl_path. It is possible to set this path prior to using-foptions with a-poption. During startup,vinylddoesn't complain about unsafe VCL paths: unlike thevinyl-cli(7)that could later be accessed remotely, startingvinyldrequires local privileges.
- If a single
-n workdirโ Runtime directory for the shared memory, compiled VCLs etc. Put it somewhere fast and keep it cute.- In performance critical applications, this directory should be on a RAM backed filesystem.
- When running multiple
vinyldinstances, separate directories need to be used. - The default is taken from the
VINYL_DEFAULT_Nenvironment variable. - Relative paths will be appended to
/var/lib/lib/vinyl-cache. - If neither
VINYL_DEFAULT_Nnor-nare present, the value is/var/lib/lib/vinyl-cache/vinyld. - Note: These defaults may be distribution specific.
๐ Documentation options ๐
For these options, vinyld prints information to standard output and exits. When a -x option is used, it must be the only option (it outputs documentation in reStructuredText, aka RST). Read the docs, bestie. โจ
-?โ Print the usage message.-x parameterโ Print documentation of the runtime parameters (-poptions), see List of Parameters.-x vslโ Print documentation of the tags used in the Vinyld Cache shared memory log, seevsl(7).-x cliโ Print documentation of the command line interface, seevinyl-cli(7).-x builtinโ Print the contents of the default VCL programbuiltin.vcl.-x optstringโ Print theoptstringparameter togetopt(3)to help writing wrapper scripts.
๐ ๏ธ Operations options ๐ ๏ธ
-Fโ Do not fork, run in the foreground. Only one of-For-dcan be specified, and-Fcannot be used together with-C. Foreground realness.-T <address[:port]>โ Offer a management interface on the specified address and port. Seevinyl-cli(7)for documentation of the management commands. To disable the management interface usenone.-M <address:port>โ Connect to this port and offer the command line interface. Think of it as a reverse shell. When running with-Mand there is no backend defined the child process (the cache) will not start initially. Reverse shell vibes, but make it cache. ๐-P fileโ Write the PID of the process to the specified file.-i identityโ Specify the identity of the Vinyl Cache server. This can be accessed usingserver.identityfrom VCL.- The server identity is used for the received-by field of
Viaheaders generated by Vinyl Cache. For this reason, it must be a valid token as defined by the HTTP grammar. - If not specified the output of
gethostname(3)is used, in which case the syntax is assumed to be correct.
- The server identity is used for the received-by field of
-I clifileโ Execute the management commands in the file given asclifilebefore the worker process starts, see CLI Command File.-E extensionโ Load the named extension. Extensions are modules (VMODs) which can modifyvinyldbehavior outside VCL, for example by adding storage- or protocol implementations. Extensions are always also VMODs, even if they do not provide any functionality to VCL, but in most cases they will. Plugins, but make it VCL-adjacent.- Any VMOD can be loaded as an extension, in which case it is simply pre-loaded at startup and prevented from ever getting unloaded.
- If
extensioncontains any slashes/, it is taken as an absolute path. Otherwise, for extensionext, avmod_ext.sois searched for invmod_path. vinyldstartup fails if loading the extension fails for any reason.
๐๏ธ Tuning options ๐๏ธ
-t TTLโ Specifies the default time to live (TTL) for cached objects. This is a shortcut for specifying thedefault_ttlrun-time parameter. Set the cache lifespan, bestie. ๐ฐ๏ธ-p <param=value>โ Set the parameter specified byparamto the specified value, see List of Parameters for details. This option can be used multiple times to specify multiple parameters.-s <[name=]kind[,options]>โ Use the specified storage backend. Seeref-vinyld-opt_sand the Storage Backend section. Storage era.- This option can be used multiple times to define multiple storage backends.
nameis referenced in logs, VCL, statistics, etc. Ifnameis not specified,"s0","s1"and so forth are used.
- This option can be used multiple times to define multiple storage backends.
-l <vsl>โ Specifies size of the space for the VSL records, shorthand for-p vsl_space=<vsl>. Scaling suffixes like'K'and'M'can be used up to (G)igabytes. Seevsl_spacefor more information.
๐ Security options ๐
-r <param[,param...]>โ Make the listed parameters read only. This gives the system administrator a way to limit what the Vinyl Cache CLI can do. Consider making parameters such ascc_command,vcc_allow_inline_candvmod_pathread only as these can potentially be used to escalate privileges from the CLI. Lock it down, bestie. For real. ๐ฅ-S secret-fileโ Path to a file containing a secret used for authorizing access to the management port. To disable authentication usenone.- If this argument is not provided, a secret drawn from the system PRNG will be written to a file called
_.secretin the working directory (seeopt_n) with default ownership and permissions of the user having startedvinyld. - Thus, users wishing to delegate control over
vinyldwill probably want to create a custom secret file with appropriate permissions (ie. readable by a unix group to delegate control to).
- If this argument is not provided, a secret drawn from the system PRNG will be written to a file called
-j <jail[,jailoptions]>โ Specify the jailing mechanism to use. See Jail section. Jail, but for the daemon. Not a drill. ๐ซถ
๐งช Advanced, development and debugging options ๐งช
-dโ Enables debugging mode: The parent process runs in the foreground with a CLI connection on stdin/stdout, and the child process must be started explicitly with a CLI command. Terminating the parent process will also terminate the child. Debug mode said โIโll be watching.โ ๐- Only one of
-dor-Fcan be specified, and-dcannot be used together with-C.
- Only one of
-Cโ Print VCL code compiled to C language and exit. Specify the VCL file to compile with the-foption. Either-for-bmust be used with-C, and-Ccannot be used with-For-d. Compile and dip. โจ
-C and -n are not a vibe together, bestie โ the working directory you hand over will literally get cleaned out and overwritten. ๐ญ By default, -C makes a working dir either in TMPDIR or in /tmp. If you actually need to control which directory -C uses, the move is to set TMPDIR and only use -n with values you control. ๐
-Vโ Prints the version number and dips out. This one has to be the only option, no sidekicks allowed.-h <type[,options]>โ Picks the hash algorithm. Peep the Hash Algorithm section for the full roster of supported algorithms.-W waiterโ Picks which waiter type to use.
โจ Hash Algorithm โจ
These are the hash algorithms on the menu:
-h critbitโ a self-scaling tree structure. This is the default hash algorithm in Vinyl Cache 2.1 and onwards, and compared to a more traditional B tree, the critbit tree is almost completely lockless. ๐ฆ Do not change this unless you are dead certain what you're doing.-h simple_listโ a simple doubly-linked list. Not recommended for production use, ngl. ๐-h <classic[,buckets]>โ a standard hash table. The hash key is the CRC32 of the object's URL modulo the size of the hash table. Each table entry points to a list of elements which share the same hash key. Thebucketsparameter specifies the number of entries in the hash table. The default is16383.
๐ Storage Backend ๐
You can define multiple storage backends (that's where the cached and in-flight objects live), and VCL can pilot which store gets used by setting the beresp.storage variable (see man vcl-var for more info).
The argument format for defining storage backends is:
-s <[name]=kind[,options]>
-s <[name]=kind[,options]>โ Ifnameis omitted,vinyldwill name storagessN, starting withs0and incrementingNfor every new storage.
For kind and options, see the details below.
Storages show up in VCL as storage.name, so, for example, if myStorage was defined by -s myStorage=malloc,5G, you could use it in VCL like so:
set beresp.storage = storage.myStorage;
If no -s options are given, the default is:
-s default,100m
Two special names exist:
Transientโ the default storage for uncacheable objects, as resulting from apass,hit-for-missorhit-for-pass.
If no Transient storage is defined, the default storage is used as if defined as:
-s Transient=default
Synthโ the default storage for synthetic responses created invcl_synth {}.
If no Synth storage is defined, the synth storage is used as if defined as:
-s Synth=synth
Storage kinds (stevedores) can be provided by extensions. These storage kinds and options are built in:
-s <default[,size]>โ the default storage kind resolves toumemwhere available andmallocotherwise.-s <malloc[,size]>โmallocis a memory based backend.-s <umem[,size]>โumemis a storage backend which is more efficient thanmallocon platforms where it is available.
See the section on umem in chapter Storage backends of The Vinyl Users Guide for details. ๐
-s <file,path[,size[,granularity[,advice]]]>โ thefilebackend stores data in a file on disk. The file will be accessed usingmmap. Note that this storage provide no cache persistence โ so don't come crying to it after a restart, it will not remember you. ๐
The path is mandatory. If path points to a directory, a temporary file will be created in that directory and immediately unlinked. If path points to a non-existing file, the file will be created.
If size is omitted, and path points to an existing file with a size greater than zero, the size of that file will be used. If not, an error is reported.
granularity sets the allocation block size. Defaults to the system page size or the filesystem block size, whichever is larger.
advice tells the kernel how vinyld expects to use this mapped region so that the kernel can choose the appropriate read-ahead and caching techniques. Possible values are normal, random and sequential, corresponding to MADV_NORMAL, MADV_RANDOM and MADV_SEQUENTIAL madvise() advice argument, respectively. Defaults to random.
-s <persistent,path,size>โ persistent storage.vinyldwill store objects in a file in a manner that will secure the survival of most of the objects in the event of a planned or unplanned shutdown ofvinyld. Heads up though: the persistent storage backend has multiple issues with it and will likely be removed from a future version of Vinyl Cache. โ ๏ธ
Additional information can also be found in the Storage backends section of the User guide.
๐ธ Jail ๐ธ
Vinyl Cache jails are a generalization over various platform specific methods to reduce the privileges of vinyld processes. They may have specific options. Available jails are:
-j <solaris[,worker=privspec]>โ reducesprivileges(5)forvinyldand sub-processes to the minimally required set. Only available on platforms which have thesetppriv(2)call.
The optional worker argument can be used to pass a privilege-specification (see ppriv(1)) by which to extend the effective set of the vinyld worker process. While extended privileges may be required by custom vmods, not using the worker option is always more secure. ๐
Example to grant basic privileges to the worker process:
-j solaris,worker=basic
-j <linux[,transparent_hugepage=thp_setting][,unixjailoption...]>โ default on Linux platforms, it extends the UNIX jail with Linux-specific mechanisms:- It warns when
workdiris not on atmpfs. - It tries to keep the process dumpable after dropping privileges.
- It adds control over the transparent hugepage (THP) setting.
- It warns when
thp_setting can take these values:
ignore: Do nothingenable: Enable THP (see Note below)disable: Disable THPtry-disable(default): Try to disable, ignore failure (but emit a warning)
Note: Technically, enable is "disable the disable", so it does not necessarily enable THP. The setting names have been chosen to avoid a confusing double negation. ๐ง
-j <unix[,user=user][,ccgroup=group][,workuser=user]>โ default on all other platforms whenvinyldis started with an effective uid of0("as root").
With the unix jail mechanism activated, vinyld will switch to an alternative user for subprocesses and change the effective uid of the master process whenever possible.
The optional user argument specifies which alternative user to use. It defaults to vinyl.
The optional ccgroup argument specifies a group to add to vinyld subprocesses requiring access to a c-compiler. There is no default.
The optional workuser argument specifies an alternative user to use for the worker process. It defaults to vcache.
The users given for the user and workuser arguments need to have the same primary ("login") group. ๐ฏ
For users migrating from Varnish Cache, shell commands similar to the following may be used to remove the previous default user and group:
userdel varnish || true
userdel vcache || true
userdel varnishlog || true # to remove reference to varnish group
groupdel varnish || true
To set up a system for the default users with a group name vinyl, shell commands similar to these may be used:
groupadd vinyl
useradd -g vinyl -d /nonexistent -s /bin/false \
-c "Vinyl Cache Daemon User" vinyl
useradd -g vinyl -d /nonexistent -s /bin/false \
-c "Vinyl Cache Worker User" vcache
useradd -g vinyl -d /nonexistent -s /bin/false \
-c "Vinyl Log User" vinyllog
Note that the vinyllog user is not required and only added because, by convention, it may be used to run vinyllog, vinylncsa and other VSM/VSL based tools.
-j noneโ last resort jail choice: with jail mechanismnone,vinyldwill run all processes with the privileges it was started with. ๐ซฃ
๐ Management Interface ๐
If the -T option was specified, vinyld will offer a command-line management interface on the specified address and port. The recommended way of connecting to the command-line management interface is through vinyladm(1).
The commands available are documented in vinyl-cli(7).
๐ฆ CLI Command File ๐ฆ
The -I option makes it possible to run arbitrary management commands when vinyld is launched, before the worker process is started. In particular, this is the way to load configurations, apply labels to them, and make a VCL instance active that uses those labels on startup:
vcl.load panic /etc/vinyl-cache/panic.vcl
vcl.load siteA0 /etc/vinyl-cache/siteA.vcl
vcl.load siteB0 /etc/vinyl-cache/siteB.vcl
vcl.load siteC0 /etc/vinyl-cache/siteC.vcl
vcl.label siteA siteA0
vcl.label siteB siteB0
vcl.label siteC siteC0
vcl.load main /etc/vinyl-cache/main.vcl
vcl.use main
Every single line in the file โ including the last one โ must be terminated by a newline or carriage return, or it's otherwise considered truncated, which is a fatal error. ๐ค Yes, even the last line. Especially the last line.
If a command in the file is prefixed with -, failure will not abort the startup.
Note that it is necessary to include an explicit vcl.use command to select which VCL should be the active VCL when relying on CLI Command File to load the configurations at startup.
โญ RUN TIME PARAMETERS โญ
Runtime parameters can either be set during startup with the -p command line option for vinyld(1) or through the CLI using the param.set or param.reset commands. They can be locked during startup with the -r command line option. ๐
โจ Run Time Parameter Units โจ
There are different types of parameters that may accept a list of specific values, or optionally take a unit suffix.
๐ bool
A boolean parameter accepts the values on and off.
It will also recognize the following values:
yesandnotrueandfalseenableanddisable
๐ง bytes
A bytes parameter requires one of the following units suffixes:
b(bytes)k(kibibytes, 1024 bytes)m(mebibytes, 1024 kibibytes)g(gibibytes, 1024 mebibytes)t(tebibytes, 1024 gibibytes)p(pebibytes, 1024 tebibytes)
Multiplicator units may be appended with an extra b. For example 32k is equivalent to 32kb. Bytes units are case-insensitive. ๐
โฑ๏ธ seconds
okay so real talk โ any parameter that's measured in time is chill and flexible about units, bestie. you can slap a suffix on and it just gets it โจ
msโ milliseconds ๐ซถsโ seconds (the classic) ๐mโ minuteshโ hoursdโ dayswโ weeksyโ years (yes really, go off ๐)
and if the parameter is a timeout or a deadline, the value never (when that param even allows it, iykyk) straight up disables the whole effect of the parameter. gone. no timeout. ๐ญ
๐ฉ Run Time Parameter Flags
so the runtime params all get little shorthand flags so the table below doesn't become an unreadable wall of repeated text. here's the decoder ring ๐
experimentalโ we genuinely have no solid info about what's good/bad/optimal here. if you have experience and observations, please send feedback, we're literally asking ๐delayedโ this one can be changed on the fly, but it won't take effect immediately. patience, bestie โจrestartโ the worker process has to be stopped and restarted before this takes effect. no shortcuts ๐ฅreloadโ the VCL programs must be reloaded for this param to do anythingwizardโ do not touch unless you really know what you're doing. this is main character energy and you are not the main character ๐only_rootโ only works ifvinyldis running as root ๐
๐งฎ Default Value Exceptions on 32 bit Systems
heads up, 32-bit girlies ๐ โ on 32 bit systems certain default or maximum values get reduced compared to the values listed below, purely to conserve VM space. it's giving budget cuts:
workspace_client:24kworkspace_backend:20khttp_resp_size:8khttp_req_size:12kgzip_buffer:4kvsl_buffer:4kvsl_space:1G(maximum)thread_pool_stack:64k
๐ List of Parameters
fun fact: this text is produced from the same text you'll find in the CLI if you run the param.show command. so it's consistent, it's slay, it's one source of truth ๐
๐ accept_filter
NB: this parameter depends on a feature which is not available on all platforms. check before you get attached ๐
- Units:
bool - Default:
on(if your platform supports accept filters)
enables kernel accept-filters, bestie. this may require a kernel module to be loaded to actually have an effect when it's enabled โ so on doesn't always mean on, yk?
turning onaccept_filtermay prevent some requests from reaching Vinyl Cache in the first place ๐ญ malformed requests may go completely unnoticed and won't bump theclient_req_400counter. andGETorHEADrequests with a body may be blocked altogether. so like... know what you're signing up for ๐
๐ฆ acceptor_sleep_decay
- Default:
0.9 - Minimum:
0 - Maximum:
1 - Flags:
experimental
so when we run out of resources โ file descriptors, worker threads, the usual ๐ฎโ๐จ โ the acceptor sleeps between accepts. this parameter (multiplicatively) reduces the sleep duration for each successful accept. ie: 0.9 = reduce by 10%. so it eases back into normal speed, cute ๐ธ
๐ฆ acceptor_sleep_incr
- Units:
seconds - Default:
0.000 - Minimum:
0.000 - Maximum:
1.000 - Flags:
experimental
same resource-shortage situation as above โ acceptor sleeping between accepts. this parameter controls how much longer we sleep, each time we fail to accept a new connection. escalation, basically ๐
๐ฆ acceptor_sleep_max
- Units:
seconds - Default:
0.050 - Minimum:
0.000 - Maximum:
10.000 - Flags:
experimental
again, out of resources โ acceptor sleeps between accepts. this one is the ceiling: it limits how long it can sleep between attempts to accept new connections. no infinite naps โญ
๐ auto_restart
- Units:
bool - Default:
on
automatically restart the child/worker process if it dies. it's giving resilience ๐ช periodt.
๐ backend_idle_timeout
- Units:
seconds - Default:
60.000 - Minimum:
1.000
timeout before we close unused backend connections. if nobody's using them, they're out โ๏ธ
๐งฑ backend_local_error_holddown
- Units:
seconds - Default:
10.000 - Minimum:
0.000 - Flags:
experimental
okay so when connecting to backends, certain error codes (EADDRNOTAVAIL, EACCESS, EPERM) signal a local resource shortage or config issue. and retrying connection attempts on those may literally worsen the situation, because of how complex the operations are on the kernel side ๐ญ this parameter prevents repeated connection attempts for the configured duration. chill out and wait, bestie ๐ซถ
๐งฑ backend_remote_error_holddown
- Units:
seconds - Default:
0.250 - Minimum:
0.000 - Flags:
experimental
when connecting to backends, certain error codes (ECONNREFUSED, ENETUNREACH) signal fundamental connection issues โ like the backend not accepting connections, or routing problems โ where repeated connection attempts are considered straight up useless ๐ this parameter prevents repeated connection attempts for the configured duration. same energy, different error codes ngl.
๐ฆ backend_wait_limit
- Default:
0 - Minimum:
0 - Flags:
experimental
maximum number of transactions that can queue waiting for a backend connection to become available. the default of 0 (zero) means there is no transaction queueing at all. VCL can override this default value for each backend โจ
note that this feature must be used with caution, as it can cause threads to pile up and increase response times. be careful out here ๐ฎโ๐จ
โณ backend_wait_timeout
- Units:
seconds - Default:
0.000 - Minimum:
0.000 - Flags:
timeout,experimental
when a backend has no connections available for a transaction, the transaction can be queued (see backend_wait_limit) to wait for a connection. this is the default time that the transaction will wait before giving up. VCL can override this default value for each backend ๐
it is strongly advised to never set this higher than a couple of seconds. like, fr fr. don't do it ๐ฅ
๐ฏ ban_any_variant
- Units:
checks - Default:
0 - Minimum:
0
maximum number of possibly non-matching variants that we evaluate against the ban list during a lookup. setting this to 0 means only the matching variants will be evaluated against the current ban list. efficient queen ๐
โ๏ธ ban_cutoff
- Units:
bans - Default:
0 - Minimum:
0 - Flags:
experimental
expurge long tail content from the cache to keep the number of bans below this value. 0 disables it entirely ๐ซ
so when this parameter is set to a non-zero value, the ban lurker continues to work the ban list as usual, top to bottom, but when it reaches the ban_cutoff-th ban, it treats all objects as if they matched a ban and expunges them from cache. because actively used objects get tested against the ban list at request time and are thus likely to be associated with bans near the top of the ban list โ with ban_cutoff, it's the least recently accessed objects (the "long tail") that get removed ๐ฆ
this parameter is a safety net to avoid bad response times due to bans being tested at lookup time. setting a cutoff trades response time for cache efficiency. the recommended value is proportional to rate(bans_lurker_tests_tested) / n_objects while the ban lurker is working, which is the number of bans the system can sustain. the additional latency due to request ban testing is in the order of ban_cutoff / rate(bans_lurker_tests_tested). for example, for rate(bans_lurker_tests_tested) = 2M/s and a tolerable latency of 100ms, a good value for ban_cutoff may be 200K. math slay ๐งฎโจ
๐ฏ ban_dups
- Units:
bool - Default:
on
eliminate older identical bans when a new ban is added. this saves CPU cycles by not comparing objects to identical bans ๐ but ngl it's a waste of time if you have many bans which are never identical. know your data bestie
๐ฆ ban_lurker_age
- Units:
seconds - Default:
60.000 - Minimum:
0.000
the ban lurker will ignore bans until they are this old. when a ban is added, the active traffic gets tested against it as part of object lookup. because many applications issue bans in bursts, this parameter holds the ban-lurker off until the rush is over ๐ this should be set to the approximate time which a ban-burst takes. match the vibe of your traffic fr fr
๐ฆ ban_lurker_batch
- Default:
1000 - Minimum:
1
the ban lurker sleeps ${ban_lurker_sleep} after examining this many objects. use this to pace the ban-lurker if it's eating too many resources ๐ฝ๏ธ moderation is key
๐ฆ ban_lurker_holdoff
- Units:
seconds - Default:
0.010 - Minimum:
0.000 - Flags:
experimental
how long the ban lurker sleeps when giving way to lookup due to lock contention. politeness!! it's literally letting others go first ๐ซถ
๐ฆ ban_lurker_sleep
- Units:
seconds - Default:
0.010 - Minimum:
0.000
how long the ban lurker sleeps after examining ${ban_lurker_batch} objects. use this to pace the ban-lurker if it eats too many resources. a value of zero will disable the ban lurker entirely ๐ so like, zero is a real choice.
๐ between_bytes_timeout
- Units:
seconds - Default:
60.000 - Minimum:
0.000 - Flags:
timeout
we only wait for this many seconds between bytes received from the backend before giving up the fetch. VCL values โ per backend or per backend request โ take precedence ๐ and heads up: this parameter does not apply to pipe'ed requests. different rules for those, iykyk.
๐ ๏ธ cc_command
NB: the actual default value for this parameter depends on the Vinyl Cache build environment and options. so don't @ me if yours looks different ๐
- Default:
exec $CC $CFLAGS %w -shared -o %o %s - Flags:
must_reload
the command used for compiling the C source code to a dlopen(3) loadable object. iconic. the following expansions can be used โจ
%s: the source file name%o: the output file name%w: thecc_warningsparameter%d: the raw defaultcc_command%D: the expanded defaultcc_command%n: the working directory (-noption)%%: a percent sign
unknown percent expansion sequences are ignored, and to avoid future incompatibilities, percent characters should be escaped with a double percent sequence (%%) ๐
the %d and %D expansions allow passing the parameter's default value to a wrapper script to perform additional processing. fancy ๐
โ ๏ธ cc_warnings
NB: the actual default value for this parameter depends on the Vinyl Cache build environment and options. same disclaimer, same vibe ๐
- Default:
-Wall -Werror - Flags:
must_reload
warnings used when compiling the C source code with the cc_command parameter. by default, VCL is compiled with the same set of warnings as Vinyl Cache itself. consistency queen ๐
๐ cli_limit
- Units:
bytes - Default:
64k - Minimum:
128b - Maximum:
99999999b
maximum size of CLI response. if the response exceeds this limit, the response code will be 201 instead of 200 and the last line will indicate the truncation. so you know you got cut off โ๏ธ rude but honest
โ cli_timeout
- Units:
seconds - Default:
60.000 - Minimum:
0.000 - Flags:
timeout
timeout for the child's replies to CLI requests. tick tock ๐ฐ๏ธ
๐ฐ๏ธ clock_skew
- Units:
seconds - Default:
10 - Minimum:
0
how much clockskew we are willing to accept between the backend and our own clock. a little bit of drift is fine, we're all doing our best ๐ซถ
๐ฐ๏ธ clock_step
- Units:
seconds - Default:
1.000 - Minimum:
0.000
How much observed clock step we are willing to accept before we panic. Like, if the clock jumps harder than this we're officially freaking out. ๐
๐ธ connect_timeout
- Units: seconds
- Default: 3.500
- Minimum: 0.000
- Flags: timeout
The default connection timeout for backend connections, bestie. We only keep trying to connect to the backend for this many seconds before we're like "okay, giving up ๐ ". VCL can override this default value for each backend and each backend request, so you're not stuck with it if you don't want to be.
๐ฆ critbit_cooloff
- Units: seconds
- Default: 180.000
- Minimum: 60.000
- Maximum: 254.000
- Flags: wizard
How long the critbit hasher keeps deleted objheads chilling on the cooloff list. Yeah, even deleted stuff gets a lil cooloff period, iconic behaviour honestly.
๐ debug
- Default: none
Enable/Disable various kinds of debugging. This is the master switchboard for all the nerdy little debug bits โจ
none โ Disable all debugging.
Use a +/- prefix to set/reset individual bits:
req_stateโ VSL Request state engineworkspaceโ VSL Workspace operationswaitinglistโ VSL Waitinglist eventssyncvslโ Make VSL synchronoushashedgeโ Edge cases in Hashvclrelโ Rapid VCL releaselurkerโ VSL Ban lurkeresi_chopโ Chop ESI fetch to bitsflush_headโ Flush after http1 headvtc_modeโ Vinyltest Modewitnessโ Emit WITNESS lock recordsvsm_keepโ Keep the VSM file on restartslow_acceptorโ Slow down Acceptorh2_nocheckโ Disable various H2 checksvmod_so_keepโ Keep copied VMOD librariesprocessorsโ Fetch/Deliver processorsprotocolโ Protocol debuggingvcl_keepโ Keep VCL C and so fileslckโ Additional lock statisticsproxy_errorโ Proxy send error to backend
๐ default_grace
- Units: seconds
- Default:
10s - Minimum: 0.000
- Flags: obj_sticky
The default grace period, bestie. We will still deliver an object this long after it has expired, provided another thread is attempting to get a new copy. So it's like, expired but still serving looks while someone fetches the fresh one. ๐ซถ
๐ default_keep
- Units: seconds
- Default:
0s - Minimum: 0.000
- Flags: obj_sticky
The default keep period. We will keep a useless object around for this long, making it available for conditional backend fetches. Fr fr, that means the object will be removed from the cache at the end of ttl+grace+keep. So it's on a whole three-stage countdown ๐ญ
โญ default_ttl
- Units: seconds
- Default:
2m - Minimum: 0.000
- Flags: obj_sticky
The TTL assigned to objects if neither the backend nor the VCL code assigns one. The fallback TTL, the main character of defaults ๐
๐ experimental
- Default: none
Enable/Disable experimental features. Proceed with caution energy, these are the experimental ones ๐
none โ Disable all experimental features.
Use a +/- prefix to set/reset individual bits:
dummyโ placeholder dummy
(Yeah. It's literally just a placeholder dummy. That's the whole bit. No cap.)
๐ง feature
- Default:
none,+https_scheme,+validate_headers,+vcl_req_reset
Enable/Disable various minor features. Little quality-of-life switches, we love to see it.
defaultโ Set default value (deprecated: useparam.reset)noneโ Disable all features.
Use a +/- prefix to enable/disable an individual feature:
http2โ Enable HTTP/2 protocol support.short_panicโ Short panic message.no_coredumpโ No coredumps. Must be set before child process starts.https_schemeโ Extract host from full URI in the HTTP/1 request line, if the scheme is https.http_date_postelโ Tolerate non compliant timestamp headers likeDate,Last-Modified,Expiresetc.esi_ignore_httpsโ Convert<esi:include src"https://...tohttp://...esi_disable_xml_checkโ Allow ESI processing on non-XML ESI bodiesesi_ignore_other_elementsโ Ignore XML syntax errors in ESI bodies.esi_remove_bomโ Ignore UTF-8 BOM in ESI bodies.esi_include_onerrorโ Parse theonerrorattribute of<esi:include>tags.wait_siloโ Wait for persistent silos to completely load before serving requests.validate_headersโ Validate all header set operations to conform to RFC9110 section 5.5.busy_stats_rateโ Make busy workers comply withthread_stats_rate.traceโ Enable VCL tracing by default (enable(be)req.trace). Required for tracingvcl_init/vcl_finivcl_req_resetโ Stop processing client VCL once the client is gone. When this happensMAIN.req_resetis incremented.
๐ฅ fetch_chunksize
- Units: bytes
- Default:
16k - Minimum:
4k - Flags: experimental
The default chunksize used by the fetcher. This should be bigger than the majority of objects with short TTLs. Heads up tho: internal limits in the storage_file module make increases above 128kb a dubious idea ๐
๐ fetch_maxchunksize
- Units: bytes
- Default:
0.25G - Minimum:
64k - Flags: experimental
The maximum chunksize we attempt to allocate from storage. Making this too large may cause delays and storage fragmentation โ so like, don't go feral with it.
๐ first_byte_timeout
- Units: seconds
- Default: 60.000
- Minimum: 0.000
- Flags: timeout
The default timeout for receiving the first byte from the backend. We only wait this many seconds for that first byte before giving up. VCL can override this default value for each backend and backend request. Note: this parameter does not apply to pipe'ed requests ๐ซถ
๐ธ gzip_buffer
- Units: bytes
- Default:
32k - Minimum:
2k - Flags: experimental
Size of the malloc buffer used for gzip processing. These buffers are used for in-transit data, for instance gunzip'ed data being sent to a client. Making this space too small results in more overhead, writes to sockets etc, and making it too big is probably just a waste of memory. Gzip buffers are allocated from Transient storage โจ
๐ฆ gzip_level
- Default: 6
- Minimum: 0
- Maximum: 9
Gzip compression level: 0=debug, 1=fast, 9=best.
๐ gzip_memlevel
- Default: 8
- Minimum: 1
- Maximum: 9
Gzip memory level 1=slow/least, 9=fast/most compression. Memory impact is 1=1k, 2=2k, ... 9=256k.
๐ h2_header_table_size
- Units: bytes
- Default:
4k - Minimum:
0b
HTTP2 header table size. This is the size that will be used for the HPACK dynamic decoding table.
The value of this parameter defines SETTINGS_HEADER_TABLE_SIZE in the initial SETTINGS frame sent to the client when a new HTTP2 session is established. Periodt.
โญ h2_initial_window_size
- Units: bytes
- Default:
65535b - Minimum:
65535b - Maximum:
2147483647b
HTTP2 initial flow control window size.
The value of this parameter defines SETTINGS_INITIAL_WINDOW_SIZE in the initial SETTINGS frame sent to the client when a new HTTP2 session is established.
๐ h2_max_concurrent_streams
- Units: streams
- Default: 100
- Minimum: 0
HTTP2 Maximum number of concurrent streams. This is the number of requests that can be active at the same time for a single HTTP2 connection.
The value of this parameter defines SETTINGS_MAX_CONCURRENT_STREAMS in the initial SETTINGS frame sent to the client when a new HTTP2 session is established.
๐ง h2_max_frame_size
- Units: bytes
- Default:
16k - Minimum:
16k - Maximum:
16777215b
HTTP2 maximum per frame payload size we are willing to accept.
The value of this parameter defines SETTINGS_MAX_FRAME_SIZE in the initial SETTINGS frame sent to the client when a new HTTP2 session is established.
๐ฅ h2_max_header_list_size
- Units: bytes
- Default:
0b - Minimum:
0b - Maximum:
2147483647b
HTTP2 maximum size of an uncompressed header list. Lowkey important: this parameter is not mapped to SETTINGS_MAX_HEADER_LIST_SIZE in the initial SETTINGS frame โ the http_req_size parameter is instead.
The http_req_size advises HTTP2 clients of the maximum size for the header list. Exceeding http_req_size results in a reset stream after processing the HPACK block to preserve the connection, but exceeding h2_max_header_list_size results in the HTTP2 connection going away immediately. Rude but fair ๐
If h2_max_header_list_size is lower than http_req_size, it has no effect, except for the special value zero interpreted as 150% of http_req_size.
๐ h2_rapid_reset
- Units: seconds
- Default: 1.000
- Minimum: 0.000
- Flags: delayed, experimental
The upper threshold for how soon an http/2 RST_STREAM frame has to be parsed after a HEADERS frame for it to be treated as suspect and subjected to the rate limits specified by h2_rapid_reset_limit and h2_rapid_reset_period. Changes to this parameter affect the default for new HTTP2 sessions. vmod_h2(3) can be used to adjust it from VCL.
๐ h2_rapid_reset_limit
- Default: 100
- Minimum: 0
- Flags: delayed, experimental
HTTP2 RST Allowance. Specifies the maximum number of allowed stream resets issued by a client over a time period before the connection is closed. Setting this parameter to 0 disables the limit. Changes to this parameter affect the default for new HTTP2 sessions. vmod_h2(3) can be used to adjust it from VCL.
๐ธ h2_rapid_reset_period
- Units: seconds
- Default: 60.000
- Minimum: 1.000
- Flags: delayed, experimental, wizard
HTTP2 sliding window duration for h2_rapid_reset_limit. Changes to this parameter affect the default for new HTTP2 sessions. vmod_h2(3) can be used to adjust it from VCL.
๐ฆ h2_rx_window_increment
- Units: bytes
- Default:
1M - Minimum:
1M - Maximum:
1G - Flags: wizard
HTTP2 Receive Window Increments. How big credits we send in WINDOW_UPDATE frames. Only affects incoming request bodies (ie: POST, PUT etc.). iykyk ๐
๐ h2_rx_window_low_water
- Units: bytes
- Default:
10M - Minimum:
65535b - Maximum:
1G - Flags: wizard
HTTP2 Receive Window low water mark. We try to keep the window at least this big. Only affects incoming request bodies (ie: POST, PUT etc.).
๐ h2_rxbuf_storage
- Default:
Transient - Flags: must_restart
The name of the storage backend that HTTP/2 receive buffers should be allocated from.
โญ h2_window_timeout
- Units: seconds
- Default: 5.000
- Minimum: 0.000
- Flags: timeout, wizard
HTTP2 time limit without window credits. How long a stream may wait for the client to credit the window and allow for more DATA frames to be sent. lowkey just sitting there tapping its foot waiting for permission ๐
http1_iovs
- Units:
struct iovec(=16 bytes) - Default:
64 - Minimum:
5 - Maximum:
1024 - Flags:
wizard
Number of io vectors to allocate for HTTP1 protocol transmission. Bestie, math time: a HTTP1 header needs 7 + 2 per HTTP header field. Allocated from workspace_thread. ๐งต
This parameter affects only io vectors used for client delivery. For backend fetches, the maximum number of io vectors (up to IOV_MAX) is allocated from available workspace_thread memory.
http_gzip_support
- Units: bool
- Default:
on
Enable gzip support. Bestie when this is on, Vinyl Cache will request compressed objects from the backend and store them compressed. And if a client doesn't support gzip encoding? Vinyl Cache will uncompress compressed objects on demand, no drama. โจ
Vinyl Cache will also rewrite the Accept-Encoding header of clients indicating support for gzip to:
Accept-Encoding: gzip
Clients that do not support gzip will have their Accept-Encoding header removed. For more information on how gzip is implemented please see the chapter on gzip in the Vinyl Cache reference. ๐
When gzip support is disabled the variablesberesp.do_gzipandberesp.do_gunziphave no effect in VCL. Like, zero. They just sit there. ๐
http_max_hdr
- Units: header lines
- Default:
64 - Minimum:
32 - Maximum:
65535
Maximum number of HTTP header lines we allow in {req|resp|bereq|beresp}.http (note that obj.http is autosized to the exact number of headers, she's special ๐ธ). Cheap, ~20 bytes, in terms of workspace memory. Note that the first line occupies five header lines. yes, five. the main character of header lines ๐
http_range_support
- Units: bool
- Default:
on
Enable support for HTTP Range headers. slay ๐
http_req_hdr_len
- Units: bytes
- Default:
8k - Minimum:
40b
Maximum length of any HTTP client request header we will allow. The limit is inclusive its continuation lines. ๐ฆ
http_req_overflow_status
- Units: HTTP status code or
0to disable - Default:
0 - Minimum:
400 - Maximum:
500
HTTP status code to be returned if http_req_size is exceeded. The default value of 0 closes the connection silently without sending a HTTP response. ๐
Note that there is no standard HTTP status which exactly matches the implementation of http_req_size. 414 applies to the URL only, while 413 applies to the request body. 400 is probably the least incorrect alternative value to sending no response at all (0). It can also be seen as an internal error on the Vinyl Cache side due to configured limits, so 500 is also allowed. pick your fighter fr fr ๐
http_req_size
- Units: bytes
- Default:
32k - Minimum:
0.25k
Maximum number of bytes of HTTP client request we will deal with. This is a limit on all bytes up to the double blank line which ends the HTTP request. The memory for the request is allocated from the client workspace (param: workspace_client) and this parameter limits how much of that the request is allowed to take up. ๐ซถ
For HTTP2 clients, it is advertised as MAX_HEADER_LIST_SIZE in the initial SETTINGS frame.
http_resp_hdr_len
- Units: bytes
- Default:
8k - Minimum:
40b
Maximum length of any HTTP backend response header we will allow. The limit is inclusive its continuation lines. โจ
http_resp_size
- Units: bytes
- Default:
32k - Minimum:
0.25k
Maximum number of bytes of HTTP backend response we will deal with. This is a limit on all bytes up to the double blank line which ends the HTTP response. The memory for the response is allocated from the backend workspace (param: workspace_backend) and this parameter limits how much of that the response is allowed to take up. ๐ง
idle_send_timeout
- Units: seconds
- Default:
60.000 - Minimum:
0.000 - Maximum:
3600.000 - Flags:
timeout,delayed
Send timeout for individual pieces of data on client connections. May get extended if send_timeout applies. ๐
When this timeout is hit, the session is closed. periodt.
See the man page for setsockopt(2) or socket(7) under SO_SNDTIMEO for more information.
listen_depth
- Units: connections
- Default:
1024 - Minimum:
0 - Flags:
must_restart
Listen queue depth. that's it that's the whole vibe ๐
lru_interval
- Units: seconds
- Default:
2.000 - Minimum:
0.000 - Flags:
experimental
Grace period before object moves on LRU list. Objects are only moved to the front of the LRU list if they have not been moved there already inside this timeout period. This reduces the amount of lock operations necessary for LRU list access. efficiency queen ๐
max_esi_depth
- Units: levels
- Default:
5 - Minimum:
0
Maximum depth of esi:include processing. don't nest too deep bestie, it's giving inception ๐
max_restarts
- Units: restarts
- Default:
4 - Minimum:
0 - Maximum:
32766 - Flags:
delayed
Upper limit on how many times a request can restart. ๐
max_retries
- Units: retries
- Default:
4 - Minimum:
0 - Maximum:
65534 - Flags:
delayed
Upper limit on how many times a backend fetch can retry.
max_vcl
- Default:
100 - Minimum:
0
Threshold of loaded VCL programs. (VCL labels are not counted.) Parameter max_vcl_handling determines behaviour. ๐
max_vcl_handling
- Default:
1 - Minimum:
0 - Maximum:
2
Behaviour when attempting to exceed max_vcl loaded VCL. ok so here are your options:
0โ Ignoremax_vclparameter. live your truth ๐1โ Issue warning. the gentle "girlโฆ" option2โ Refuse loading VCLs. the hard no ๐
nuke_limit
- Units: allocations
- Default:
50 - Minimum:
0 - Flags:
experimental
Maximum number of objects we attempt to nuke in order to make space for a object body. it's giving demolition day ๐ฅ
panic_buffer
- Units: bytes
- Default:
64k - Minimum:
4k - Maximum:
10M - Flags:
must_restart
Size of the panic message buffer. The panic buffer is allocated in the working directory as memory shared between the management and worker process, so sufficient working directory space should be accounted for if this value is adjusted. Panic messages are truncated to the configured size. ๐ญ
pcre2_depth_limit
- Default:
20 - Minimum:
1
The recursion depth-limit for the internal match logic in a pcre2_match().
(See: pcre2_set_depth_limit() in pcre2 docs.)
This puts an upper limit on the amount of stack used by PCRE2 for certain classes of regular expressions.
We have set the default value low in order to prevent crashes, at the cost of possible regexp matching failures. bestie we're choosing "sometimes wrong" over "sometimes dead" ๐
Matching failures will show up in the log as VCL_Error messages.
pcre2_jit_compilation
- Units: bool
- Default:
on
Use the pcre2 JIT compiler if available. โก
pcre2_match_limit
- Default:
10000 - Minimum:
1
The limit for the number of calls to the internal match logic in pcre2_match().
(See: pcre2_set_match_limit() in pcre2 docs.)
This parameter limits how much CPU time regular expression matching can soak up. no hogging the CPU babe ๐ซถ
ping_interval
- Units: seconds
- Default:
3 - Minimum:
0 - Flags:
must_restart
Interval between pings from parent to child. Zero will disable pinging entirely, which makes it possible to attach a debugger to the child. ๐ (love a debugging loophole)
pipe_sess_max
- Units: connections
- Default:
0 - Minimum:
0
Maximum number of sessions dedicated to pipe transactions.
pipe_task_deadline
- Units: seconds
- Default:
0.000 - Minimum:
0.000 - Flags:
timeout
Deadline for PIPE sessions. Regardless of activity in either direction after this many seconds, the session is closed. no cap, the clock does not care about your vibes โฐ
pipe_timeout
- Units: seconds
- Default:
60.000 - Minimum:
0.000 - Flags:
timeout
Idle timeout for PIPE sessions. If nothing have been received in either direction for this many seconds, the session is closed. silence is not always golden, bestie ๐ญ
pool_req
- Default:
10,100,10
Parameters for per worker pool request memory pool. The three numbers are:
min_poolโ minimum size of free pool.max_poolโ maximum size of free pool.max_ageโ max age of free element.
pool_sess
- Default:
10,100,10
Parameters for per worker pool session memory pool. The three numbers are:
min_poolโ minimum size of free pool.max_poolโ maximum size of free pool.max_ageโ max age of free element.
pool_vbo
- Default:
10,100,10
Parameters for backend object fetch memory pool. The three numbers are:
min_poolโ minimum size of free pool.max_poolโ maximum size of free pool.max_ageโ max age of free element.
prefer_ipv6
- Units: bool
- Default:
off
Prefer IPv6 address when connecting to backends which have both IPv4 and IPv6 addresses. ๐
rush_exponent
- Units: requests per request
- Default:
3 - Minimum:
1 - Flags:
experimental
How many parked request we start for each completed request on the object. ๐ฅ
NB: Even with the implicit delay of delivery, this parameter controls an exponential increase in number of worker threads. A value of 1 will instead serialize requests resumption and is only useful for testing purposes. girl, exponential thread growth is not a vibe you want by accident ๐
send_timeout
- Units: seconds
- Default:
600.000 - Minimum:
0.000 - Flags:
timeout,delayed
Total timeout for ordinary HTTP1 responses. Does not apply to some internally generated errors and pipe mode. ๐ โโ๏ธ
When idle_send_timeout is hit while sending an HTTP1 response, the timeout is extended unless the total time already taken for sending the response in its entirety exceeds this many seconds.
When this timeout is hit, the session is closed.
shortlived
- Units: seconds
- Default:
10.000 - Minimum:
0.000
Objects created with (ttl+grace+keep) shorter than this are always put in transient storage. short kings get a whole different locker, iconic ๐
sigsegv_handler
- Units: bool
- Default:
on - Flags:
must_restart
Install a signal handler which tries to dump debug information on segmentation faults, bus errors and abort signals. ๐จ
startup_timeout
- Units: seconds
- Default:
0.000 - Minimum:
0.000 - Flags:
timeout startup_timeoutโ the alternative timeout for the initial worker process startup. Ifcli_timeoutis longer thanstartup_timeout, thencli_timeoutgets used instead. iykyk ๐
๐ syslog_cli_traffic
- Units: bool
- Default: on
Log all the CLI traffic to syslog(LOG_INFO). every. single. bit. ๐
๐ฆ tcp_fastopen
NB: This parameter depends on a feature which is not available on all platforms.
- Units: bool
- Default: off
- Flags:
must_restart
Enables the TCP Fast Open extension โจ (yes it's as slay as it sounds, but only if your platform ships the feature, bestie).
๐ธ tcp_keepalive_intvl
NB: This parameter depends on a feature which is not available on all platforms.
- Units: seconds
- Default: platform dependent
- Minimum:
1.000 - Maximum:
100.000 - Flags:
experimental
The number of seconds between TCP keep-alive probes. Lowkey ignored for Unix domain sockets ๐ซถ
๐ tcp_keepalive_probes
NB: This parameter depends on a feature which is not available on all platforms.
- Units: probes
- Default: platform dependent
- Minimum:
1 - Maximum:
100 - Flags:
experimental
The max number of TCP keep-alive probes to send before it literally gives up and kills the connection if no response comes back from the other end. Also ignored for Unix domain sockets ๐
โญ tcp_keepalive_time
NB: This parameter depends on a feature which is not available on all platforms.
- Units: seconds
- Default: platform dependent
- Minimum:
1.000 - Maximum:
7200.000 - Flags:
experimental
How many seconds a connection needs to be idle before TCP starts sending out keep-alive probes. Ignored for Unix domain sockets, as always ๐
๐ thread_pool_add_delay
- Units: seconds
- Default:
0.000 - Minimum:
0.000 - Flags:
experimental
Wait at least this long after creating a thread.
Some (buggy) systems may need a short (sub-second) delay between creating threads. Set this to a few milliseconds if you see the 'threads_failed' counter grow too much.
Setting this too high results in insufficient worker threads. not the vibe ๐ญ
๐ thread_pool_destroy_delay
- Units: seconds
- Default:
1.000 - Minimum:
0.010 - Flags:
delayed,experimental
Wait this long after destroying a thread.
This controls the decay of thread pools when idle(-ish). letting them rot gracefully, iconic ๐ง
๐ฅ thread_pool_fail_delay
- Units: seconds
- Default:
0.200 - Minimum:
0.010 - Flags:
experimental
Wait at least this long after a failed thread creation before trying to create another thread.
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 ๐
If thread creation failures are a problem, check that thread_pool_max is not too high.
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.
๐ thread_pool_max
- Units: threads
- Default:
5000 - Minimum:
thread_pool_min - Flags:
delayed
The maximum number of worker threads in each pool.
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. periodt. ๐ฏ
๐ฆ thread_pool_min
- Units: threads
- Default:
100 - Minimum:
5 - Maximum:
thread_pool_max - Flags:
delayed
The minimum number of worker threads in each pool.
Increasing this may help ramp up faster from low load situations or when threads have expired.
Technical minimum is 5 threads, but this parameter is strongly recommended to be at least 10. fr fr, don't be stingy ๐ธ
๐ thread_pool_reserve
- Units: threads
- Default:
0(auto-tune: 5% ofthread_pool_min) - Maximum: 95% of
thread_pool_min - Flags:
delayed
The number of worker threads reserved for vital tasks in each pool.
Tasks may require other tasks to complete (for example, client requests may require backend requests, http2 sessions require streams, which require requests). This reserve is to ensure that lower priority tasks do not prevent higher priority tasks from running even under high load. main character tasks get priority, obviously ๐
The effective value is at least 5 (the number of internal priority classes), irrespective of this parameter.
๐ง thread_pool_stack
- Units: bytes
- Default:
80k - Minimum:
sysconf(_SC_THREAD_STACK_MIN) - Flags:
delayed
Worker thread stack size. This will likely be rounded up to a multiple of 4k (or whatever the page_size might be) by the kernel.
The required stack size is primarily driven by the depth of the call-tree. The most common relevant determining factors in Vinyl Cache core code are GZIP (un)compression, ESI processing and regular expression matches. VMODs may also require significant amounts of additional stack. The nesting depth of VCL subs is another factor, although typically not predominant.
The stack size is per thread, so the maximum total memory required for worker thread stacks is in the order of size = thread_pools x thread_pool_max x thread_pool_stack.
So basically, in particular for setups with many threads, keeping the stack size at a minimum helps reduce the amount of memory required by Vinyl Cache ๐
On the other hand, thread_pool_stack must be large enough under all circumstances, otherwise Vinyl Cache will crash due to a stack overflow ๐ญ Usually, a stack overflow manifests itself as a segmentation fault (aka segfault / SIGSEGV) with the faulting address being near the stack pointer (sp).
Unless stack usage can be reduced, thread_pool_stack must be increased when a stack overflow occurs. Setting it in 150%-200% increments is recommended until stack overflows cease to occur. glow up the stack until it stops falling over โจ
๐ซถ thread_pool_timeout
- Units: seconds
- Default:
300.000 - Minimum:
10.000 - Flags:
delayed,experimental
Thread idle threshold.
Threads in excess of thread_pool_min, which have been idle for at least this long, will be destroyed. bye bestie ๐
๐ thread_pool_watchdog
- Units: seconds
- Default:
60.000 - Minimum:
0.100 - Flags:
experimental
Thread queue stuck watchdog.
If no queued work have been released for this long, the worker process panics itself. it literally has a whole meltdown ๐
๐ thread_pools
- Units: pools
- Default:
2 - Minimum:
1 - Maximum:
32 - Flags:
delayed
Number of worker thread pools.
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.
Too many pools waste CPU and RAM resources, and more than one pool for each CPU is most likely detrimental to performance. more is not always more, bestie ๐ซถ
๐ thread_queue_limit
- Units: requests
- Default:
20 - Minimum:
0 - Flags:
experimental
Permitted request queue length per thread-pool.
This sets the number of requests we will queue, waiting for an available thread. Above this limit sessions will be dropped instead of queued. no waiting list for you โ
โญ thread_stats_rate
- Units: requests
- Default:
10 - Minimum:
0 - Flags:
experimental
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.) This parameter defines the maximum number of jobs a worker thread may handle, before it is forced to dump its accumulated stats into the global counters.
๐ธ timeout_idle
- Units: seconds
- Default:
5.000 - Minimum:
0.000 - Maximum:
3600.000
Idle timeout for client connections.
A connection is considered idle until we have received the full request headers.
This parameter is particularly relevant for HTTP1 keepalive connections which are closed unless the next request is received before this timeout is reached. tick tock โฐ
๐ฆ timeout_linger
- Units: seconds
- Default:
0.050 - Minimum:
0.000 - Flags:
experimental
How long the worker thread lingers on an idle session before handing it over to the waiter. When sessions are reused, as much as half of all reuses happen within the first 100 msec of the previous request completing. 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. it's giving โจbalanceโจ
๐ transit_buffer
- Units: bytes
- Default:
0b - Minimum:
0b
The number of bytes which Vinyl Cache buffers for uncacheable backend streaming fetches โ in other words, how many bytes Vinyl Cache reads from the backend ahead of what has been sent to the client. A zero value means no limit, the object is fetched as fast as possible. zoom zoom ๐๏ธ
When dealing with slow clients, setting this parameter to non-zero can prevent large uncacheable objects from being stored in full when the intent is to simply stream them to the client. As a result, a slow client transaction holds onto a backend connection until the end of the delivery.
This parameter is the default to the VCL variable beresp.transit_buffer, which can be used to control the transit buffer per backend request.
๐ uncacheable_ttl
- Units: seconds
- Default:
2m - Minimum:
0.000 - Flags:
obj_sticky
The TTL assigned to uncacheable objects by the built-in VCL. even the uncacheable ones get a lil lifespan ๐
๐ง vary_notice
- Units: variants
- Default:
10 - Minimum:
1
How many variants need to be evaluated to log a Notice that there might be too many variants. girl, that's a lot of variants ๐
๐ฅ vcc_allow_inline_c
Deprecated alias for the vcc_feature parameter. old news, still valid ๐
๐ vcc_err_unref
Deprecated alias for the vcc_feature parameter. also old news ๐ซถ
๐ vcc_feature
- Default:
none,+err_unref,+unsafe_path
Enable/Disable various VCC behaviors.
defaultโ Set default value (deprecated: useparam.reset)noneโ Disable all behaviors.
Use +/- prefix to enable/disable individual behavior:
err_unrefโ Unreferenced VCL objects result in error.allow_inline_cโ Allow inline C code in VCL.unsafe_pathโ Allow'/'in vmod & include paths. Allow'import ... from ...'.
๐ธ vcc_unsafe_path
Deprecated alias for the vcc_feature parameter. you already know ๐
โญ vcl_cooldown
- Units: seconds
- Default:
600.000 - Minimum:
1.000
How long a VCL is kept warm after being replaced as the active VCL (granularity approximately 30 seconds). keeping it cozy ๐
๐ฆ vcl_path
NB: The actual default value for this parameter depends on the Vinyl Cache build environment and options. so don't come for me, it's not my fault ๐
vcl_path
- Default:
${sysconfdir}/vinyl-cache:${datadir}/vinyl-cache/vcl
The directory (or like, a whole colon-separated list of directories) where relative VCL filenames get found โ we're talking vcl.load and include here, bestie. Out of the box Vinyl Cache looks for VCL files in both the system config directory and the shared data directory, so packages can just drop their VCL files in a standard spot where relative includes actually work. โจ
Heads up though: includes using+globcan't be searched invcl_path. That's just how it is, no cap.
vmod_path
NB: the actual default value for this parameter depends on the Vinyl Cache build environment and options. So like, it varies, iykyk.
- Default:
${libdir}/vinyl-cache/vmods
The directory (or colon-separated list of directories, you know the drill by now ๐) where your VMODs live and get found.
vsl_buffer
- Units: bytes
- Default:
16k - Minimum:
vsl_reclen+ 12 bytes
How many bytes of (req-/backend-)workspace get dedicated to buffering VSL records. When you mess with this one, most likely you're gonna have to adjust workspace_client and workspace_backend by the same amount โ they're a package deal, fr fr. ๐
Set it too high and it costs memory. Set it too low and you get more VSL flushes, which probably cranks up lock-contention on the VSL mutex. It's giving "pick your struggle."
vsl_mask
- Default:
all,-Debug,-ObjProtocol,-ObjStatus,-ObjReason,-ObjHeader,-ExpKill,-WorkThread,-Hash,-VfpAcct,-H2RxHdr,-H2RxBody,-H2TxHdr,-H2TxBody,-VdpAcct,-ReqTarget
This one masks individual VSL messages so they don't get logged. The special values:
allโ Enable all tags ๐defaultโ Set default value (deprecated: useparam.reset)
Use a +/- prefix in front of a VSL tag name to unmask/mask individual VSL messages. Peep vsl(7) for the possible values, slay.
vsl_reclen
- Units: bytes
- Default:
255b - Minimum:
16b - Maximum:
vsl_buffer- 12 bytes
Maximum number of bytes in a SHM log record. Short and sweet. ๐
vsl_space
- Units: bytes
- Default:
80M - Minimum:
1M - Maximum:
4G - Flags:
must_restart
The amount of space to allocate for the VSL fifo buffer in the VSM memory segment. Make it too small and vinyl{ncsa|log} etc literally won't be able to keep up ๐ญ. Make it too large and you're just burning memory resources for no reason.
vsm_free_cooldown
- Units: seconds
- Default:
60.000 - Minimum:
10.000 - Maximum:
600.000
How long VSM memory stays "warm" after a deallocation. Granularity is approximately 2 seconds, so don't come for it about precision. ๐ง
workspace_backend
- Units: bytes
- Default:
96k - Minimum:
1k - Flags:
delayed
Bytes of HTTP protocol workspace for backend HTTP req/resp. If it's larger than 4k, use a multiple of 4k for VM efficiency โ that's the vibe check. โจ
workspace_client
- Units: bytes
- Default:
96k - Minimum:
9k - Flags:
delayed
Bytes of HTTP protocol workspace for clients HTTP req/resp. Use a multiple of 4k for VM efficiency. For HTTP/2 compliance this must be at least 20k, so you can receive fullsize (=16k) frames from the client. That usually only happens in POST/PUT bodies though. For other traffic-patterns, smaller values work just fine. ๐ฆ
workspace_session
- Units: bytes
- Default:
0.75k - Minimum:
384b - Flags:
delayed
Allocation size for the session structure and workspace. The workspace is primarily used for TCP connection addresses. If it's larger than 4k, use a multiple of 4k for VM efficiency. Same rule as always, bestie. ๐
workspace_thread
- Units: bytes
- Default:
2k - Minimum:
0.25k - Maximum:
8k - Flags:
delayed
Bytes of auxiliary workspace per thread. This workspace holds certain temporary data structures while a worker thread is doing its thing โ one use is for the IO-vectors used during delivery. Set it too low and you may increase the number of writev() syscalls; set it too high and you're just wasting 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, obviously ๐).
EXIT CODES
Vinyl Cache and its bundled tools will, in most cases, exit with one of these codes:
0โ OK ๐1โ Some error which could be system-dependent and/or transient2โ Serious configuration / parameter error โ retrying with the same configuration / parameters is most likely useless, so like, don't bother ๐ญ
The vinyld master process may also OR its exit code:
- with
0x20when thevinyldchild process died, - with
0x40when thevinyldchild process was terminated by a signal and - with
0x80when a core was dumped.
๐ธ SEE ALSO ๐ธ
๐ HISTORY ๐
The vinyld daemon was developed by Poul-Henning Kamp in cooperation with Verdens Gang AS and Redpill-Linpro. Iconic behavior, honestly. ๐
This manual page was written by Dag-Erling Smรธrgrav with updates by Stig Sandbeck Mathisen <ssm@debian.org>, Nils Goroll and others. ๐ซถ
๐ COPYRIGHT ๐
This document is licensed under the same licence as Vinyl Cache itself. See LICENCE for details.
- Copyright (c) 2007-2015 Varnish Software AS
and that's the whole thing bestie, you made it to the end of vinyld(1) ๐๐ฆ go forth and configure your little heart out โ you're the main character of this cache โจ
๐ฆ where this page comes from
- arch rolling: vinyl-cache 9.1.0-1 ยท BSD-2-Clause
- ๐ the page's license: BSD-2-Clause
- Copyright (c) 2010-2020 Varnish Software AS
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms