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