[Varnish] #1021: varnishtop -1 takes a long time to run

Varnish varnish-bugs at varnish-cache.org
Mon Nov 5 11:26:45 CET 2012


#1021: varnishtop -1 takes a long time to run
------------------------+---------------------
 Reporter:  yves        |       Owner:  martin
     Type:  defect      |      Status:  new
 Priority:  normal      |   Milestone:
Component:  build       |     Version:  3.0.1
 Severity:  normal      |  Resolution:
 Keywords:  varnishlog  |
------------------------+---------------------

Comment (by daghf):

 I did some testing for this, and it's not an api issue.

 I was able to reproduce this by first running siege in benchmark mode for
 a few minutes to build up a sizeable -d backlog of approx 2.5M vsl
 records, of which around 15% of the records were unique. I'm guessing
 these numbers are not entirely atypical for a live varnish server.

 Simple profiling using valgrind uncovered that around 99% is spent in
 accumulate(). Looking at the code the frequency table is built by keeping
 a vtailq of known unique records - this list is then scanned for every
 subsequent log record to see if it has already been encountered. When
 number of -d records is in the millions, this gets costly.

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




More information about the varnish-bugs mailing list