pfsense:buffer_bloat
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
pfsense:buffer_bloat [2020/03/14 16:52] – peter | pfsense:buffer_bloat [2023/05/21 11:20] (current) – peter | ||
---|---|---|---|
Line 4: | Line 4: | ||
Ideally you want to see A to A+'s for bufferbloat. | Ideally you want to see A to A+'s for bufferbloat. | ||
+ | |||
+ | Test result showing a letter grade worse than a B, probably indicate you have bufferbloat. | ||
+ | |||
+ | That means the device at your bottleneck link (most likely your router) is letting bulk traffic (uploads/ | ||
If not then tune. | If not then tune. | ||
+ | |||
+ | {{: | ||
---- | ---- | ||
- | ===== Change the Q size ===== | + | ===== Test for Bufferbloat |
+ | The [[http:// | ||
+ | |||
+ | |||
+ | 1. Start a ping to google.com. You’ll see a series of lines, one per ping, typically with times in the 20-100 msec range. | ||
+ | |||
+ | 2. Run a speed test simultaneously. To do this, start one of the speed test services below: | ||
+ | |||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | |||
+ | 3. Watch the ping times while the speed test is running. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Change the Q size ===== | ||
<WRAP important> | <WRAP important> | ||
Line 31: | Line 54: | ||
Someday your connection might receive a speed upgrade and you may forgot to adjust the limiter to make use of it! | Someday your connection might receive a speed upgrade and you may forgot to adjust the limiter to make use of it! | ||
</ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Instructions ===== | ||
+ | |||
+ | ==== Create Limiters ==== | ||
+ | |||
+ | Navigate to **Firewall -> Traffic Shaper -> Limiters**. | ||
+ | |||
+ | === Create " | ||
+ | |||
+ | * Tick " | ||
+ | * Name: FQ_CODEL_OUT | ||
+ | * Bandwidth: 96907 Kbit/s | ||
+ | * Mask: None | ||
+ | * Queue Management Algorithm: Tail Drop | ||
+ | * Scheduler: FQ_CODEL | ||
+ | * target: 5 | ||
+ | * interval: 100 | ||
+ | * quantum: 300 | ||
+ | * limit: 10240 | ||
+ | * flows: 20480 | ||
+ | * Click Save/Apply Changes | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Add " | ||
+ | |||
+ | * Tick " | ||
+ | * Name: fq_codel_out_q | ||
+ | * Mask: None | ||
+ | * Queue Management Algorithm: Tail Drop | ||
+ | * Click Save/Apply Changes | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Create " | ||
+ | |||
+ | * Tick " | ||
+ | * Name: FQ_CODEL_IN | ||
+ | * Bandwidth: 83886 Kbit/s | ||
+ | * Mask: None | ||
+ | * Queue Management Algorithm: Tail Drop | ||
+ | * Scheduler: FQ_CODEL | ||
+ | * target: 5 | ||
+ | * interval: 100 | ||
+ | * quantum: 300 | ||
+ | * limit: 10240 | ||
+ | * flows: 20480 | ||
+ | * Click Save/Apply Changes | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Add " | ||
+ | |||
+ | * Tick " | ||
+ | * Name: fq_codel_in_q | ||
+ | * Mask: None | ||
+ | * Queue Management Algorithm: Tail Drop | ||
+ | * Click Save/Apply Changes | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Create Floating Rules ==== | ||
+ | |||
+ | === Add quick pass floating rule to handle ICMP traceroute === | ||
+ | |||
+ | This rule matches ICMP traceroute packets so that they are not matched by the WAN-Out limiter rule that utilizes policy routing. | ||
+ | |||
+ | Policy routing breaks traceroute. | ||
+ | |||
+ | * Action: Pass | ||
+ | * Quick: Tick Apply the action immediately on match. | ||
+ | * Interface: WAN | ||
+ | * Direction: out | ||
+ | * Address Family: IPv4 | ||
+ | * Protocol: ICMP | ||
+ | * ICMP subtypes: Traceroute | ||
+ | * Source: any | ||
+ | * Destination: | ||
+ | * Description: | ||
+ | * Click Save | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Add quick pass floating rule to handle ICMP echo-request and echo-reply === | ||
+ | |||
+ | This rule matches ping packets so that they are not matched by the limiter rules. | ||
+ | |||
+ | See [[https:// | ||
+ | |||
+ | * Action: Pass | ||
+ | * Quick: Tick Apply the action immediately on match. | ||
+ | * Interface: WAN | ||
+ | * Direction: any | ||
+ | * Address Family: IPv4 | ||
+ | * Protocol: ICMP | ||
+ | * ICMP subtypes: Echo reply, Echo Request | ||
+ | * Source: any | ||
+ | * Destination: | ||
+ | * Description: | ||
+ | * Click Save | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Add a match rule for incoming state flows so that they' | ||
+ | |||
+ | * Action: Match | ||
+ | * Interface: WAN | ||
+ | * Direction: in | ||
+ | * Address Family: IPv4 | ||
+ | * Protocol: Any | ||
+ | * Source: any | ||
+ | * Destination: | ||
+ | * Description: | ||
+ | * Gateway: Default | ||
+ | * In / Out pipe: fq_codel_in_q / fq_codel_out_q | ||
+ | * Click Save | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Add a match rule for outgoing state flows so that they' | ||
+ | |||
+ | * Action: Match | ||
+ | * Interface: WAN | ||
+ | * Direction: out | ||
+ | * Address Family: IPv4 | ||
+ | * Protocol: Any | ||
+ | * Source: any | ||
+ | * Destination: | ||
+ | * Description: | ||
+ | * Gateway: WAN_DHCP | ||
+ | * In / Out pipe: fq_codel_out_q / fq_codel_in_q | ||
+ | * Click Save/Apply Changes | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Troubleshooting ===== | ||
+ | |||
+ | https:// | ||
+ | |||
+ | https:// | ||
+ | |||
+ | https:// | ||
+ | |||
+ | |||
---- | ---- | ||
Line 36: | Line 205: | ||
===== References ===== | ===== References ===== | ||
+ | https:// | ||
http:// | http:// | ||
Line 41: | Line 211: | ||
https:// | https:// | ||
+ | https:// | ||
+ | |||
+ | https:// | ||
+ | |||
+ | https:// | ||
+ | https:// | ||
pfsense/buffer_bloat.1584204765.txt.gz · Last modified: 2020/07/15 09:30 (external edit)