In message <[EMAIL PROTECTED]>, "Brian Smith" writes:

>My understanding is that Varnish uses a mmap'd file, but it doesn't re-use 
>the file's contents when it is restarted.

Correct.

> Why does Varnish use a mmap'd file 
>instead of just using regular virtual memory (swap) directly? 

For many small reasons, none of which are particularly good.

You can use regular VM by enabling the "malloc" storage method
and various people report good success with that.

>I would think 
>that the operating system would be more eager to write the data to the 
>mmap'd file than it would be to write to swap; on a system where the hot 
>cache entries can be stored on disk, it would seem that the swap-based 
>method would be superior.

Well, it's slightly more complex than that, we mmap with the
MAP_NOSYNC flag so it should be about a wash.


-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
varnish-dev mailing list
varnish-dev@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-dev

Reply via email to