[master] 059bc04ce Explain the basics of mmap() as relevant for the file storage

Nils Goroll nils.goroll at uplex.de
Thu Jan 6 16:28:06 UTC 2022

commit 059bc04ce55a26e3539dfb8ef0343dc60de94714
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Thu Jan 6 17:22:26 2022 +0100

    Explain the basics of mmap() as relevant for the file storage
    Closes #3760

diff --git a/doc/sphinx/users-guide/storage-backends.rst b/doc/sphinx/users-guide/storage-backends.rst
index 700d47aaa..e858ad20b 100644
--- a/doc/sphinx/users-guide/storage-backends.rst
+++ b/doc/sphinx/users-guide/storage-backends.rst
@@ -114,8 +114,18 @@ file
 syntax: file,path[,size[,granularity[,advice]]]
-The file backend stores objects in memory backed by an unlinked file on disk
-with `mmap`.
+The file backend stores objects in virtual memory backed by an
+unlinked file on disk with `mmap`, relying on the kernel handle paging
+as parts of the file are being accessed.
+This implies that sufficient *virtual* memory needs to be available to
+accomodate the file size in addition to any memory Varnish requires
+anyway. Traditionally, the virtual memory limit is configured with
+``ulimit -v``, but modern operating systems have other abstractions
+for this limit like control groups (Linux) or resource controls
+.. XXX idk about the BSD and MacOS abstractions -- slink
 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.

More information about the varnish-commit mailing list