Network cards send and receive on separate counters: TX and RX. Across multiple projects running the GBase 8a analytical database, whenever packet loss made load or query performance swing by several times — sometimes more than tenfold — it was always RX dropping packets, and never TX. This post breaks down why, and what to do about it. The goal is fixing severe performance jitter caused by network issues, not just chasing nic counters.

What RX and TX Drops Actually Mean

  • RX (receive: external network → local nic)​: packets arrive through the wire or optical port, are buffered by the card, then handed to the kernel receive buffer. An RX drop means the machine could not keep up — packets were discarded at the card or kernel stage.
  • TX (send: local nic → external network)​: the application writes to the kernel send buffer, then the card's hardware buffer, then out. TX loss comes in two flavors: local drops (the tx ring or kernel tx buffer fills, and the card discards packets), and mid-link drops (a switch or the remote end drops the packet — ifconfig will not count that in local TX errors).

Why RX Drops Are So Common

  • The RX ring is tiny: a typical 10 GbE card offers 256/512 RX descriptors versus 1024/4096 for TX. During a burst — broadcast traffic, a flood of concurrent TCP, a UDP storm — packets arrive faster than the kernel can drain the ring, and the card discards them on the spot.
  • Softirq bottlenecks: receiving depends on softirqs and CPU cycles for the protocol stack. A single saturated core, missing irq balancing, or a single-queue card lets packets pile up in the RX buffer. TX, by contrast, is pushed by application processes at a controllable rate.
  • Broadcast, multicast, and unknown unicast only travel inbound: broadcast storms, ARP storms, and unknown-unicast flooding are all receive-direction traffic, producing RX drops only.
  • Physical-layer faults hit RX first: a degrading optical module, a loose cable, port CRC errors, a failing switch — damaged inbound packets fail the card's checksum and are counted as RX errors. Outbound packets check out fine locally; link damage shows up as RX drops on the far end, never in local TX stats.

When TX Does Drop

  • Sending far beyond line rate: pushing 20 Gbps through a 10G card fills the TX ring and raises TX drops — seen in bulk exports from big-data jobs and UDP stress tests.
  • Hardware TX failure: a broken TX channel or a failing optical transmitter — extremely rare, and usually part of a total network meltdown. When a card goes bad, it goes bad all over.

Tuning the TCP Stack

  • Congestion control choice (the big one)​: default cubic halves the congestion window on every loss, so performance collapses after drops; on lossy links BBR models bandwidth and RTT instead, and a few lost packets barely dent throughput.
# Enable BBR echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf sysctl -p # Verify sysctl net.ipv4.tcp_congestion_control 
  • Loosen retransmission logic: treat heavy reordering as reordering rather than loss, tune RTO bounds, and always keep SACK/DSACK/FACK enabled — SACK retransmits only the lost segments instead of the whole window, which slashes the cost of every drop.
net.ipv4.tcp_reordering = 5 net.ipv4.tcp_fastretrans = 0 net.ipv4.tcp_rto_min = 100 net.ipv4.tcp_retries2 = 8 net.ipv4.tcp_sack = 1 net.ipv4.tcp_dsack = 1 net.ipv4.tcp_fack = 1 
  • Enlarge socket buffers so short bursts of loss do not block application writes:
net.core.rmem_max = 67108864 net.core.wmem_max = 67108864 net.ipv4.tcp_rmem = 4096 87380 67108864 net.ipv4.tcp_wmem = 4096 65536 67108864 net.ipv4.tcp_window_scaling = 1 
  • Batch small writes: enable Nagle to merge small packets, raise delayed-ack slightly, and write in bulk from the application side — losing one small packet hurts throughput far more than losing part of a batch.

Link and Layer-2 Fixes

# Grow nic rings to 4096 (card-dependent) ethtool -G eth0 rx 4096 tx 4096 # fq qdisc replaces pfifo_fast; pairs with BBR tc qdisc replace dev eth0 root fq pacing # Offload tuning ethtool -K eth0 gro on tso on gso on 

Enlarge switch port buffers to avoid tail drops during congestion, and use bonding with LACP or ECMP routing so a lossy link is bypassed automatically.

Lessons from Real GBase 8a Deployments

  • Adjusting nic RX/TX settings: the most frequent fix across gbase deployments. Caution — on some sites the nic hung during the parameter change, and only reaching the host through out-of-band management and rebooting recovered it. Coordinate with OS and hardware teams beforehand and have a fallback plan.
  • Replacing the optical module and fiber: happened once; on-site engineers confirmed the module was unstable, and swapping it eliminated the symptoms.
  • A failing switch: happened twice. Newly added nodes sat on a new switch, and identical SQL ran anywhere from 5 seconds to 50 seconds. An scp test between nodes showed throughput from a new node to the original ones swinging from 350 MB/s down to 700 KB/s — unstable switch ports, resolved by replacing the switch.

Looking ahead: if a stable gbase cluster shows no new SQL, no data growth, and yet one node — always the same one — suffers occasional performance dips, suspect the network. A cluster-wide or source-side problem would hit many nodes at once, not the same node every time.