Kristian,<br><br>Thank you for your reply. I was looking for a command that shows me the memory usage (userd and free) to monitors servers from Nagios/Cacti software. Do you know where can I start? Do you know anoutabout any test script to find out how many memory is being used?<br>
<br>Thank you,<br>Roberto.<br><br><br><div class="gmail_quote">2011/1/3 Kristian Lyngstol <span dir="ltr"><<a href="mailto:kristian@varnish-software.com">kristian@varnish-software.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br>
<div class="im"><br>
On Thu, Dec 30, 2010 at 12:47:36PM -0300, Roberto O. Fernández Crisial wrote:<br>
> I have two servers running varnish (varnish-2.1.3 SVN), and both started<br>
> with "-s malloc,28G" option.<br>
><br>
> I've tried with varnishstat, looking for sma's values (I think "sma_balloc +<br>
> sma_bfree = 28G"), but only in one server shows "correct" information:<br>
><br>
> sma_balloc 1641487715428 . SMA bytes allocated<br>
> sma_bfree 1611596371850 . SMA bytes free<br>
><br>
> The other server shows:<br>
><br>
> sma_balloc 239065444117 . SMA bytes allocated<br>
> sma_bfree 226776048576 . SMA bytes free<br>
><br>
> What should I do to see the memory used and memory free from varnish cache?<br>
<br>
</div>sma_nbytes is probably easier to read - though you'll get the same result.<br>
<br>
This only indicates that the second server hasn't filled the cache. To<br>
verify this, check if the first server has n_lru_nuked objects (it should)<br>
and compare it to the second server (which should have 0 nuked - unless the<br>
cache size shrunk dramatically).<br>
<br>
The sma_nbytes and related counters refer to memory used for current<br>
objects, not what is available. To allocate space for a new object, Varnish<br>
checks that:<br>
<br>
(new object size) + (sma_nbytes) < (total size, specified by -s)<br>
<br>
Hope this helps.<br>
<font color="#888888"><br>
- Kristian<br>
</font><br>-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.10 (GNU/Linux)<br>
<br>
iQEcBAEBAgAGBQJNIZ01AAoJEIC1IG5rXEfqjWAIAKSfq5l0cMdzpBBjSEQmq8el<br>
QHyt779tk67y6sjtnclraOYopuqQW33atO92ycgIxHSucXqkMJW340a2u6Pax4hj<br>
Mq7jTRS0BPk+SKhkUirjTBZf8tg+ZNdo7sOyD6GDRXhe6xLD6l3SsujaHj1bpklj<br>
nepWoZa5DIWy/uaZ+O/RIpp+iL8tdY9tJL9Xh9VrjjP1VC6FGGl7T4ieie2SSrgb<br>
eyFvGxX6H8l3Q/gZ+4gzjdyMKfDvkeIsVkBFZ3njZFawTjNblQELXBJh9tsqs54L<br>
Vg6GxagRLDFHYiPcO/q+uDWUAD5EzKFa9q1wP3BFn0X9GMhvBHsF/jKxhaEg7VM=<br>
=9c3K<br>
-----END PGP SIGNATURE-----<br>
<br></blockquote></div><br>