[PATCH] Add the VSL tag BereqEnd

Geoff Simmons geoff at uplex.de
Thu Oct 10 11:37:32 CEST 2013


Hello all,

This patch adds the BereqEnd tag, always the last tag emitted for a
bereq transaction before the End marker.

The format is:

BereqEnd <Tstart> <Tend> <Thdr> <Tbody>

Tstart: begin fetch processing (epoch)
Tend: end fetch processing (epoch)
Thdr: time to receive response header
Tbody: time to receive response body

Thdr is approximately the delta from just after sending the backend
request until just after receiving the header. Tbody is approximately
the delta from just after receiving the response header until just after
receiving the body.

So for example:

BereqEnd       1381335026.155810356 1381335026.268885612 0.112095833
0.000851154

The deltas are approximate because the low-level fetch operations do
some buffering, so the timings don't correspond strictly to reading the
header and body off the network (see the comments in
cache_http1_proto.c), but I think will for the most part reflect backend
latencies well enough.

The rationale is that I think backend timings will be useful for:

- measuring backend performance, and in particular finding out which
backends are slow

- finding out how much time in a fetch is due to work done strictly in
varnishd, and how much is due to latencies in systems beyond Varnish's
control

There is a bit of varnishd overhead in the Thdr and Tbody timings, but
they are dominated by backend latencies. That does mean, however, that
Tbody is always > 0, even if there is no response body.

Probably most people won't be very interested in the difference between
Thdr and Tbody (just Thdr+Tbody). We have to take a measurement after
the header arrives anyway, since there might not be a body, so I thought
we may as well log the delta. But maybe we just want the one value here,
just Thdr+Tbody. Tell me what you think.


Best,
Geoff
-- 
** * * UPLEX - Nils Goroll Systemoptimierung

Scheffelstraße 32
22301 Hamburg

Tel +49 40 2880 5731
Mob +49 176 636 90917
Fax +49 40 42949753

http://uplex.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-the-VSL-tag-BereqEnd.patch
Type: text/x-patch
Size: 4771 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20131010/81701253/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20131010/81701253/attachment.pgp>


More information about the varnish-dev mailing list