Provided by: varnish_1.0.3-2_i386 bug

NAME

     varnishd - HTTP accelerator daemon

SYNOPSIS

     varnishd [-a addrss[:port]] [-b host[:port]] [-d] [-f config]
              [-h type[,options]] [-p param=value] [-s type[,options]]
              [-T address[:port]] [-t ttl] [-V] [-w min[,max[,timeout]]]

DESCRIPTION

     The varnishd daemon accepts HTTP requests from clients, passes them on to
     a backend server and caches the returned documents to better satisfy
     future requests for the same document.

     The following options are available:

     -a address[:port]
                 Listen for client requests on the specified address and port.
                 The address can be a host name, an IPv4 dotted-quad, or an
                 IPv6 address enclosed in square brackets.  If address is not
                 specified, varnishd will listen on all available interfaces.
                 If port is not specified, the default HTTP port as listed in
                 /etc/services is used.

     -b host[:port]
                 Use the specified host as backend server.  If port is not
                 specified, the default is 8080.

     -d          Enables debugging mode.  This causes varnishd to fork; the
                 child process daemonizes and runs as usual, while the parent
                 process remains attached to the console and will accept
                 management commands from stdin.  If the parent process
                 receives EOF, it will terminate, but the child process will
                 continue to run.

                 The child process will not start accepting client connections
                 until the start command is given.

                 If the -d flag is specified twice, the child process will not
                 daemonize, and terminating the parent process will also
                 terminate the child.

     -f config   Use the specified VCL configuration file instead of the
                 builtin default.

     -h type[,options]
                 Specifies the hash algorithm.  See Hash Algorithms for a list
                 of supported algorithms.

     -p param=value
                 Set the parameter specified by param to the specified value.
                 See Run-Time Parameters for a list of parameters.

     -s type[,options]
                 Use the specified storage backend.  See Storage Types for a
                 list of supported storage types.

     -T address[:port]
                 Offer a management interface on the specified address and
                 port.  See Management Interface for a list of management
                 commands.

     -t ttl      Specifies a hard minimum time to live for cached documents.

     -V          Display the version number and exit.

     -w min[,max[,timeout]]
                 Start at least min but no more than max worker threads with
                 the specified idle timeout.

                 If only min is specified, varnishd will start min threads and
                 will not kill idle threads.

                 If both min and max are specified, the number of threads is
                 allowed to vary within the specified range according to
                 system load.  Idle threads are killed after timeout seconds.

                 The default values are 1 for min, infinity for max, and 10
                 for timeout.

   Hash Algorithms
     The following hash algorithms are available:

     simple_list
           A simple doubly-linked list.  Not recommended for production use.

     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.

           The buckets parameter specifies the number of entries in the hash
           table.  The default is 16383.

   Storage Types
     The following storage types are available:

     malloc
           Storage for each object is allocated with malloc(3).  Not
           recommended for production use.

     file[,path[,size]]
           Storage for each object is allocated from an arena backed by a
           file.

           The path parameter specifies either the path to the backing file or
           the path to a directory in which varnishd will create the backing
           file.  The default is /tmp.

           The size parameter specifies the size of the backing file.  If the
           backing file already exists, it will be truncated or expanded to
           the specified size.

           Note that if varnishd has to create or expand the file, it will not
           pre-allocate the added space, leading to fragmentation, which may
           adversely impact performance.  Pre-creating the storage file using
           dd(1) will reduce fragmentation to a minimum.

   Management Interface
     If the --T option was specified, varnishd will offer a command-line
     management interface on the specified address and port.  The following
     commands are available:

     dump.pool

     help  Display a list of available commands.

     param.set param value
           Set the parameter specified by param to the specified value.  See
           Run-Time Parameters for a list of parameters.

     param.show param
           Display the value of the parameter specified by param.  See
           Run-Time Parameters for a list of parameters.

     param.show [-l]
           Display a list of run-time parameters and their values.  If the -l
           option is specified, the list includes a brief explanation of each
           parameter.

     ping [timestamp]
           Ping the child process.

     start
           Start the child process if it is not already running.

     stats
           Display server statistics.  All the numbers presented are totals
           since server startup; for a better idea of the current situation,
           use the varnishstat(1) utility.

     stop  Stop the child process.

     url.purge regexp
           Immediately invalidate all documents whos URL matches the specified
           regular expression.

     vcl.discard configname
           Discard the configuration specified by configname.  This will have
           no effect if the specified configuration has a non-zero reference
           count.

     vcl.inline configname vcl
           Create a new configuration named configname with the VCL code
           specified by vcl, which must be a quoted string.

     vcl.list
           List available configurations and their respective reference
           counts.  The active configuration is indicated with an asterisk
           ("*").

     vcl.load configname filename
           Create a new configuration named configname with the contents of
           the specified file.

     vcl.use configname
           Start using the configuration specified by configname for all new
           requests.  Existing requests will continue using whichever
           configuration was in use when they arrived.

   Run-Time Parameters
     auto_restart
           Whether to automatically restart the child process if it dies.

           The default is on.

     backend_http11
           Whether to force the use of HTTP/1.1 when requesting documents from
           the server, or just use the same protocol version as the client
           which triggered the retrieval.

           The default is off.

     client_http11
           Whether to force the use of HTTP/1.1 when responding to client
           requests, or just use the same protocol version as that used by the
           backend server which delivered the requested document.

           The default is off.

     default_ttl
           The default time-to-live assigned to objects if neither the backend
           nor the configuration assign one.  Note that changes to this
           parameter are not applied retroactively.

           The default is 120 seconds.

     fetch_chunksize
           The default chunk size used when retrieving documents for which the
           backend server does not specify a content length.

           The default is 128 kilobytes.

     http_workspace
           The size of the per-session workspace for HTTP protocol data.  For
           performance reasons, this space is preallocated, so any change to
           this parameter will only apply to new client sessions.

           The default is 8192 bytes.

     listen_address
           The address at which to listen for client connections.  Changes to
           this parameter will only take effect when the child process is
           restarted.

           The default is 0.0.0.0:80.

     listen_depth
           The depth of the TCP listen queue.

           The default is 512.

     overflow_max
           The maximum depth of the overflow queue as a percentage of
           thread_pool_max.  The overflow queue holds requests waiting for a
           worker thread to become available.  If the overflow queue fills up,
           varnishd will start dropping new connections.

           The default is 100%.

     pipe_timeout

     sendfile_threshold
           The size threshold beyond which documents are sent to the client
           using sendfile(2) instead of writev(2).  This is not likely to have
           any effect unless the working set is too large to fit in physical
           memory.

           The default is 8192 bytes, which is probably too low.

     send_timeout
           The time to wait before dropping the connection to a client which
           is not accepting data sent to it.

           The default is 600 seconds.

     sess_timeout
           The time to wait before dropping an idle client session.

           The default is 5 seconds.

     srcaddr_hash
           The size of the hash table used to store per-client accounting
           data.  This should preferably be a prime number.

           The default is 1049.

     srcaddr_ttl
           The length of time to keep per-client accounting records.  Setting
           this to 0 will disable per-client accounting.

     thread_pool_max
           The maximum total number of worker threads.  If the number of
           concurrent requests rises beyond this number, requests will start
           queueing up waiting for a worker thread to pick them up.  Higher
           values may improve response time but will increase pressure on the
           scheduler.

           The default is 1000.

     thread_pool_min
           The minimum total number of worker threads.  Higher values may
           allow varnishd to respond faster to a sudden increase in traffic.

           The default is 1.

     thread_pools
           The number of worker thread pools.  Higher values reduce lock
           contention but increase pressure on the scheduler.  Note that a
           decrease of this parameter will only take effect after a restart.

           The default is 1.

     thread_pool_timeout
           The time to wait before killing an idle worker thread.

           The default is 120 seconds.

     vcl_trace
           Whether to issue log entries for calls to VCL code and their
           results.  Note that this will generate large amounts of log data.

           The default is off.

SEE ALSO

     varnishlog(1), varnishhist(1), varnishncsa(1), varnishstat(1),
     varnishtop(1), vcl(7)

HISTORY

     The varnishd daemon was developed by Poul-Henning Kamp
     〈phk@phk.freebsd.dk〉 in cooperation with Verdens Gang AS and Linpro AS.
     This manual page was written by Dag-Erling Smørgrav 〈des@linpro.no〉.