mmap'd file vs. swap
brian at briansmith.org
Tue May 6 04:40:23 CEST 2008
Poul-Henning Kamp wrote:
> You can use regular VM by enabling the "malloc" storage method
> and various people report good success with that.
> Well, it's slightly more complex than that, we mmap with the
> MAP_NOSYNC flag so it should be about a wash.
Thanks. I wasn't familiar with MAP_NOSYNC since I am using Linux, which
doesn't have it.
In the mmap-based implementation, it looks like you have to implement
malloc-like logic yourself, including thread-safety and defragmentation.
Does the mmap-based storage have some advantage to normal malloc()
implementations (e.g. glibc, jemalloc, TCMalloc) due to its domain-specific
More information about the varnish-dev