Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an installation of Varnish 3.02 on an Amazon EC2 Medium Linux instance in front of two relatively low-traffic websites. After an uptime of 2 hours, there are 3400 objects in the cache. Using varnishstat, I checked the variables SMA.s0.c_bytes and SMA.s0.c_freed, which I assume correspond to the total number of bytes allocated since startup and the number freed, respectively. No objects should have had time to expire during these two hours, but still about 60% of the memory allocated since startup (330MB out of 560MB) has already been freed. Do you know if this is normal? If not, do you know what kind of configuration could be wrong?

share|improve this question
    
This seems normal. Not all objects are cacheable. –  David Schwartz Mar 19 '12 at 16:48
    
Thanks David for your comment. So you mean those bytes correspond to data that was never actually in the cache, but that Varnish had to allocate memory for as part of its general processing? –  Peter Herdenborg Mar 20 '12 at 11:26
    
Varnish handles both cacheable objects (like static images) and uncacheable objects (like pages constructed by scripts or programs in response to dynamic queries). Uncacheable objects are never placed in the cache but Varnish still has to allocate memory to hold them while it's processing them. –  David Schwartz Mar 20 '12 at 15:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.