varnish Monitoring Varnish Monitoring cached objects

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

You monitor the cached objects to see how often they expire and if they are "nuked".

  • n_expired - Number of expired objects.
  • n_lru_nuked - Last recently used nuked objects. Number of objects nuked (removed) from the cache because of lack of space.
varnishstat -1 | grep "n_expired\|n_lru_nuked"
MAIN.n_expired              42220159          .   Number of expired objects
MAIN.n_lru_nuked              264005          .   Number of LRU nuked objects

The one to watch here is n_lru_nuked, if the rate is increasing (the rate, not only the number) your cache is pushing out objects faster and faster because of lack of space. You need to increase the cache size.

The n_expired is more up to your application. A longer time to live will decrease this number but on the other hand not renew the objects as often. Also the cache might require more size.



Got any varnish Question?