How SACK Works
SACK is negotiated during the initial TCP three-way handshake using the SACK-Permitted option. Once enabled, if a packet is lost, the receiver continues to send ACKs for the last contiguous sequence number, but it adds a SACK option field to the TCP header. This field contains a list of 'SACK blocks'—pairs of sequence numbers representing the start and end of non-contiguous segments currently held in the receiver's buffer.
By observing these blocks, the sender can perform a 'selective retransmission' of only the missing segments, rather than flushing the entire window. This drastically reduces unnecessary bandwidth consumption and keeps the congestion window stable.
Performance Trade-offs
While SACK is highly efficient in high-latency or high-loss environments, it is not without complexity. Each SACK option adds bytes to the TCP header, reducing the effective Maximum Segment Size (MSS) available for payload data. Furthermore, both the sender and receiver must implement logic to manage the SACK scoreboard—a data structure that tracks the status of transmitted segments. In extremely high-speed networks, processing the SACK scoreboard can introduce minor CPU overhead at the kernel level.
Engineering Takeaways
For systems engineers, understanding SACK is critical when debugging tail latency in distributed systems. If packet loss is a recurring issue in a data center network, standard TCP can quickly spiral into a retransmission storm. SACK ensures that the recovery phase is surgical rather than brute-force. When configuring network stacks or tuning kernel parameters like 'tcp_sack', consider the impact on header overhead versus the potential performance gains in lossy scenarios.
In modern production environments, SACK is almost universally enabled. Its ability to navigate out-of-order delivery—a common side effect of multi-path routing—makes it an indispensable tool for maintaining high throughput across diverse network topographies.