varnish 2.0.4 questions - no IMS, no persistence cache - please help

GaneshKumar Natarajan itisgany at gmail.com
Tue Oct 20 21:26:30 CEST 2009


I have used squid for last 2 years and i wanted to move to varnish
mainly because of the performance.

I have the following observations/questions in varnish 2.0.4. kindly
help with my questions.
Regards
Ganesh


1. varnish doesn't send IMS request, when the object expires.

detail:
When a object is set with maxage=1 min, after 1 min, varnsish calls
vcl_timeout which calls vcl_discard and the object is discarded.
any request after 1 min ( a normal GET request ), varnish downloads
the complete object from origin server.
Squid sends If-Modified-Since, If-None-Match requests to origin, which
results in 304 response, thereby origin server is not loaded.

Question: could varnish just mark the object expired and on the next
GET request to the object, send a If-Modified-Since request to origin
server?
if its not in architecture, can we do it with vcl_xxx routines to
achieve the same? let me knw how to achieve that?
--------------------------------
2. Varnish cache is not persistent.
 detail:
when i stop and restart varnish, all the objects in the cache are
lost. Varnish has to rebuild the cache from beginning, which load the
origin server.
I used mmap storage option, with the assumption that it will have a
backup copy of cached objects.

Question:
Is my observation true in 2.0.4?  If so, is there any plans to include
cache persistence in future releases?
-----------------------------------------------------
3. mmap storage : max i can configure is 340 GB.

detail::
I was able to use only 340 GB of cache. any size after this, i would get error.
child (25790) Started
Pushing vcls failed: dlopen(./vcl.1P9zoqAU.so): ./vcl.1P9zoqAU.so:
failed to map segment from shared object: Cannot allocate memory

 currently my system has 1.5 TB of storage.
squid used the entire storage.
Question:
Why there is a limitation on cache storage?
----------------------------------------------------------

4. I tried malloc storage option.
Question:
i have system of 32 GB physical ram and my swap storage is 65 GB.
harddisk storage - 1.5 TB ( distribued in 5 cache directoreys
/cach0,.../cache1 ).
What is the best optimal malloc storage i can use to achive greater performance?
-s malloc, [ size ] ???


----------------------------------------------

5. what is the difference between using malloc or mmap?


Help me to move onto varnish world and convince others in my team.

Ganesh



More information about the varnish-misc mailing list