Thanks for answering my question Tollef. I was reading about the mmap system call in Linux last night so your answer makes some sense to me. :)
Could you be so kind as to answer another question? I am wondering if I should use malloc or file for the storage type. I have read that if your cache is small enough to remain mostly in memory it is best to use malloc, but if it will exceed the amount of physical RAM you have available that mmap performs better than relying on your system's use of swap space. Is this accurate? Matt Schurenko Systems Administrator airG share your world Suite 710, 1133 Melville Street Vancouver, BC V6E 4E5 P: +1.604.408.2228 F: +1.866.874.8136 E: [email protected] W: www.airg.com -----Original Message----- From: Tollef Fog Heen [mailto:[email protected]] Sent: August-17-11 11:19 PM To: Matt Schurenko Cc: [email protected] Subject: Re: file stoarage type ]] Matt Schurenko | I've read all the documentation I can get my hands on and still don't | understand how the file Storage Type works. What does "Storage for | each object is allocated from an arena backed by a file." really mean? | For example, if I specify a size of 40GB how much physical RAM will | varnish attempt to use? Will it try to use all available RAM and, if | there's no more available, then use the file? The kernel manages the amount of physical memory to allocate as cache for the file, Varnish does not try to manage that explicitly. So, the answer is «it depends». (Varnish will use memory for threads and various other data structures, but the cache contents itself will be balanced between memory and disk by the kernel automatically.) Cheers, -- Tollef Fog Heen Varnish Software t: +47 21 98 92 64 _______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
