[Varnish] #1859: Average Hitrate Reported by Varnishstat Inaccurate

Varnish varnish-bugs at varnish-cache.org
Thu Mar 3 17:50:05 CET 2016


#1859: Average Hitrate Reported by Varnishstat Inaccurate
---------------------------------+--------------------
 Reporter:  batty                |       Owner:
     Type:  defect               |      Status:  new
 Priority:  normal               |   Milestone:
Component:  varnishstat          |     Version:  4.1.1
 Severity:  normal               |  Resolution:
 Keywords:  varnishtat hit rate  |
---------------------------------+--------------------

Comment (by batty):

 This does not appear to be an issue in version 4.0.3.  We downgraded one
 server in our tier to version 4.0.3 so that it is running beside 4.1.1.
 The servers are load balanced using a least connection algorithm.  I ran
 varnishstat on each and let it run for 5 minutes.  Here are the results
 reported for hitrate n:

 4.0.3
 {{{
 Hitrate n:       10          100         299
 avg(n):           0.6947   0.6813   0.6921
 }}}

 4.1.1
 {{{
 Hitrate n:       10          100         305
 avg(n):           0.1956   0.1585   0.1578
 }}}

 Here are the hit/miss metrics since varnish was last restarted for each:

 4.0.3
 {{{
 MAIN.cache_hit               2788195        16.45 Cache hits
 MAIN.cache_miss              1357351         8.01 Cache misses

 2788195 / (2788195 + 1357351) = .6726
 }}}

 4.1.1
 {{{
 MAIN.cache_hit           3776402        17.96 Cache hits
 MAIN.cache_miss          1736464         8.26 Cache misses

 3776402 / (3776402 + 1736464) = .6850
 }}}

 The ~69% hit rate reported by varnishstat in version 4.0.3 is accurate.
 The rate reported by version 4.1.1 seems way off.

 Note: The total hit/miss metric counts are not similar between the two
 servers because the server running varnish 4.1.1 has been running longer.

-- 
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1859#comment:2>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator



More information about the varnish-bugs mailing list