LinuxCommandLibrary

tc-codel

Manage network queue discipline (CoDel)

SYNOPSIS

tc qdisc add ... codel [limit packets] [target time] [interval time] [ecn]

PARAMETERS

limit packets
     Sets the hard limit on the real queue size. When this limit is reached, packets will be dropped. Should be set higher than the burst size for good throughput. Default is 1000 packets.

target time
     CoDel's target is the maximum acceptable queueing delay. This value should be set to the lowest acceptable round-trip time (RTT) of the bottleneck link to avoid penalizing low-latency flows. Default is 5ms.

interval time
     CoDel measures the minimum queueing delay over this interval. The shorter the interval, the faster CoDel reacts to changes in delay, but more overhead in terms of computations. Defaults to 100ms.

ecn
     If this flag is enabled, codel will ECN mark packets instead of dropping them, if the underlying qdisc supports ECN.

DESCRIPTION

tc-codel implements the Controlled Delay (CoDel) queue management algorithm.
It is designed to combat bufferbloat by minimizing queueing delay and maintaining good throughput even under high network load. CoDel works by monitoring the minimum queue delay observed over a sliding window and drops or marks packets if the delay exceeds a target value. This helps to reduce the build-up of excessive queues and improve network responsiveness.
CoDel doesn't require any tuning or configuration for most use-cases. The target and interval parameters can be configured for specific more advanced needs. It is typically implemented as a qdisc within the Linux traffic control (tc) subsystem and is designed to operate with other qdiscs and traffic shaping tools.

CAVEATS

CoDel works best on bottleneck links where it can accurately observe queueing delay. It may not be as effective in scenarios with multiple bottlenecks or complex network topologies. CoDel requires a sufficiently sized queue (at least a few packets) to operate effectively.

OPERATION

CoDel operates by continuously monitoring the minimum queueing delay observed over a sliding window. If the delay exceeds the configured target, CoDel starts dropping or marking packets to reduce the queue size. The algorithm aims to maintain a queueing delay close to the target while avoiding excessive packet loss. It differentiates itself from traditional RED/AQM schemes by focusing on queue delay instead of queue length.

HISTORY

CoDel was developed as a solution to bufferbloat, a persistent problem in network congestion management. It was designed to be a 'no knobs' algorithm, meaning it requires minimal configuration and is effective across a wide range of network conditions. The algorithm was developed as a result of a research effort to improve Internet performance and fairness. Its implementation within Linux's tc framework has made it a popular choice for mitigating bufferbloat in various network setups.

SEE ALSO

tc(8), fq_codel(8), htb(8)

Copied to clipboard