Certainly! Let's break down the information you've provided on Smart Queue Management (SQM) and its configuration. This guide will help you understand how to optimize your network's SQM settings to achieve better performance, especially when ISP-provided configurations aren't ideal.
Understanding SQM (Smart Queue Management)
SQM is a feature designed to manage packet queues effectively, ensuring smooth data flow across your network's bottleneck link—the slowest link that typically limits your overall internet speed. This bottleneck is usually your connection from the router to the Internet (e.g., DSL, cable modem, GPON).
Why Adjust SQM Settings?
- ISP Limitations: Many Internet Service Providers (ISPs) have default buffering and traffic management settings that may not be optimal for your specific connection.
- Manual Control: By configuring SQM manually, you can take control away from the ISP, allowing your router to manage the traffic more efficiently.
Configuring SQM Settings
1. Determine Actual Link Speeds
To set SQM correctly, you need to know your actual download and upload speeds. Here's how:
- Use a Speed Test: Utilize tools like the DSL Reports Speed Test or other reputable speed test websites/software.
- Note the Results: Record your real download and upload speeds as reported by the speed test.
2. Input Initial Speeds Slightly Below Actual
SQM requires you to input link speeds that are a few percent below your actual measured speeds. This slight reduction helps manage the queue effectively without overloading your network.
- Example: If your speed test shows a download speed of 100 Mbps, you might set the SQM download speed to 95-98 Mbps.
3. Fine-Tune SQM Settings
After setting the initial speeds:
- Adjust Further: Refer to additional tuning suggestions (possibly detailed in a section titled "A little about tuning SQM") to optimize performance.
- Monitor and Test: Continuously monitor your network performance and adjust settings as needed to find the sweet spot for your connection.
Understanding Bandwidth Interpretation
SQM Shaping vs. Speed Tests:
- SQM Shaper Bandwidth: Interprets bandwidth values as gross bandwidth (total possible bandwidth without considering protocol overhead).
- Speed Tests: Typically report goodput, which is the actual useful data transmitted over the network (excluding protocol overhead like headers).
Why This Matters:
Due to protocol overhead, the goodput reported by speed tests is usually lower than the gross bandwidth. To align these two measurements, you need to adjust the SQM settings using a specific formula.
Calculating the Correct Shaper Bandwidth
To ensure that your SQM shaper bandwidth settings accurately reflect the goodput reported by speed tests, use the following formula:
[
\text{Adjusted Shaper Bandwidth} = \text{ShaperBandwidth} \times \frac{(\text{pMTU} - \text{IPv4Header} - \text{TCPHeader})}{(\text{pMTU} + \text{Overhead})}
]
Where:
- ShaperBandwidth: The bandwidth value you set in SQM (gross bandwidth).
- pMTU (Path Maximum Transmission Unit): Typically around 1500 bytes.
- IPv4Header: 20 bytes.
- TCPHeader: 20 bytes.
- Overhead: The value you specified in the shaper (if not specified, typically 14 bytes).
Step-by-Step Calculation:
-
Identify Your Overhead:
- Check your SQM configuration for the overhead value.
- If not explicitly set, use 14 bytes as a default.
-
Plug Values into the Formula:
- For example, with a DOCSIS link:
- Overhead: 18 bytes
- pMTU: 1500 bytes
- IPv4Header: 20 bytes
- TCPHeader: 20 bytes
-
Calculate the Impact on Goodput:
[
\text{Goodput Reduction} = 100 \times \left(1 - \frac{1500 - 20 - 20}{1500 + 18}\right)
]
[
= 100 \times \left(1 - \frac{1460}{1518}\right)
]
[
\approx 100 \times (1 - 0.9602) = 3.82%
]
This means your goodput is approximately 3.82% lower than the gross bandwidth.
Practical Implication:
- If your SQM shaper is set to 100 Mbps (gross bandwidth), your actual goodput would be approximately 96.18 Mbps after accounting for protocol overhead.
Final Recommendations
- Set Initial Bandwidth Below Actual Speeds: Start by setting your SQM bandwidth to a few percent below your measured speed test results.
- Adjust Based on Calculations: Use the provided formula to fine-tune your settings, ensuring that the shaper bandwidth aligns closely with the goodput.
- Continuous Monitoring: Regularly perform speed tests and monitor network performance, adjusting SQM settings as necessary to maintain optimal performance.
- Consider Overhead Variations: Be aware that different network types and configurations may have varying overheads, so adjust the overhead value in the formula accordingly.
By carefully configuring SQM with these guidelines, you can enhance your network's performance, reduce latency, and ensure a smoother internet experience.