Memory usage
Kristian Lyngstol
kristian at varnish-software.com
Mon Jan 3 10:56:06 CET 2011
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20110103/197a9a7d/attachment-0003.pgp>
More information about the varnish-misc
mailing list