1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

[Release] FreshJR Adaptive QOS (Improvements / Custom Rules / and Inner workings)

Discussion in 'Asuswrt-Merlin' started by FreshJR, Jan 12, 2017.

  1. FreshJR

    FreshJR Very Senior Member

    Joined:
    Oct 8, 2016
    Messages:
    915
    @Sinner not quite.

    QOS is a token based system.
    1 token = 1 packet processed (just for example)

    Packets to be processed wait in a queue.

    Every clock cycle (eg tic) packets consume a token if available. If not available they wait and see if a token will be available next clock cycle.

    In steady state operation, as you are operating at your bandwidth limits, tokens are being consumed as soon as they are generated. No issues, everything is working as expected and you are limiting your speeds as expected with no bufferbloat.

    Now let’s say your network is idle. If you submit a 10 packets, you would have to wait 10 cycles for 10 token to be generated.

    To remove this delay, we could allow a small amount of tokens are stored in buckets to use in the future instead destroying them the during the clock cycle they are created .

    So at idle let’s say our bucket is a size of 10. Tokens will be generated and fill up this bucket first if it’s not full before being destroyed.

    What this means in practice is that the first 10 packets can pass through without any delay if the network was not in a saturated state. During each clock cycle new tokens will still be generated and will still be filled into the buckets if the network is not saturated.

    Allowing to burst packets, instead of waiting for tokens to be generated per clock cycle, while the network is NOT saturated improves responsiveness.

    Now if you go to full network load these available tokens will cause you to exceed limits for a brief moment. Eg first 10 packets got passed through 0rated while other packets are consuming tokens at the generation rate.

    This happens only at beginning of network saturation. As soon as tokens in the bucket are depleted, you are back to consuming tokens as soon as they are generated and within limits.

    There’s is two sets of buckets with the qos system per class.
    One per rate(burst) and one per ciel(cburst). Since our tokens generated are split between the classes the order the buckets fill up and get generated tokens get allotted/shared is a little more complicated.

    ---

    Simply put

    Too small bursts = unresponsiveness
    Too big bursts = you will go over QOS limits at beginning of network saturation for too long of a time and create a spike of bufferbloat.

    Asus generates burst/cburst values as a function of inputted user speeds. I had their correlation but deleted it.

    ---

    There’s a little more too it but I’m not trying to write an article. Basically I limited bursts for bulk traffic since I don’t care about a few ms of responsiveness on that type of traffic and this removed a bufferbloat spike at the beginning of network saturation once those classes start consuming data.

    ---

    I have no plans on modifying bursts/cbursts default values. This is outside the scope of the script, but the framework of the script does allow you to extend functionality and override bursts for your needs.
     
    Last edited: Oct 20, 2018
    Vexira likes this.
  2. Please support SNBForums! Just click on this link before you buy something from Amazon and we'll get a small commission on anything you buy. Thanks!
  3. Vexira

    Vexira Very Senior Member

    Joined:
    Jan 20, 2017
    Messages:
    1,393
    Location:
    Australia
    My question was what is the values that Asus use for bursts, I change from the 1600 to 1500 which is the same as my MTU to see if it was better in regards to buffer bloat, im just qurious as to what values are deafult.
     
  4. FreshJR

    FreshJR Very Senior Member

    Joined:
    Oct 8, 2016
    Messages:
    915
    function of your inputted limits
     
    Vexira likes this.
  5. Sinner

    Sinner Senior Member

    Joined:
    Sep 30, 2017
    Messages:
    289
    Location:
    Canada
    It was my interpretation its a function of your rates on each leaf. And that goes with what i see. My bursts are all prox 10% of my rates or each leaf
     
    Vexira likes this.
  6. Vexira

    Vexira Very Senior Member

    Joined:
    Jan 20, 2017
    Messages:
    1,393
    Location:
    Australia
    Thanks I appreciate it, im taking it its based off some calculation, i think ive seen ti some where
     
    Last edited: Oct 20, 2018
  7. raion969

    raion969 Occasional Visitor

    Joined:
    Dec 6, 2017
    Messages:
    16
    Do i need to enable Manually Assigned IP as a settings or just add the gaming pc to the DHCP-Liste?

    What value do i need for mask bits or do just have to use 30and just put my own ip adress in the cidr calculator and use all the same values ???
     
  8. skeal

    skeal Part of the Furniture

    Joined:
    Apr 30, 2016
    Messages:
    2,001
    Location:
    /etc
    [RESOLVED] First time I noticed this. My dslreports test results, now show excellent for HTTPS but not so much for HTTP. I'm not wrapping my head around this, can someone explain this one to me please?
    Fix: Cleared cookies and reset website in chromium to defaults.
     
    Last edited: Oct 21, 2018
  9. raion969

    raion969 Occasional Visitor

    Joined:
    Dec 6, 2017
    Messages:
    16
    Hello

    When i update my router firmware, do u have to add the script again, to get it work ?
     
    Vexira likes this.
  10. Vexira

    Vexira Very Senior Member

    Joined:
    Jan 20, 2017
    Messages:
    1,393
    Location:
    Australia
    No if it's working it will work with the update
     
  11. raion969

    raion969 Occasional Visitor

    Joined:
    Dec 6, 2017
    Messages:
    16
    I dont know exactly what i have to remove!

    only this #i ???

    or only #

    I have to say the explanation is not very clear for a person how doesnt know a lot off this topic.
     
  12. D_Day

    D_Day Regular Contributor

    Joined:
    Feb 6, 2018
    Messages:
    104
    It’s fairly simple if it’s just the default script you’re trying to install.
    Open putty and log into your router then copy and paste the script into putty. Make sure that the boxes in custom QOS are listed the same as the ones given on FreshJR’s installation guide. Then restart QOS.
     
    Vexira likes this.
  13. raion969

    raion969 Occasional Visitor

    Joined:
    Dec 6, 2017
    Messages:
    16
    i dont want the normal script i want the gaming orientale rule so what do i need to remove which letter ???
     
    Last edited: Oct 24, 2018
  14. D_Day

    D_Day Regular Contributor

    Joined:
    Feb 6, 2018
    Messages:
    104
    I can’t help you with that one, I only use the default script and that is spot on even for gaming.
     
    Vexira likes this.
  15. Vexira

    Vexira Very Senior Member

    Joined:
    Jan 20, 2017
    Messages:
    1,393
    Location:
    Australia
    Install the default script get winSCP and team viewer then on me and I can show you how to put the rule in, the gaming rule is set for a specific device, you choose which one.

    From your response I don't think that you read the first page carefully enough, don't worry we all make that mistake the first time.
     
  16. Vexira

    Vexira Very Senior Member

    Joined:
    Jan 20, 2017
    Messages:
    1,393
    Location:
    Australia
    I think that they haven't read through the first page.
     
    D_Day likes this.
  17. raion969

    raion969 Occasional Visitor

    Joined:
    Dec 6, 2017
    Messages:
    16
    That would be really cool if youwould help me.

    But think i know it except the step that i dont know what i have to remove because the red circle doest show exactly which letters thst i have to remove.
     
    Vexira likes this.
  18. Mark Eagles

    Mark Eagles Occasional Visitor

    Joined:
    May 28, 2015
    Messages:
    24
    Hi,
    I seem to be having problems on my RT-AC86U with script . installed and my buffer bloat on both up/down is C on DSLReort , settingd in QOS are 10% - my DSLReport speed, fq_codel and PPPoE/DSL.
    If i remove the script and keep the same settings its A+

    Am i missing something no svript modifcation at all its as its downloaded.

    Mark
     
    Vexira likes this.
  19. Vexira

    Vexira Very Senior Member

    Joined:
    Jan 20, 2017
    Messages:
    1,393
    Location:
    Australia
    Using 95% or 90% bandwidth and per packet overhead
     
  20. Vexira

    Vexira Very Senior Member

    Joined:
    Jan 20, 2017
    Messages:
    1,393
    Location:
    Australia
    Definitely just send me a pm and we can talk about it
     
    raion969 likes this.
  21. JohnSmith

    JohnSmith Occasional Visitor

    Joined:
    May 2, 2018
    Messages:
    33
    Location:
    Canada
    So I have read all 100+ pages so far, install FreshJR_QOS (Excellent product BTW, thanks FreshJR), and was able to use the Gaming rules, to get some games classified properly so their packets are now flowing under the "Others" traffic classification.

    The question I have is that I'm downloading from a usenet server via SSL, and I'm noticing the traffic is getting classified as "Lets Encrypt" traffic.

    Running the command, as per FreshJr:

    /jffs/scripts/FreshJR_QOS -appdb "Let Encrypt"

    gives me

    Lets Encrypt
    Cat: Net Control
    Mark: 0x801400c2 0xc03fffff
    Prio: 22

    but I notice that the traffic under "QOS Statistics" when downloading, that it is showing up for that machine classified as "Web Surfing".

    This does not make sense to me:confused: as based on the command above, I should see it under "Net Control Packets". Any thoughts?

    Also, how would I recategorize that traffic for that one machine to have it classified under "File Transferring" instead?


    My QOS Configuration is the same as FreshJR's:

    Class Total Rate Packet rate
    • Net Control Packets
    • VoIP and Instant Messaging
    • Gaming
    • Others
    • Web Surfing
    • Video and Audio Streaming
    • File Transferring
    • Default
     
    Last edited: Oct 26, 2018
Please support SNBForums! Just click on this link before you buy something from Amazon and we'll get a small commission on anything you buy. Thanks!