Mailing List Archive

[master] 059bc04ce Explain the basics of mmap() as relevant for the file storage
commit 059bc04ce55a26e3539dfb8ef0343dc60de94714
Author: Nils Goroll <nils.goroll@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
+(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@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
Re: [master] 059bc04ce Explain the basics of mmap() as relevant for the file storage [ In reply to ]
On Thu, Jan 6, 2022 at 4:28 PM Nils Goroll <nils.goroll@uplex.de> wrote:
>
>
> commit 059bc04ce55a26e3539dfb8ef0343dc60de94714
> Author: Nils Goroll <nils.goroll@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@varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
Re: [master] 059bc04ce Explain the basics of mmap() as relevant for the file storage [ In reply to ]
On 06.01.22 17:39, Dridi Boukelmoune wrote:
> Did you mean "relying on the kernel [to] handle paging" ?

yes, thx

--

** * * UPLEX - Nils Goroll Systemoptimierung

Scheffelstraße 32
22301 Hamburg

tel +49 40 28805731
mob +49 170 2723133
fax +49 40 42949753

xmpp://slink@jabber.int.uplex.de/

http://uplex.de/