Hi,

On Thu, Dec 30, 2010 at 12:47:36PM -0300, Roberto O. Fernández Crisial wrote:
> I have two servers running varnish (varnish-2.1.3 SVN), and both started
> with "-s malloc,28G" option.
> 
> I've tried with varnishstat, looking for sma's values (I think "sma_balloc +
> sma_bfree = 28G"), but only in one server shows "correct" information:
> 
> sma_balloc       1641487715428          .   SMA bytes allocated
> sma_bfree        1611596371850          .   SMA bytes free
> 
> The other server shows:
> 
> sma_balloc       239065444117          .   SMA bytes allocated
> sma_bfree        226776048576          .   SMA bytes free
> 
> What should I do to see the memory used and memory free from varnish cache?

sma_nbytes is probably easier to read - though you'll get the same result.

This only indicates that the second server hasn't filled the cache. To
verify this, check if the first server has n_lru_nuked objects (it should)
and compare it to the second server (which should have 0 nuked - unless the
cache size shrunk dramatically).

The sma_nbytes and related counters refer to memory used for current
objects, not what is available. To allocate space for a new object, Varnish
checks that:

 (new object size) + (sma_nbytes) < (total size, specified by -s)

Hope this helps.

- Kristian

Attachment: signature.asc
Description: Digital signature

_______________________________________________
varnish-misc mailing list
[email protected]
http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to