8

Using varnish-cache, I am running varnishtop -c -i RxURL to show number of client requests from the cache. The output looks somewhat like this:

list length 40                                                                                                                                                    

   121.76 RxURL          /some/path/to/file
   105.17 RxURL          /some/other/file
    42.91 RxURL          /and/another
    14.61 RxURL          /yet/another
    14.59 RxURL          /etc
    13.63 RxURL          /etc/etc

What do the numbers 121.76, 105.17 etc. stand for?

They are increasing when first issuing varnishtop, but then they tend to stabilize, so I tend to believe the represent number of hits per specific timeframe. Is that so, and what is the timeframe?

This is not explained in the man page. Thank you for any assistance!

Edit: varnish version is 2.1

2 Answers 2

16

The varnishtop command shows the rolling aggregate count over 60 seconds. That means even if all traffic stops, it will take 60 seconds to average down on the display.

list length 40

Total number of items in the list since the screen can only show so many at a time.

121.76 RxURL /some/path/to/file

~121 requests received in the last 60 seconds for /some/path/to/file.

Some other interesting monitoring stats:

# most frequent cookies
varnishtop -i RxHeader -I Cookie

# continually updated list of frequent URLs
varnishtop -i RxURL

# most frequent UA strings
varnishtop -i RxHeader -C -I ^User-Agent

# frequent charset (Accept-Charset can be replaced with any other HTTP header)
varnishtop -i RxHeader -C -I '^Accept-Charset'

# Requests resulting in 404's
varnishlog -b -m "RxStatus:404"
2
  • Thank you. The numbers I get don't make sense for 60 seconds, but perhaps I should re-examine. Mar 22, 2013 at 18:11
  • For varnish 4.0 use ReqHeader instead of RxHeader. Oct 13, 2019 at 13:06
1

It's the average number of requests per 60 seconds. The manual does say it - but at the parameter explanation rather than the general description of the tool:

-p period Specifies the number of seconds to measure over, the default is 60 seconds. The first number in the list is the average number of requests seen over this time period.

4
  • Thanks, but this is from the documentation of varnish 3.0, not 2.1. In fact, -p is not recognized in 2.1. Nor is there any similar notion of "period" in the 2.1 docs. Nov 7, 2012 at 9:42
  • I should also note the numbers above are impossible for 60 seconds; way too high for the specific workload I was checking against (well, the numbers above are sample only; my real numbers aggregated over time are impossible for 60 seconds). Nov 7, 2012 at 9:42
  • Ohh, got me there ... but still seems odd they changed the behaviour of it. You could try a varnishlog during 60s and then process that information to make sure you're not missing something.
    – Clarence
    Nov 7, 2012 at 19:44
  • Thanks; that's what I'm doing, and I can't get a reasonable match between numbers in varnishlog and those in varnishtop. Not for 60 seconds, not for ttl... Nov 8, 2012 at 7:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.