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

Dridi Boukelmoune dridi at varni.sh
Thu Jan 6 16:39:01 UTC 2022


On Thu, Jan 6, 2022 at 4:28 PM Nils Goroll <nils.goroll at uplex.de> wrote:
>
>
> 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

Did you mean "relying on the kernel [to] 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
> +(Solaris).
> +
> +.. 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.
> _______________________________________________
> varnish-commit mailing list
> varnish-commit at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit


More information about the varnish-commit mailing list