]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: raw_sock: report global traffic statistics
authorWilly Tarreau <w@1wt.eu>
Thu, 23 May 2019 09:39:14 +0000 (11:39 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 23 May 2019 09:45:38 +0000 (11:45 +0200)
commit7cf0e4517d4c076bcc8227b7e5b4c18fe162d5ec
tree394e09b6965cd2690b49a3adadd525d422e1451a
parentbc1b8206064a5b0e3ab1df4df8467c86c0736c6e
MINOR: raw_sock: report global traffic statistics

Many times we've been missing per-process traffic statistics. While it
didn't make sense in multi-process mode, with threads it does. Thus we
now have a counter of bytes emitted by raw_sock, and a freq counter for
these as well. However, freq_ctr are limited to 32 bits, and given that
loads of 300 Gbps have already been reached over a loopback using
splicing, we need to downscale this a bit. Here we're storing 1/32 of
the byte rate, which gives a theorical limit of 128 GB/s or ~1 Tbps,
which is more than enough. Let's have fun re-reading this sentence in
2029 :-)  The values can be read in "show info" output on the CLI.
include/types/global.h
include/types/stats.h
src/raw_sock.c
src/stats.c