Netgate SG-1000 microFirewall

Author Topic: Traffic Shaping Queue Length Question  (Read 402 times)

0 Members and 1 Guest are viewing this topic.

Offline tman222

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +12/-0
    • View Profile
Traffic Shaping Queue Length Question
« on: July 30, 2017, 12:40:00 pm »
Hi all,

I have been reading through a few more threads on traffic shaping wanted to get your thoughts about WAN/LAN queue lengths.  Before today, my setup was as follows:


Scheduler:  FAIRQ
Traffic Queue:  1 Main Queue managed by Codel
Queue Limit:  50
Bandwidth: 970Mbit   (I have a symmetric 1Gbit connection).

Running various tests this gave pretty good results and essentially no bufflerbloat.  This surprised me a bit since the bandwidth limit I had chosen was beyond the theoretical limit of a 1 Gbit interface (closer to 950Mbit considering protocol overhead).  However, I noticed that I had a decent amount of dropped packets (especially on the WAN interface) when maxing out the connection (e.g. on a speed test).

Upon reading a few threads including this one,

I started to wonder if it was all the dropped packets that were causing the connection backoff/regulate, and that was what was giving me almost no bufferbloat.  At that point I was no longer sure how much Codel was actually doing to improve queue management.

Next I decided that I could probably increase the queue length (limit) beyond 50 and just let Codel worry about queue management.  I increased the Queue Limit from 50 to 1024 (arbitrarily chosen value) and ran some more tests (leaving everything else unchanged including the interface and queue bandwidth).   I could now see a difference during the upload portion.  Upload bandwidth would first spike above 950Mbit , latency would increase, and then would start to back down followed by latency decreasing and staying low, with the connection stabilizing nicely.  However, now there were no more dropped packets (i.e. the limit of 50 was too small).   

Next I decreased the interface and queue bandwidth down to 950Mbit from 970Mbit and ran some more tests.  The bandwidth and latency spike in the beginning is now all but gone and the upload is very stable.   Testing connections to other sites while maxing out the upload gave me a latency increase of 5 - 10 ms average, which I think is acceptable.

New WAN & LAN Settings:

Scheduler:  FAIRQ
Traffic Queue:  1 Main Queue managed by Codel
Queue Limit:  1024  (highest I've seen queue fill during speed test was a little over 400)
Bandwidth: 950Mbit   

Giving my testing, is there anything else you guys would suggest I should change?  For instance should I decrease the queue length to e.g. 512?  Should I drop the interface and queue bandwidth further?

Thanks in advance for your help and advice, I really appreciate it.  Maybe I'm strange, but I really enjoy learning about these concepts and tweaking settings :)