Commit c0c52dee authored by Per Buer's avatar Per Buer

Rework the storage text for clarity

parent 73a4b5df
...@@ -9,7 +9,10 @@ Intro ...@@ -9,7 +9,10 @@ Intro
~~~~~ ~~~~~
Varnish has pluggable storage backends. It can store data in various Varnish has pluggable storage backends. It can store data in various
backends which have different performance characteristics. backends which have different performance characteristics. The default
configuration is to use the malloc backend with a limited size. For a
serious Varnish deployment you probably need to adjust the storage
settings.
malloc malloc
~~~~~~ ~~~~~~
...@@ -17,9 +20,10 @@ malloc ...@@ -17,9 +20,10 @@ malloc
syntax: malloc[,size] syntax: malloc[,size]
Malloc is a memory based backend. Each object will be allocated from Malloc is a memory based backend. Each object will be allocated from
memory. If your system runs low on memory swap will be used. Be aware memory. If your system runs low on memory swap will be used.
that the size limitation only limits the actual storage and that
approximately 1k of memory per object will be used for various Be aware that the size limitation only limits the actual storage and
that approximately 1k of memory per object will be used for various
internal structures. internal structures.
The size parameter specifies the maximum amount of memory varnishd The size parameter specifies the maximum amount of memory varnishd
...@@ -34,7 +38,8 @@ one of the following suffixes: ...@@ -34,7 +38,8 @@ one of the following suffixes:
T, t The size is expressed in tebibytes. T, t The size is expressed in tebibytes.
The default size is unlimited. If no size is given the malloc backend will not limit how much memory
it can allocate.
Mallocs performance is bound by memory speed so it is very fast. Mallocs performance is bound by memory speed so it is very fast.
...@@ -66,15 +71,15 @@ suffixes: ...@@ -66,15 +71,15 @@ suffixes:
% The size is expressed as a percentage of the free space on the % The size is expressed as a percentage of the free space on the
file system where it resides. file system where it resides.
The default size is 50%. The default size is to use 50% of the space available on the device.
If the backing file already exists, it will be truncated or expanded If the backing file already exists, it will be truncated or expanded
to the specified size. to the specified size.
Note that if varnishd has to create or expand the file, it will not Note that if varnishd has to create or expand the file, it will not
pre-allocate the added space, leading to fragmentation, which may pre-allocate the added space, leading to fragmentation, which may
adversely impact performance. Pre-creating the storage file using adversely impact performance on rotating hard drives. Pre-creating
dd(1) will reduce fragmentation to a minimum. the storage file using dd(1) will reduce fragmentation to a minimum.
The granularity parameter specifies the granularity of The granularity parameter specifies the granularity of
allocation. All allocations are rounded up to this size. The allocation. All allocations are rounded up to this size. The
...@@ -128,3 +133,6 @@ Transient Storage ...@@ -128,3 +133,6 @@ Transient Storage
If you name any of your storage backend "Transient" it will be If you name any of your storage backend "Transient" it will be
used for transient (short lived) objects. By default Varnish used for transient (short lived) objects. By default Varnish
would use an unlimited malloc backend for this. would use an unlimited malloc backend for this.
Varnish will consider an object short lived if the TTL is below the
parameter "shortlived".
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment