Commit 9bf73a3b authored by Federico G. Schwindt's avatar Federico G. Schwindt

Tidy up (and document) the advice parameter

parent 1ae71b7d
...@@ -193,7 +193,7 @@ The following storage types are available: ...@@ -193,7 +193,7 @@ The following storage types are available:
malloc is a memory based backend. malloc is a memory based backend.
-s <file,path[,size[,granularity]]> -s <file,path[,size[,granularity[,advice]]]>
The file backend stores data in a file on disk. The file will be The file backend stores data in a file on disk. The file will be
accessed using mmap. accessed using mmap.
...@@ -209,6 +209,13 @@ The following storage types are available: ...@@ -209,6 +209,13 @@ The following storage types are available:
Granularity sets the allocation block size. Defaults to the system Granularity sets the allocation block size. Defaults to the system
page size or the filesystem block size, whichever is larger. page size or the filesystem block size, whichever is larger.
Advice tells the kernel how `varnishd` 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 ``sequencial``, corresponding to MADV_NORMAL, MADV_RANDOM and
MADV_SEQUENTIAL madvise() advice argument, respectively. Defaults to
``random``.
-s <persistent,path,size> -s <persistent,path,size>
Persistent storage. Varnish will store objects in a file in a manner Persistent storage. Varnish will store objects in a file in a manner
......
...@@ -93,12 +93,15 @@ have many small objects. ...@@ -93,12 +93,15 @@ have many small objects.
File performance is typically limited to the write speed of the File performance is typically limited to the write speed of the
device, and depending on use, the seek time. device, and depending on use, the seek time.
'advice' dictates what Varnish tells the system to optimize reads. Depending The 'advice' parameter tells the kernel how `varnishd` expects to
on your OS, disks and object sizes, it can be beneficial to tweak this. The use this mapped region so that the kernel can choose the appropriate
three possible values are "normal", "random" (default) and "sequential" and read-ahead and caching techniques. Possible values are ``normal``,
correspond to MADV_NORMAL, MADV_RANDOM, MADV_SEQUENTIAL, respectively. ``random`` and ``sequencial``, corresponding to MADV_NORMAL, MADV_RANDOM
For example, large objects and rotational disk should profit from "sequential" and MADV_SEQUENTIAL madvise() advice argument, respectively. Defaults to
on Linux. ``random``.
On Linux, large objects and rotational disk should benefit from
"sequential".
persistent (experimental) persistent (experimental)
~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
......
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