Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    How does borrowing work in CBQ? Or, does it?

    Scheduled Pinned Locked Moved Traffic Shaping
    4 Posts 1 Posters 1.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      SteveITS Galactic Empire
      last edited by SteveITS

      I was beating my head against a low priority download that was slower than expected, and think it's related to the queue bandwidth since I can make it speed up and down (though not exactly matching the speed).

      One of the times I set up shaping somewhere I noted the default allocations (I converted to percentages):

      WAN\qInternet: 100%
      WAN\qInternet\qAck: 20%
      WAN\qInternet\qDefault: 10%
      WAN\qInternet\qOthersHigh: 10%
      WAN\qInternet\qOthersLow: 5%
      (note those don't add up to 100%)

      LAN\qLink: 20%
      LAN\qInternet: 80%
      LAN\qInternet\qAck: 20%
      LAN\qInternet\qOthersHigh: 10%
      LAN\qInternet\qOthersLow: 5%

      My understanding is it's better to use even units, so 2 Mbps not 1.9887 Mbps like the wizard sets (??) so I generally convert them to K or M.

      I was diagnosing why a low priority download (out the WAN in the data center) seemed throttled around 10 Mbps. This particular connection has 100 Mbps at both ends (upload to Internet, download to computer). So WAN\qInternet\qOthersLow and LAN\qInternet\qOthersLow were set at the default 5 Mbps. One end is on 21.05, the other 2.5.2.

      First off, the wizard sets WAN\qInternet to not borrow, but if I save any children that are already set to borrow by the wizard, I get "You cannot set 'Borrow' if the parent queue also does not borrow." Is that an error? Should it be set to not borrow? Is the message wrong and the default wizard setup actually valid?

      If "Borrow from other queues when available" is set and the 100 Mbps pipe is not full, should I expect to get over 10-11 Mbps? 10 is obviously over 5, but it's nowhere near 100.

      I found through trial and error if I raise the WAN\qInternet\qOthersLow in the data center it would improve the download speed. The highest speed so far is with setting both that and LAN\qInternet\qOthersLow on the other end to something higher, like 40 Mbps. That gets me around 35-40 Mbps if I look at Status/Queues, while rsync reports around 4 million bytes/sec.

      It doesn't make sense to set the low priority queue to have a super high bandwidth. Am I wrong to expect it to get up to a max of 100 Mbps by borrowing?

      Should WAN\qInternet\qDefault be set to something higher than the default 10%, like 75%?

      Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
      When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
      Upvote ๐Ÿ‘ helpful posts!

      S 2 Replies Last reply Reply Quote 0
      • S
        SteveITS Galactic Empire @SteveITS
        last edited by

        I found this comment that would explain the error message, and indicate the wizard has an error if it is setting WAN\qInternet to not borrow:
        "As far as I can tell from [experimenting] (profusely, I might add), a parent queue should always be set to borrow. It appears to take care of two things: borrowing from the root, lending to the children."

        That still doesn't explain why I'm not able to get to 100, as WAN\qInternet should therefore lend out its remaining bandwidth??

        If I do flip the bandwidth for WAN\qInternet\qOthersLow and WAN\qInternet\qOthersDefault (so default has more) it is still fast.

        Also, almost forgot as I just have gotten used to fixing it...one of the queues doesn't get a priority either, I think qInternet since the GUI shows 1 is the default, but it doesn't allow saving without a number. (don't have a unit I can play with right now to double check) That would make the defaults (given as %):

        WAN\qInternet: 100%, priority 1, no borrow
        WAN\qInternet\qAck: 20%, priority 6, borrow
        WAN\qInternet\qDefault: 10%, priority 3, borrow
        WAN\qInternet\qOthersHigh: 10%, priority 4, borrow
        WAN\qInternet\qOthersLow: 5%, priority 2, borrow

        Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
        When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
        Upvote ๐Ÿ‘ helpful posts!

        1 Reply Last reply Reply Quote 0
        • S
          SteveITS Galactic Empire @SteveITS
          last edited by

          Seems like a good part of my bandwidth confusion is Comcast. We have Comcast at our office. I found that the Comcast/Xfinity speed test site is testing about 40 Mbps downloading to our office, and from the data center (which peers with Comcast and others) the same site is about 75 Mbps uploading (out of the data center; full speed downloading). Other test sites are full speed. So seems like Comcast is busy/throttling/something.

          Download speed of definitely did drastically improve with the above tweaks though, just can't seem to get it over ~45 Mbps.

          Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
          When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
          Upvote ๐Ÿ‘ helpful posts!

          S 1 Reply Last reply Reply Quote 0
          • S
            SteveITS Galactic Empire @SteveITS
            last edited by

            @steveits said in How does borrowing work in CBQ? Or, does it?:

            I found that the Comcast/Xfinity speed test site is testing about 40 Mbps downloading to our office

            Finally tracked this part down, and kinda feel dumb, but speedtest.xfinity.com has a gear in the upper right to change protocols. Testing over IPv6 tunneled through Hurricane Electric is throttled to around 40. Testing over IPv4 is the expected speed.

            Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
            When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
            Upvote ๐Ÿ‘ helpful posts!

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.