PIE(8)
๐ธ NAME ๐ธ
PIE(8) is the manual page for PIE, short for Proportional Integral controller-Enhanced AQM algorithm ๐ โจ
๐ SYNOPSIS ๐
Okay so this is the command shape you type in, bestie ๐
tc qdisc ... pie [ limit PACKETS ] [ target TIME ] [ tupdate TIME ] [
alpha int ] [ beta int ] [ ecn | noecn ] [ bytemode | nobytemode ] [
dq_rate_estimator | no_dq_rate_estimator ]
๐ DESCRIPTION ๐
Okay bestie, so Proportional Integral controller-Enhanced (PIE) is a control theoretic active queue management scheme ๐ง It's based on the proportional integral controller, but the whole point is to control delay ๐ซถ
Its main design goals are giving it major main character energy:
- Low latency control ๐
- High link utilization ๐
- Simple implementation ๐ง
- Guaranteed stability and fast responsiveness ๐
๐ฆ ALGORITHM ๐ฆ
Okay so PIE is literally built to keep delay in check ๐ Here's how it works, step by step:
First, an average dequeue rate gets estimated based on the standing queue. That rate is then used to calculate the current delay โฑ๏ธ Next, on a periodic basis, the delay is used to calculate the dropping probability. Finally, when a packet arrives, it gets dropped (or marked) based on that probability ๐ฅ
PIE adjusts the probability based on the trend of the delay, so it checks whether the delay is going up or down ๐๐ The delay converges quickly to the target value you set โจ
alpha and beta are statically chosen parameters that control how fast the drop probability grows ๐ท They're determined through control theoretic approaches, so no guessing bestie ๐ค alpha decides how the gap between the current latency and the target latency changes the probability. beta adds extra adjustments depending on the latency trend ๐
The drop probability is used to mark packets in ecn mode. However, just like RED, once you go beyond 10%, packets get dropped based on that probability ๐ญ The bytemode option drops packets in proportion to the packet size ๐
Want the deeper details? Check out the paper cited below ๐
๐ง PARAMETERS ๐ง
โจ limit โจ
The limit is the queue size in packets ๐ Incoming packets get dropped once this limit is reached. The default is 1000 packets.
โจ target โจ
The target is the expected queue delay ๐ฏ The default target delay is 15ms.
โจ tupdate โจ
The tupdate is how often the system drop probability gets calculated โฐ The default is 15ms.
โจ alpha and beta โจ
alpha and beta are parameters that control the drop probability ๐ They should be in the range between 0 and 32.
โจ ecn | noecn โจ
Use these to mark packets instead of dropping them ๐ณ๏ธโ๐ ecn turns ecn mode on, and noecn turns it off. By default, ecn is off ๐
โจ bytemode | nobytemode โจ
This one scales the drop probability in proportion to packet size ๐ฆ bytemode turns it on, nobytemode turns it off. By default, bytemode is off ๐
โจ dq_rate_estimator | no_dq_rate_estimator โจ
This is used to calculate delay using Little's law ๐งฎ dq_rate_estimator turns it on, and no_dq_rate_estimator turns it off. By default, dq_rate_estimator is off ๐ซถ
๐ EXAMPLES ๐
Let's see it in action, bestie ๐
Just the basics, no extras:
# tc qdisc add dev eth0 root pie
# tc -s qdisc show
qdisc pie 8036: dev eth0 root refcnt 2 limit 1000p target 15.0ms
tupdate 16.0ms alpha 2 beta 20
Sent 31216108 bytes 20800 pkt (dropped 80, overlimits 0 requeues 0)
backlog 16654b 11p requeues 0
prob 0.006161 delay 15666us
pkts_in 20811 overlimit 0 dropped 80 maxq 50 ecn_mark 0
Now with the dq_rate_estimator turned on:
# tc qdisc add dev eth0 root pie dq_rate_estimator
# tc -s qdisc show
qdisc pie 8036: dev eth0 root refcnt 2 limit 1000p target 15.0ms
tupdate 16.0ms alpha 2 beta 20
Sent 63947420 bytes 42414 pkt (dropped 41, overlimits 0 requeues 0)
backlog 271006b 179p requeues 0
prob 0.000092 delay 22200us avg_dq_rate 12145996
pkts_in 41 overlimit 343 dropped 0 maxq 50 ecn_mark 0
Custom limit, target, tupdate, and ecn all at once:
# tc qdisc add dev eth0 root pie limit 100 target 20ms tupdate 30ms ecn
# tc -s qdisc show
qdisc pie 8036: dev eth0 root refcnt 2 limit 100p target 20.0ms
tupdate 32.0ms alpha 2 beta 20 ecn
Sent 6591724 bytes 4442 pkt (dropped 27, overlimits 0 requeues 0)
backlog 18168b 12p requeues 0
prob 0.008845 delay 11348us
pkts_in 4454 overlimit 0 dropped 27 maxq 65 ecn_mark 0
And finally, bytemode with a bigger target:
# tc qdisc add dev eth0 root pie limit 100 target 50ms tupdate 30ms
bytemode
# tc -s qdisc show
qdisc pie 8036: dev eth0 root refcnt 2 limit 100p target 50.0ms
tupdate 32.0ms alpha 2 beta 20 bytemode
Sent 1616274 bytes 1137 pkt (dropped 0, overlimits 0 requeues 0)
backlog 13626b 9p requeues 0
prob 0.000000 delay 0us
pkts_in 1146 overlimit 0 dropped 0 maxq 23 ecn_mark 0
๐ SEE ALSO ๐
Check these out too, they're iconic ๐: tc(8), tc-codel(8), tc-red(8)
๐ SOURCES ๐
๐ AUTHORS ๐
PIE was implemented by Vijay Subramanian and Mythili Prabhu, who are also the authors of this man page ๐ซถ Please report bugs and corrections to the Linux networking development mailing list at <netdev@vger.kernel.org> ๐
iproute2 ยท 16 January 2014 ยท PIE(8) ๐ Linux, periodt ๐ โจ
๐ฆ where this page comes from
- alpine 3.22: iproute2-doc 6.15.0-r0 ยท GPL-2.0-or-later
- alpine 3.23: iproute2-doc 6.17.0-r0 ยท GPL-2.0-or-later
- alpine 3.24: iproute2-doc 7.0.0-r0 ยท GPL-2.0-or-later
- arch rolling: iproute2 7.2.0-1
- arch rolling: iproute2 7.3.0-1 ยท GPL-2.0-or-later
- centos-stream 10: iproute-tc 7.0.0-2.el10 ยท GPL-2.0-or-later
- centos-stream 9: iproute-tc 6.17.0-3.el9 ยท GPL-2.0-or-later
- debian bookworm: iproute2 6.1.0-3 ยท GPL-2.0-only
- debian trixie: iproute2 6.15.0-1 ยท GPL-2.0-only
- fedora 43: iproute-tc 6.14.0-2.fc43 ยท GPL-2.0-or-later
- fedora 44: iproute-tc 6.17.0-2.fc44 ยท GPL-2.0-or-later
- nixos 26.05: iproute2 7.0.0
- nixpkgs unstable: iproute2 7.2.0
- opensuse-leap 16.0: iproute2 6.12-160000.4.1 ยท GPL-2.0-only
- opensuse-leap 16.0: iproute2 6.12-160000.4.1 ยท GPL-2.0-only
- opensuse-leap 16.0: iproute2 6.12-160000.4.1 ยท GPL-2.0-only
- opensuse-leap 16.0: iproute2 6.12-160000.4.1 ยท GPL-2.0-only
- ubuntu jammy: iproute2 5.15.0-1ubuntu2 ยท GPL-2.0-only
- ubuntu jammy: iproute2 5.15.0-1ubuntu2.2 ยท GPL-2.0-only
- ubuntu noble: iproute2 6.1.0-1ubuntu6 ยท GPL-2.0-only
- ubuntu noble: iproute2 6.1.0-1ubuntu6.4 ยท GPL-2.0-only
- ubuntu questing: iproute2 6.16.0-1ubuntu2
- ubuntu questing: iproute2 6.16.0-1ubuntu2.1 ยท GPL-2.0-only
- ubuntu questing: iproute2 6.16.0-1ubuntu2.2
- ubuntu resolute: iproute2 6.19.0-1ubuntu1 ยท GPL-2.0-only
- ubuntu resolute: iproute2 6.19.0-1ubuntu1.1 ยท GPL-2.0-only
- ubuntu stonking: iproute2 7.2.0-1ubuntu1 ยท GPL-2.0-only
- ๐ girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms