-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stab setting to better Accurate. #3
Open
yutayu
wants to merge
22
commits into
robinsmidsrod:master
Choose a base branch
from
yutayu:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 18 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
9aa555a
Update supershaper.init
yutayu b6493b8
Update supershaper.init
yutayu 8c0e908
Update supershaper.init
yutayu 693acd5
Update supershaper.init
yutayu 061a788
Update supershaper.init
yutayu 7003b47
Update supershaper.init
yutayu 32d4e25
Update supershaper.init
yutayu 704909d
Update supershaper.init
yutayu c4b46cb
Update supershaper.init
yutayu c522b03
Update supershaper.init
yutayu f07de5f
Update supershaper.init
yutayu 43b56db
Update supershaper.init
yutayu 6c8be95
Update supershaper.init
yutayu 3c261c2
Update supershaper.init
yutayu 31cb101
Update supershaper.init
yutayu 6c36bdc
Update supershaper.init
yutayu bd5f92c
Update supershaper.init
yutayu c760dce
Update supershaper.init
yutayu 02e3fca
Update supershaper.init
yutayu 096f9e5
Update supershaper.init
yutayu 2ab7fcc
Update supershaper.init
yutayu 9015c9b
Update supershaper.init
yutayu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,7 +73,7 @@ UPLINK_BW=3422 # 3.4Mbps, measured 2017-08-31 | |
# calculated bandwidth (see UPLINK below) you modem is probably still | ||
# queuing packets. This can only be set by trial an error, but 90% is | ||
# probably a good ballpark number. | ||
UPLINK_PERCENT=90 | ||
UPLINK_PERCENT=98 | ||
|
||
# Skype normally uses a random UDP/TCP port, but specify it manually to be | ||
# able to control it better | ||
|
@@ -108,6 +108,14 @@ TC=tc | |
# Where to store flow labels, accessible for other tools | ||
FLOWS_FILENAME="/run/tc-flows.csv" | ||
|
||
# Stab setting | ||
# Configure a stab to calculate a more accurate queue size and avoid wasting bandwidth. | ||
# PPPoE ADSL/VDSL over ATM | ||
STAB="stab linklayer ethernet overhead 40" | ||
# PPPoA ADSL/VDSL over ATM | ||
# STAB="stab linklayer atm overhead 10" | ||
# If you are using any other line, refer to the following. http://linuxcommandlibrary.com/man/tc-stab.html | ||
|
||
############################################################################## | ||
######## Nothing to change below this line unless you're adventurous ######### | ||
############################################################################## | ||
|
@@ -118,7 +126,9 @@ UPLINK=$((UPLINK_PERCENT*UPLINK_BW/100)) | |
# Which qdisc to use for HFSC leaves | ||
# Turns out that the old sfq seems to work better than fq_codel in | ||
# conjunction with HFSC Try out both and decide for yourself | ||
LEAF_QDISC="sfq divisor 65536 headdrop" | ||
# Quantum must be greater than or equal to MTU. Also, on ATM lines, Quantum should be a multiple of (48 + 5) = 53. | ||
# If MTU = 1500 , 1500 + 40 < 48 * 33 = 1584 , 33 * ( 48 + 5 ) = 1749. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @yutayu If you intend the SFQ quantum to be changed by the user, it should be a variable above line 119. That calculation in the comment contains too many magic numbers. Please explain what those numbers are, like IP header, ATM header, PPP header, etc. |
||
LEAF_QDISC="sfq divisor 65536 headdrop quantum 1749" | ||
#LEAF_QDISC="fq_codel noecn" | ||
|
||
filter_prio=1 | ||
|
@@ -147,7 +157,7 @@ function start_me { | |
################### FLOW DEFINITIONS ################### | ||
|
||
# Add root qdisc | ||
$TC qdisc add dev $DEV root handle 1: hfsc default 50 | ||
$TC qdisc add dev $DEV root handle 1: $STAB hfsc default 50 | ||
|
||
# Add main class, setting interface rate limit (your upstream max bandwidth) | ||
$TC class add dev $DEV parent 1: classid 1:1 hfsc ls m2 "${UPLINK}kbit" ul m2 "${UPLINK}kbit" | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yutayu This number
40
is what I call a "magic number". You should include (in a comment) how it was calculated. Same for the number10
below.