]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
An important statistic in determining if a server process (or client) is being delayed
authorRandall Stewart <rrs@FreeBSD.org>
Mon, 8 Jun 2020 11:48:07 +0000 (11:48 +0000)
committerRandall Stewart <rrs@FreeBSD.org>
Mon, 8 Jun 2020 11:48:07 +0000 (11:48 +0000)
commite854dd38acaf041dc1ea57f36d31ae749552b941
tree29da969f4c191ce89eadf6b73c2864750eda2416
parent7465a290a0f99ba2f0b341a42cf2e0c71caa4032
An important statistic in determining if a server process (or client) is being delayed
is to know the time to first byte in and time to first byte out. Currently we
have no way to know these all we have is t_starttime. That (t_starttime) tells us
what time the 3 way handshake completed. We don't know when the first
request came in or how quickly we responded. Nor from a client perspective
do we know how long from when we sent out the first byte before the
server responded.

This small change adds the ability to track the TTFB's. This will show up in
BB logging which then can be pulled for later analysis. Note that currently
the tracking is via the ticks variable of all three variables. This provides
a very rough estimate (hz=1000 its 1ms). A follow-on set of work will be
to change all three of these values into something with a much finer resolution
(either microseconds or nanoseconds), though we may want to make the resolution
configurable so that on lower powered machines we could still use the much
cheaper ticks variable.

Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D24902
sys/netinet/tcp_input.c
sys/netinet/tcp_log_buf.c
sys/netinet/tcp_log_buf.h
sys/netinet/tcp_stacks/bbr.c
sys/netinet/tcp_stacks/rack.c
sys/netinet/tcp_usrreq.c
sys/netinet/tcp_var.h