[BACK]Return to ackpri CVS log [TXT][DIR] Up to [local] / src / share / pf

Annotation of src/share/pf/ackpri, Revision 1.1

1.1     ! dhartmei    1: # $OpenBSD$
        !             2:
        !             3: # Use a simple priority queue to priorize empty (no payload) TCP ACKs,
        !             4: # which dramatically improves throughput on (asymmetric) links when the
        !             5: # reverse direction is saturated. The empty ACKs use an insignificant
        !             6: # part of the bandwidth, but if they get delayed, downloads suffer
        !             7: # badly, so priorize them.
        !             8:
        !             9: # Example: 512/128 kbps ADSL. Download is 50 kB/s. When a concurrent
        !            10: # upload saturates the uplink, download drops to 7 kB/s. With the
        !            11: # priority queue below, download drops only to 48 kB/s.
        !            12:
        !            13: # Replace lo0 with your real external interface
        !            14:
        !            15: ext_if="lo0"
        !            16:
        !            17: # For a 512/128 kbps ADSL with PPPoE link, using "bandwidth 100Kb"
        !            18: # is optimal. Some experimentation might be needed to find the best
        !            19: # value. If it's set too high, the priority queue is not effective, and
        !            20: # if it's set too low, the available bandwidth is not fully used.
        !            21: # A good starting point would be real_uplink_bandwidth * 90 / 100.
        !            22:
        !            23: altq on $ext_if priq bandwidth 100Kb queue { q_pri, q_def }
        !            24: queue q_pri priority 7
        !            25: queue q_def priority 1 priq(default)
        !            26:
        !            27: pass out on $ext_if proto tcp from $ext_if to any flags S/SA \
        !            28:        keep state queue (q_def, q_pri)
        !            29:
        !            30: pass in  on $ext_if proto tcp from any to $ext_if flags S/SA \
        !            31:        keep state queue (q_def, q_pri)
        !            32: