Skip to content

Collect additional TcpExt metrics#10844

Merged
coignetp merged 1 commit into
masterfrom
bonnefoa/tcp-ext-network
Jan 3, 2022
Merged

Collect additional TcpExt metrics#10844
coignetp merged 1 commit into
masterfrom
bonnefoa/tcp-ext-network

Conversation

@bonnefoa

Copy link
Copy Markdown
Collaborator

What does this PR do?

Collect additional TcpExt metrics

Motivation

We're lacking visibility to deep dive and troubleshoot complex network issues with datadog.

Additional Notes

Number of martian packets dropped by the reverse path filter: IPReversePathFilter
I've used system.net.ip.reverse_path_filter as the metric name for
this one as even if it's under TcpExt, it has absolutely nothing to do
with the TCP layer.

Prune TCP queue metrics: PruneCalled, RcvPruned and OfoPruned
netstat defines PruneCalled as '%u packets pruned from receive queue because of socket' which is inexact.
This metric will count the number of called to the tcp_prune_queue and
doesn't necessarily drop packets if it manages to free enough space.

Packets dropped by PAWS: PAWSActive and PAWSEstab
PAWSActive is a confusing name. It's basically the number of dropped
SYNACK packets by the PAWS mechanism. Active is probably for "active
open", when the socket is in a SYN_SENT state.
Using system.net.tcp.paws_connection_drop as the metric name for PAWSActive made more sense.

Number of retransmitted SYN packets: TCPSynRetrans

Number of socket closed due to a TCP timeout (maximum retransmission
reached or keep-alive timeouts): TCPAbortOnTimeout

0win state changes: TCPFromZeroWindowAdv, TCPToZeroWindowAdv

Syn cookies stats: SyncookiesSent, SyncookiesRecv, SyncookiesFailed

Reused TW socket: TWRecycled.
This can easily be confused with the tcp_tw_recycle sysctl option
which doesn't exist anymore.
In the kernel code, we can see it's incremented if the tw reuse was
successful (twsk_unique(sk, sk2, twp))
https://github.com/torvalds/linux/blob/19757cebf0c5016a1f36f7fe9810a9f0b33c0832/net/ipv4/inet_hashtables.c#L487-L490
So I've used system.net.tcp.tw_reused for this one which makes a bit
more sense.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached

Number of martian packets dropped by the reverse path filter: IPReversePathFilter
I've used `system.net.ip.reverse_path_filter` as the metric name for
this one as even if it's under TcpExt, it has absolutely nothing to do
with the TCP layer.

Prune TCP queue metrics: PruneCalled, RcvPruned and OfoPruned
netstat defines PruneCalled as '%u packets pruned from receive queue because of socket' which is inexact.
This metric will count the number of called to the tcp_prune_queue and
doesn't necessarily drop packets if it manages to free enough space.

Packets dropped by PAWS: PAWSActive and PAWSEstab
PAWSActive is a confusing name. It's basically the number of dropped
SYNACK packets by the PAWS mechanism. Active is probably for "active
open", when the socket is in a SYN_SENT state.
Using `system.net.tcp.paws_connection_drop` as the metric name for
PAWSActive made more sense.

Number of retransmitted SYN packets: TCPSynRetrans

Number of socket closed due to a TCP timeout (maximum retransmission
reached or keep-alive timeouts): TCPAbortOnTimeout

0win state changes: TCPFromZeroWindowAdv, TCPToZeroWindowAdv

Syn cookies stats: SyncookiesSent, SyncookiesRecv, SyncookiesFailed

Reused TW socket: TWRecycled.
This can easily be confused with the `tcp_tw_recycle` sysctl option
which doesn't exist anymore.
In the kernel code, we can see it's incremented if the reuse part was
successful (`twsk_unique(sk, sk2, twp)`)
https://github.com/torvalds/linux/blob/19757cebf0c5016a1f36f7fe9810a9f0b33c0832/net/ipv4/inet_hashtables.c#L487-L490
So I've used `system.net.tcp.tw_reused` for this one which make a bit
more sense.
@bonnefoa
bonnefoa requested review from a team as code owners December 13, 2021 16:48
@ghost ghost added the integration/network label Dec 13, 2021
@codecov

codecov Bot commented Dec 13, 2021

Copy link
Copy Markdown

Codecov Report

Merging #10844 (8b1988a) into master (8270915) will increase coverage by 0.00%.
The diff coverage is n/a.

Flag Coverage Δ
network 77.76% <ø> (+1.00%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@albertvaka albertvaka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@coignetp
coignetp merged commit 891c7dd into master Jan 3, 2022
@coignetp
coignetp deleted the bonnefoa/tcp-ext-network branch January 3, 2022 08:57
github-actions Bot pushed a commit that referenced this pull request Jan 3, 2022
Number of martian packets dropped by the reverse path filter: IPReversePathFilter
I've used `system.net.ip.reverse_path_filter` as the metric name for
this one as even if it's under TcpExt, it has absolutely nothing to do
with the TCP layer.

Prune TCP queue metrics: PruneCalled, RcvPruned and OfoPruned
netstat defines PruneCalled as '%u packets pruned from receive queue because of socket' which is inexact.
This metric will count the number of called to the tcp_prune_queue and
doesn't necessarily drop packets if it manages to free enough space.

Packets dropped by PAWS: PAWSActive and PAWSEstab
PAWSActive is a confusing name. It's basically the number of dropped
SYNACK packets by the PAWS mechanism. Active is probably for "active
open", when the socket is in a SYN_SENT state.
Using `system.net.tcp.paws_connection_drop` as the metric name for
PAWSActive made more sense.

Number of retransmitted SYN packets: TCPSynRetrans

Number of socket closed due to a TCP timeout (maximum retransmission
reached or keep-alive timeouts): TCPAbortOnTimeout

0win state changes: TCPFromZeroWindowAdv, TCPToZeroWindowAdv

Syn cookies stats: SyncookiesSent, SyncookiesRecv, SyncookiesFailed

Reused TW socket: TWRecycled.
This can easily be confused with the `tcp_tw_recycle` sysctl option
which doesn't exist anymore.
In the kernel code, we can see it's incremented if the reuse part was
successful (`twsk_unique(sk, sk2, twp)`)
https://github.com/torvalds/linux/blob/19757cebf0c5016a1f36f7fe9810a9f0b33c0832/net/ipv4/inet_hashtables.c#L487-L490
So I've used `system.net.tcp.tw_reused` for this one which make a bit
more sense. 891c7dd
cswatt pushed a commit that referenced this pull request Jan 5, 2022
Number of martian packets dropped by the reverse path filter: IPReversePathFilter
I've used `system.net.ip.reverse_path_filter` as the metric name for
this one as even if it's under TcpExt, it has absolutely nothing to do
with the TCP layer.

Prune TCP queue metrics: PruneCalled, RcvPruned and OfoPruned
netstat defines PruneCalled as '%u packets pruned from receive queue because of socket' which is inexact.
This metric will count the number of called to the tcp_prune_queue and
doesn't necessarily drop packets if it manages to free enough space.

Packets dropped by PAWS: PAWSActive and PAWSEstab
PAWSActive is a confusing name. It's basically the number of dropped
SYNACK packets by the PAWS mechanism. Active is probably for "active
open", when the socket is in a SYN_SENT state.
Using `system.net.tcp.paws_connection_drop` as the metric name for
PAWSActive made more sense.

Number of retransmitted SYN packets: TCPSynRetrans

Number of socket closed due to a TCP timeout (maximum retransmission
reached or keep-alive timeouts): TCPAbortOnTimeout

0win state changes: TCPFromZeroWindowAdv, TCPToZeroWindowAdv

Syn cookies stats: SyncookiesSent, SyncookiesRecv, SyncookiesFailed

Reused TW socket: TWRecycled.
This can easily be confused with the `tcp_tw_recycle` sysctl option
which doesn't exist anymore.
In the kernel code, we can see it's incremented if the reuse part was
successful (`twsk_unique(sk, sk2, twp)`)
https://github.com/torvalds/linux/blob/19757cebf0c5016a1f36f7fe9810a9f0b33c0832/net/ipv4/inet_hashtables.c#L487-L490
So I've used `system.net.tcp.tw_reused` for this one which make a bit
more sense.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants