-
Notifications
You must be signed in to change notification settings - Fork 4
Server Runtime Parameters
nw edited this page Feb 11, 2013
·
1 revision
acceptor_sleep_decay 0.900000 []
Default is 0.900
If we run out of resources, such as file
descriptors or worker threads, the acceptor will
sleep between accepts.
This parameter (multiplicatively) reduce the
sleep duration for each succesfull accept. (ie:
0.9 = reduce by 10%)
NB: We do not know yet if it is a good idea to
change this parameter, or if the default value is
even sensible. Caution is advised, and feedback
is most welcome.
acceptor_sleep_incr 0.001000 [s]
Default is 0.001
If we run out of resources, such as file
descriptors or worker threads, the acceptor will
sleep between accepts.
This parameter control how much longer we sleep,
each time we fail to accept a new connection.
NB: We do not know yet if it is a good idea to
change this parameter, or if the default value is
even sensible. Caution is advised, and feedback
is most welcome.
acceptor_sleep_max 0.050000 [s]
Default is 0.050
If we run out of resources, such as file
descriptors or worker threads, the acceptor will
sleep between accepts.
This parameter limits how long it can sleep
between attempts to accept new connections.
NB: We do not know yet if it is a good idea to
change this parameter, or if the default value is
even sensible. Caution is advised, and feedback
is most welcome.
auto_restart on [bool]
Default is on
Restart child process automatically if it dies.
ban_dups on [bool]
Default is on
Detect and eliminate duplicate bans.
ban_lurker_sleep 100.000000 [s]
Default is 0.01
How long time does the ban lurker thread sleeps
between successful attempts to push the last item
up the ban list. It always sleeps a second when
nothing can be done.
A value of zero disables the ban lurker.
between_bytes_timeout 60.000000 [s]
Default is 60
Default timeout between bytes when receiving data
from backend. We only wait for this many seconds
between bytes before giving up. A value of 0
means it will never time out. VCL can override
this default value for each backend request and
backend request. This parameter does not apply to
pipe.
cc_command "exec cc -dynamiclib -Wl,-undefined,dynamic_lookup -o %o %s"
Default is exec cc -dynamiclib -Wl,-undefined,dynamic_lookup -o %o %s
Command used for compiling the C source code to a
dlopen(3) loadable object. Any occurrence of %s
in the string will be replaced with the source
file name, and %o will be replaced with the
output file name.
NB: This parameter will not take any effect until
the VCL programs have been reloaded.
cli_buffer 8192 [bytes]
Default is 8192
Size of buffer for CLI input.
You may need to increase this if you have big VCL
files and use the vcl.inline CLI command.
NB: Must be specified with -p to have effect.
cli_timeout 10 [seconds]
Default is 10
Timeout for the childs replies to CLI requests
from the master.
clock_skew 10 [s]
Default is 10
How much clockskew we are willing to accept
between the backend and our own clock.
connect_timeout 0.700000 [s]
Default is 0.7
Default connection timeout for backend
connections. We only try to connect to the
backend for this many seconds before giving up.
VCL can override this default value for each
backend and backend request.
critbit_cooloff 180.000000 [s]
Default is 180.0
How long time the critbit hasher keeps deleted
objheads on the cooloff list.
NB: Do not change this parameter, unless a
developer tell you to do so.
default_grace 10.000000 [seconds]
Default is 10
Default grace period. We will deliver an object
this long after it has expired, provided another
thread is attempting to get a new copy.
Objects already cached will not be affected by
changes made until they are fetched from the
backend again.
NB: This parameter may take quite some time to
take (full) effect.
default_keep 0.000000 [seconds]
Default is 0
Default keep period. We will keep a useless
object around this long, making it available for
conditional backend fetches. That means that the
object will be removed from the cache at the end
of ttl+grace+keep.
NB: This parameter may take quite some time to
take (full) effect.
default_ttl 120.000000 [seconds]
Default is 120
The TTL assigned to objects if neither the
backend nor the VCL code assigns one.
Objects already cached will not be affected by
changes made until they are fetched from the
backend again.
To force an immediate effect at the expense of a
total flush of the cache use "ban.url ."
diag_bitmap 0x0 [bitmap]
Default is 0
Bitmap controlling diagnostics code:
0x00000001 - CNT_Session states.
0x00000002 - workspace debugging.
0x00000004 - kqueue debugging.
0x00000008 - mutex logging.
0x00000010 - mutex contests.
0x00000020 - waiting list.
0x00000040 - object workspace.
0x00001000 - do not core-dump child process.
0x00002000 - only short panic message.
0x00004000 - panic to stderr.
0x00010000 - synchronize shmlog.
0x00020000 - synchronous start of persistence.
0x00040000 - release VCL early.
0x00080000 - ban-lurker debugging.
0x80000000 - do edge-detection on digest.
Use 0x notation and do the bitor in your head :-)
esi_syntax 0 [bitmap]
Default is 0
Bitmap controlling ESI parsing code:
0x00000001 - Don't check if it looks like XML
0x00000002 - Ignore non-esi elements
0x00000004 - Emit parsing debug records
0x00000008 - Force-split parser input
(debugging)
Use 0x notation and do the bitor in your head :-)
expiry_sleep 1.000000 [seconds]
Default is 1
How long the expiry thread sleeps when there is
nothing for it to do.
fetch_chunksize 128 [kilobytes]
Default is 128
The default chunksize used by fetcher. This
should be bigger than the majority of objects
with short TTLs.
Internal limits in the storage_file module makes
increases above 128kb a dubious idea.
NB: We do not know yet if it is a good idea to
change this parameter, or if the default value is
even sensible. Caution is advised, and feedback
is most welcome.
fetch_maxchunksize 262144 [kilobytes]
Default is 262144
The maximum chunksize we attempt to allocate from
storage. Making this too large may cause delays
and storage fragmentation.
NB: We do not know yet if it is a good idea to
change this parameter, or if the default value is
even sensible. Caution is advised, and feedback
is most welcome.
first_byte_timeout 60.000000 [s]
Default is 60
Default timeout for receiving first byte from
backend. We only wait for this many seconds for
the first byte before giving up. A value of 0
means it will never time out. VCL can override
this default value for each backend and backend
request. This parameter does not apply to pipe.
group nobody (-2)
Default is
The unprivileged group to run as.
NB: This parameter will not take any effect until
the child process has been restarted.
gzip_level 6 []
Default is 6
Gzip compression level: 0=debug, 1=fast, 9=best
gzip_memlevel 8 []
Default is 8
Gzip memory level 1=slow/least, 9=fast/most
compression.
Memory impact is 1=1k, 2=2k, ... 9=256k.
gzip_stack_buffer 32768 [Bytes]
Default is 32768
Size of stack buffer used for gzip processing.
The stack buffers are used for in-transit data,
for instance gunzip'ed data being sent to a
client.Making this space to small results in more
overhead, writes to sockets etc, making it too
big is probably just a waste of memory.
NB: We do not know yet if it is a good idea to
change this parameter, or if the default value is
even sensible. Caution is advised, and feedback
is most welcome.
gzip_tmp_space 0 []
Default is 0
Where temporary space for gzip/gunzip is
allocated:
0 - malloc
1 - session workspace
2 - thread workspace
If you have much gzip/gunzip activity, it may be
an advantage to use workspace for these
allocations to reduce malloc activity. Be aware
that gzip needs 256+KB and gunzip needs 32+KB of
workspace (64+KB if ESI processing).
NB: We do not know yet if it is a good idea to
change this parameter, or if the default value is
even sensible. Caution is advised, and feedback
is most welcome.
gzip_window 15 []
Default is 15
Gzip window size 8=least, 15=most compression.
Memory impact is 8=1k, 9=2k, ... 15=128k.
http_gzip_support on [bool]
Default is on
Enable gzip support. When enabled Varnish will
compress uncompressed objects before they are
stored in the cache. If a client does not support
gzip encoding Varnish will uncompress compressed
objects on demand. Varnish 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 Varnish reference.
NB: We do not know yet if it is a good idea to
change this parameter, or if the default value is
even sensible. Caution is advised, and feedback
is most welcome.
http_max_hdr 64 [header lines]
Default is 64
Maximum number of HTTP headers we will deal with
in client request or backend reponses. Note that
the first line occupies five header fields.
This paramter does not influence storage
consumption, objects allocate exact space for the
headers they store.
http_range_support on [bool]
Default is on
Enable support for HTTP Range headers.
http_req_hdr_len 8192 [bytes]
Default is 8192
Maximum length of any HTTP client request header
we will allow. The limit is inclusive its
continuation lines.
http_req_size 32768 [bytes]
Default is 32768
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
session workspace (param: sess_workspace) and
this parameter limits how much of that the
request is allowed to take up.
http_resp_hdr_len 8192 [bytes]
Default is 8192
Maximum length of any HTTP backend response
header we will allow. The limit is inclusive its
continuation lines.
http_resp_size 32768 [bytes]
Default is 32768
Maximum number of bytes of HTTP backend resonse
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
worker workspace (param: sess_workspace) and this
parameter limits how much of that the request is
allowed to take up.
idle_send_timeout 60 [seconds]
Default is 60
Time to wait with no data sent. If no data has
been transmitted in this many
seconds the session is closed.
See setsockopt(2) under SO_SNDTIMEO for more
information.
NB: This parameter may take quite some time to
take (full) effect.
listen_address :9000
Default is :80
Whitespace separated list of network endpoints
where Varnish will accept requests.
Possible formats: host, host:port, :port
NB: This parameter will not take any effect until
the child process has been restarted.
listen_depth 1024 [connections]
Default is 1024
Listen queue depth.
NB: This parameter will not take any effect until
the child process has been restarted.
log_hashstring on [bool]
Default is on
Log the hash string components to shared memory
log.
log_local_address off [bool]
Default is off
Log the local address on the TCP connection in
the SessionOpen shared memory record.
lru_interval 2 [seconds]
Default is 2
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.
NB: We do not know yet if it is a good idea to
change this parameter, or if the default value is
even sensible. Caution is advised, and feedback
is most welcome.
max_esi_depth 5 [levels]
Default is 5
Maximum depth of esi:include processing.
max_restarts 4 [restarts]
Default is 4
Upper limit on how many times a request can
restart.
Be aware that restarts are likely to cause a hit
against the backend, so don't increase
thoughtlessly.
nuke_limit 50 [allocations]
Default is 50
Maximum number of objects we attempt to nuke in
orderto make space for a object body.
NB: We do not know yet if it is a good idea to
change this parameter, or if the default value is
even sensible. Caution is advised, and feedback
is most welcome.
pcre_match_limit 10000 []
Default is 10000
The limit for the number of internal matching
function calls in a pcre_exec() execution.
pcre_match_limit_recursion 10000 []
Default is 10000
The limit for the number of internal matching
function recursions in a pcre_exec() execution.
ping_interval 3 [seconds]
Default is 3
Interval between pings from parent to child.
Zero will disable pinging entirely, which makes
it possible to attach a debugger to the child.
NB: This parameter will not take any effect until
the child process has been restarted.
pipe_timeout 60 [seconds]
Default is 60
Idle timeout for PIPE sessions. If nothing have
been received in either direction for this many
seconds, the session is closed.
prefer_ipv6 off [bool]
Default is off
Prefer IPv6 address when connecting to backends
which have both IPv4 and IPv6 addresses.
queue_max 100 [%]
Default is 100
Percentage permitted queue length.
This sets the ratio of queued requests to worker
threads, above which sessions will be dropped
instead of queued.
NB: We do not know yet if it is a good idea to
change this parameter, or if the default value is
even sensible. Caution is advised, and feedback
is most welcome.
rush_exponent 3 [requests per request]
Default is 3
How many parked request we start for each
completed request on the object.
NB: Even with the implict delay of delivery, this
parameter controls an exponential increase in
number of worker threads.
NB: We do not know yet if it is a good idea to
change this parameter, or if the default value is
even sensible. Caution is advised, and feedback
is most welcome.
saintmode_threshold 10 [objects]
Default is 10
The maximum number of objects held off by saint
mode before no further will be made to the
backend until one times out. A value of 0
disables saintmode.
NB: We do not know yet if it is a good idea to
change this parameter, or if the default value is
even sensible. Caution is advised, and feedback
is most welcome.
send_timeout 600 [seconds]
Default is 600
Send timeout for client connections. If the HTTP
response hasn't been transmitted in this many
seconds the session is closed.
See setsockopt(2) under SO_SNDTIMEO for more
information.
NB: This parameter may take quite some time to
take (full) effect.
sess_timeout 5 [seconds]
Default is 5
Idle timeout for persistent sessions. If a HTTP
request has not been received in this many
seconds, the session is closed.
sess_workspace 65536 [bytes]
Default is 65536
Bytes of HTTP protocol workspace allocated for
sessions. This space must be big enough for the
entire HTTP protocol header and any edits done to
it in the VCL code.
Minimum is 1024 bytes.
NB: This parameter may take quite some time to
take (full) effect.
session_linger 50 [ms]
Default is 50
How long time the workerthread lingers on the
session to see if a new request appears right
away.
If 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.
NB: We do not know yet if it is a good idea to
change this parameter, or if the default value is
even sensible. Caution is advised, and feedback
is most welcome.
session_max 100000 [sessions]
Default is 100000
Maximum number of sessions we will allocate
before just dropping connections.
This is mostly an anti-DoS measure, and setting
it plenty high should not hurt, as long as you
have the memory for it.
shm_reclen 255 [bytes]
Default is 255
Maximum number of bytes in SHM log record.
Maximum is 65535 bytes.
shm_workspace 8192 [bytes]
Default is 8192
Bytes of shmlog workspace allocated for worker
threads. If too big, it wastes some ram, if too
small it causes needless flushes of the SHM
workspace.
These flushes show up in stats as "SHM flushes
due to overflow".
Minimum is 4096 bytes.
NB: This parameter may take quite some time to
take (full) effect.
shortlived 10.000000 [s]
Default is 10.0
Objects created with TTL shorter than this are
always put in transient storage.
syslog_cli_traffic on [bool]
Default is on
Log all CLI traffic to syslog(LOG_INFO).
thread_pool_add_delay 2 [milliseconds]
Default is 2
Wait at least this long between creating threads.
Setting this too long results in insuffient
worker threads.
Setting this too short increases the risk of
worker thread pile-up.
thread_pool_add_threshold 2 [requests]
Default is 2
Overflow threshold for worker thread creation.
Setting this too low, will result in excess
worker threads, which is generally a bad idea.
Setting it too high results in insuffient worker
threads.
NB: We do not know yet if it is a good idea to
change this parameter, or if the default value is
even sensible. Caution is advised, and feedback
is most welcome.
thread_pool_fail_delay 200 [milliseconds]
Default is 200
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 RAM resources for thread stacks.
This delay tries to not rush it 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.
NB: We do not know yet if it is a good idea to
change this parameter, or if the default value is
even sensible. Caution is advised, and feedback
is most welcome.
thread_pool_max 500 [threads]
Default is 500
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.
NB: This parameter may take quite some time to
take (full) effect.
NB: We do not know yet if it is a good idea to
change this parameter, or if the default value is
even sensible. Caution is advised, and feedback
is most welcome.
thread_pool_min 2 [threads]
Default is 5
The minimum number of worker threads in each
pool.
Increasing this may help ramp up faster from low
load situations where threads have expired.
Minimum is 2 threads.
NB: This parameter may take quite some time to
take (full) effect.
NB: We do not know yet if it is a good idea to
change this parameter, or if the default value is
even sensible. Caution is advised, and feedback
is most welcome.
thread_pool_purge_delay 1000 [milliseconds]
Default is 1000
Wait this long between purging threads.
This controls the decay of thread pools when
idle(-ish).
Minimum is 100 milliseconds.
NB: This parameter may take quite some time to
take (full) effect.
NB: We do not know yet if it is a good idea to
change this parameter, or if the default value is
even sensible. Caution is advised, and feedback
is most welcome.
thread_pool_stack unlimited [bytes]
Default is -1
Worker thread stack size.
On 32bit systems you may need to tweak this down
to fit many threads into the limited address
space.
NB: We do not know yet if it is a good idea to
change this parameter, or if the default value is
even sensible. Caution is advised, and feedback
is most welcome.
thread_pool_timeout 300 [seconds]
Default is 300
Thread idle threshold.
Threads in excess of thread_pool_min, which have
been idle for at least this long are candidates
for purging.
Minimum is 1 second.
NB: This parameter may take quite some time to
take (full) effect.
NB: We do not know yet if it is a good idea to
change this parameter, or if the default value is
even sensible. Caution is advised, and feedback
is most welcome.
thread_pool_workspace 65536 [bytes]
Default is 65536
Bytes of HTTP protocol workspace allocated for
worker threads. This space must be big enough for
the backend request and responses, and response
to the client plus any other memory needs in the
VCL code.Minimum is 1024 bytes.
NB: This parameter may take quite some time to
take (full) effect.
thread_pools 2 [pools]
Default is 2
Number of worker thread pools.
Increasing number of worker pools decreases lock
contention.
Too many pools waste CPU and RAM resources, and
more than one pool for each CPU is probably
detrimal to performance.
Can be increased on the fly, but decreases
require a restart to take effect.
NB: This parameter may take quite some time to
take (full) effect.
NB: We do not know yet if it is a good idea to
change this parameter, or if the default value is
even sensible. Caution is advised, and feedback
is most welcome.
thread_stats_rate 10 [requests]
Default is 10
Worker threads accumulate statistics, and dump
these into the global stats counters if the lock
is free when they finish a request.
This parameters defines the maximum number of
requests a worker thread may handle, before it is
forced to dump its accumulated stats into the
global counters.
NB: We do not know yet if it is a good idea to
change this parameter, or if the default value is
even sensible. Caution is advised, and feedback
is most welcome.
user nobody (-2)
Default is
The unprivileged user to run as. Setting this
will also set "group" to the specified user's
primary group.
NB: This parameter will not take any effect until
the child process has been restarted.
vcc_err_unref on [bool]
Default is on
Unreferenced VCL objects result in error.
vcl_dir /usr/local/etc/varnish
Default is /usr/local/etc/varnish
Directory from which relative VCL filenames
(vcl.load and include) are opened.
vcl_trace off [bool]
Default is off
Trace VCL execution in the shmlog.
Enabling this will allow you to see the path each
request has taken through the VCL program.
This generates a lot of logrecords so it is off
by default.
vmod_dir /usr/local/lib/varnish/vmods
Default is /usr/local/lib/varnish/vmods
Directory where VCL modules are to be found.
waiter default (kqueue, poll)
Default is default
Select the waiter kernel interface.
NB: We do not know yet if it is a good idea to
change this parameter, or if the default value is
even sensible. Caution is advised, and feedback
is most welcome.
NB: This parameter will not take any effect until
the child process has been restarted.