Deciding on cache size can be a tricky task. A few things to consider:
n_lru_nuked
counter with varnishstat or some other tool. If you have a lot of LRU activity then your cache is evicting objects due to space constraints and you should consider increasing the size of the cache.Be aware that every object that is stored also carries overhead that is kept outside the actually storage area. So, even if you specify -s
malloc,16G
Varnish might actually use double that. Varnish has a overhead of about 1KB per object. So, if you have lots of small objects in your cache the overhead might be significant.
Copyright © 2006 Verdens Gang AS
Copyright © 2006–2020 Varnish Software AS
Licensed under the BSD-2-Clause License.
https://varnish-cache.org/docs/6.5/users-guide/sizing-your-cache.html