Menu

Thursday, July 16, 2020

Bufferbloat on TPLink Archer C7 v3

This is an interesting (and very technical) subject, so skip it if you don't care 😇. Simply put, your router / Wifi access point is a little dumb, and is so busy with downloads that it can't do concurrent uploads fast enough.

It's fixable (somewhat) by using QoS, as I tried on my Archer C7 v3.


1. Bufferbloat

Some modems / routers have issues with 'bufferbloat'. You can find more about 'bufferbloat' here.

This might happen when one user is gaming, and other users are downloading or streaming.

To quickly test use this link, or watch the 'temporary'  latency numbers in fast.com go up and reach 500+ when downloading.

There's no easy solution, besides buying a better router... But, unfortunately, there are little to no specs regarding bufferbloat, so your only options might be to play with QoS settings, or select a new router based on the speed of its CPU (not easy either).

If you're impatient, scroll down to the bottom of this post where you will find a quick and easy step by step.


2. Archer C7 v3

The TP Link Archer C7 v3 has an option in its firmware called QoS, which appears to fix (part of) the problem.

You'll find the option in your router settings under Advanced / QoS. I am operating with QoS enabled to make sure my PS4 downloads will not eat up all bandwidth, but by properly setting the limits you can positively affect multiple simultaneous users, and / or different work loads.

If you are the only user, AND you don't game with a download in the background, then most likely you can just leave things as is, and pretty much forget about bufferbloat :-)


3. Test setup

Ziggo (NL), 50 mbps cable modem, 1 gbps home network, Dell M2800, ethernet, outside peak hours

Update 13.04.2021. Ziggo increased the bandwidth, but they haven't listed the actual values for my subscription (I'm on a very old contract that they try to ignore as much as possible 😁). They also replaced my modem some time ago, so there were multiple changes.

Update 16.07.2022. Ziggo again increased price and bandwidth, giving me another chance to test my recipe. And it works again as intended.


4. Results at 40 mbps

Before the upgrade to 70 mbps.


4.1 QoS disabled

  • down: 40 mbps
  • up: 2.6 mbps
  • unloaded: 11 ms
  • loaded: 29 ms
  • down: 51 mbps
  • up: 4.7 mpbs
  • overall: C
  • bufferbloat: F
  • quality: A+
  • speed: -

4.2 QoS enabled, max speed 1000 mbps up, 1000 mbps down

Note that real speeds are around 4 mbps up and 50 mbps down. So, setting the QOS at very high values shouldn't affect the behaviour... yet it does, and consistently. So switching on QOS does change some of the logic inside the router. Unfortunately, not enough.

  • down: 48 mbps
  • up: 4.1 mbps
  • unloaded: 11 ms
  • loaded: 21 ms
  • down: 50 mbps
  • up: 4.6 mpbs
  • overall: C
  • bufferbloat: F
  • quality: A+
  • speed: -

4.3 QoS enabled, max speed 4.5 mbps up, 50 mbps down

Note that real speeds are around 4 mbps up and 50 mbps down (QoS set to 4.5 up 50 down).

  • down: 44 mbps
  • up: 3.2 mbps
  • unloaded: 13 ms
  • loaded: 27 ms
  • down: 44 mbps
  • up: 4.0 mpbs
  • overall: A
  • bufferbloat: A
  • quality: A
  • speed: -

It's obvious that these settings decrease the impact of bufferbloat and may help somewhat, but it isn't a real solution, as it starts wasting a little bandwidth. However, I don't have any other options in my el-cheapo router... Then again, if you have more bandwidth than you actually need... why not? The little loss in bandwidth is offset by improved response times.


5. Results at 70 mbps

After the Ziggo upgrade.


5.1 QoS disabled

This gave the following results (in the morning, weekday, off-peak hours):

  • down: 74 mbps
  • up: 9.9 mbps
  • unloaded: 12 ms
  • loaded: 15 ms (during busy hours this went up to 22 ms)
  • down: 77.5 mbps
  • up: 10.1 mpbs
  • overall: C
  • bufferbloat: F
  • quality: A+
  • speed: -

5.2 QoS enabled, max speed 10 mbps up, 80 mbps down

When taking a peek inside the new Ziggo Connect Box I spotted upload 10.7 mbps, download 80.2 mbps. Some testing with QoS off showed similar numbers, so I set my QoS levels to 10 up and 80 down. I still find it strange how setting QoS affects Fast.com that much, whilst DSLreports appears to be less affected.

  • down: 66 mbps
  • up: 7 mbps
  • unloaded: 13 ms
  • loaded: 18 ms
    • down: 70.7 mbps
    • up: 9.0 mpbs
    • overall: A
    • bufferbloat: A
    • quality: A
    • speed: -
    You can play a bit with these limits, If you're on an asymmetric link, you might consider increasing QoS upload a little, until it starts affecting downloads. I settled on he following settings:

    QoS up 11 (contract Ziggo says 10 mbps, so +10%, or fast.com 9.9 + 11%)

    QoS down 80 (contract Ziggo says 80 mbps, so + 0%, or fast.com 74 + 8%)

    Your situation may require different numbers, depending on modem and other factors. Just increasing the QoS limits by 1 mbps (up or downstream) may seriously affect your test results, so change, test, change, test, etc.

    See also the section on CPU load at the bottom of this post.

    6. Router-CPU Limited

    The root cause for all this bufferbloat is the limitation of your router's CPU capacity, and the software it runs. I was consistently getting maximal speeds using my approach above FOR A SINGLE DEVICE. If another device would also do a massive download, then it still might affect the links of other devices, no matter if I shuffled them around, assigned them different QoS levels, etc.

    When you think about it that does make sense. With multiple devices your router needs to maintain more than one table, reroute packets to and from multiple devices etc. It's going to be busy.

    If running multiple devices causes trouble you have to take one more step: use another device and start a massive download (downloading a game on a PS4 is one of the most troublesome things for a cheap router, I don't know why).


    7. Conclusions


    1. It appears setting QoS on this ol' cheap Archer C7 v3 fixes the issue somewhat, at the cost of a little upload and download speed. Note that I have a relative slow cable connection, so my router doesn't have to work too hard shuffling all those packets 😉

    2. I don't know what level of priority is assigned to unlisted devices in the priority table, i.e. if something is NOT assigned to any of the high / middle / low categories, then how is it treated? This isn't documented. My suspicion is it is treated below low level, but that requires some more testing. Some better documentation would have been nice, TPLink! 😕

    3. I had some bandwidth issues with my daughter's iPad when the PS4 tried to update / download, and would eat up all bandwidth whilst doing so. By adding her iPad to the 'high priority' group everything worked smoothly. Thus far I did not have to add any other devices to the table. We're fine for now 😅

    4. If you use these settings, then don't forget to check the available upload / download speed now and again. Some ISP's, in spite of their money grabbing nature, may offer free, gradual speed increases, and you would miss out on those if you have incorrectly set your maximal bandwidth.

    So, now and again, disable QoS and do a speed test to check if your settings are still right.

    5. It may not matter to your situation / use case! Interestingly, disabling QoS gives me faster measured upload AND download speeds (but not simultaneously, which is the whole point). However, in real life, with multiple users in my household (cough, kids, cough) I found that enabling QoS made simultaneous use of NetFlix, video conferencing, gaming and downloading a little smoother.

    6. Watch out for CPU load! Higher speeds and cheaper routers don't like one another...

    But... it's still worth a try.

    8. Step by step

    0. Use cabled ethernet (NOT WIFI) to test and adjust QoS!!!

    1. Disable QoS (you may have to reboot your router)

    2. Measure best speed using fast.com on a quiet moment. Due to overhead you should reach about 90% of what your ISP claims.

    3. Enable QoS (you may have to reboot your router)

    4. Set QoS up to fast.com's speed OR to the speed your ISP claims

    5. Set QoS down to fast.com's speed OR the speed your ISP claims

    6. Test with https://dslreports.com/speedtest. You want to have A for bufferbloat, and best up and download speeds.

    7. Adjust QoS speed.

    a. When on an asymmetric link (cable) you typically start with the download speed, and increase / decrease it until you have a maximal speed with bufferbloat score A. After that you increase the upload speed until it has no longer any effect.

    b. When on a symmetric link (typically fiber) you typically increase / decrease both the upload and download values until you reach maximal throughput with a bufferbloat score of A.

    8. Repeat 6 and 7 until you are satisfied (buferbloat and speeds)

    9. Check impact of CPU load.

    a. If your router can show the CPU load: you want to keep it just below 100%, 99% is fine, just to make sure it can handle all the traffic. Keep adjusting QoS up and download until you're satisfied.

    b. If you can't see the CPU load on your router, you just have to browse a bit on another device (not the one downloading) and see how it is affected. Keep reducing the upload and download speeds until you feel comfortable.

    c. Another good indicator is the responsiveness of your router's web interface. My el-cheapo Archer C7 started to become troublesome at speeds above 80 mpbs.

     


    No comments:

    Post a Comment