Part 5 · 1 chapters · ~8 min

Network

Throughput and packet rates against NIC and cloud instance limits, connection rates and TIME_WAIT, retransmits and loss, drops at each layer, socket buffers, latency breakdown (connect, first byte, transfer), tcpretrans, tcpconnlat and tcplife, and load testing the network path.

6

Throughput, loss, latency

code
sar -n DEV 1                         # rxkB/s, txkB/s per interface
sar -n TCP,ETCP 1                    # active/s, passive/s, retrans/s
ss -s                                # totals by state: estab, timewait
tcpretrans-bpfcc                     # each retransmit: addresses, state
tcpconnlat-bpfcc                     # connect latency per outbound connection
tcplife-bpfcc                        # each closed connection: duration, bytes each way
curl -o /dev/null -s -w 'dns %{time_namelookup} connect %{time_connect} tls %{time_appconnect} ttfb %{time_starttransfer} total %{time_total}\n' https://api.example.com/health
NETWORK: WHAT TO CHECK
throughput, latency, retransmits, drops
throughputsar -n DEV: compare with NIC andinstance limits.connectionssar -n TCP: active and passiveopens per second.retransmitsRetransmitted segments: loss orcongestion on the path.dropsNIC rings, softnet, listenbacklog, conntrack (Kernel P6).latencyTCP connect and first-bytelatency; tcprtt histograms.limitsCloud instance bandwidth andpackets-per-second caps.
swipe the figure sideways, or tap expand for full screen
1/5
throughput
Check NIC throughput against the instance's network limit, which on cloud VMs is often lower than the NIC speed and may be burstable.
against real limitsinstance caps