HFSC Shaping wizard: speed never reaching limits ("missing" bandwidth)?
-
I used the shaping wizard a long time ago for my queues and haven't noticed problems with it. However, I recently started running some speed tests and I'm only seeing around 15Mbps down (my connection is rated for 30/5), although I do get right about 5Mb/s up.
I removed all shaper rules and tested again (same speedtest.net site - it's in a different state but within my ISP's network so it's pretty reliable at maxing my line): without shaper rules, it tests at 36/6.
After removing the rules I re-ran the "Dedicated Links" shaper wizard from scratch, tested again, and back down to ~15Mbps. I left most stuff untouched, so it used the default queuing setting (HFSC). I did not enter any percentage limitations on bandwidth anywhere during the wizard, nor did I set HTTP to a lower priority or anything. My main reasons for the wizard are to improve gaming latency as well as realtime operations (VNC, RDP, Facetime, etc). I input my rated WAN connection speed when asked about bandwidth.
Something is happening with the shaper that's eating bandwidth… network is otherwise idle, it's not contention. I do happen to be testing over wifi right now (5ghz AC connected at ~800 Mbps), but the same behavior happens while wired, so I don't believe it's a LAN issue.
My initial thought was that it was somehow a CPU limitation, but CPU is basically idle the entire time. Interrupts go up to ~5% when running a test (per top from the console), but it's not like CPU is sitting at 100% or anything. Hardware is a Soekris net6501-70, Atom E6xx 1.6Ghz with 2GB of RAM. If it matters, all of the network hardware offloads are currently enabled (i.e. boxes not checked under System:Advanced:Networking), I'm not sure if this is the default or if I changed them at some point along the line. I am running the embedded/NanoBSD 32-bit OS.
I'm completely baffled. Shaper has worked fine in the past, I know 2.0.x I was able to hit rated speed with shaper enabled, not sure if I ever really tested 2.1 or 2.2x until now.
[EDIT]
I cleared the shaper again, re-ran the wizard, and chose PRIQ for both WAN and LAN this time. Now speeds are inline with where I expect them to be. Either there's a bug somewhere with HFSC's application (?) or the actual HFSC queuing process is somehow bogging down the router and not allowing traffic to pass at full speed. I'm going back and trying CBQ right now…
-
Show us your traffic-shaper settings.
If you have a simple setup, delete the LAN shaper, which should simplify trouble-shooting. My buffer-bloat is primarily on egress/upload anyway, so I forgoe LAN traffic manipulation.
Look at pftop and other diags for clues.
-
Show us your traffic-shaper settings.
They were exactly as the wizard spits out. I increased priority for some traffic via the check boxes in the wizard, but nothing else was altered.
I edited the original post, see the new bottom section. If I clear and re-run wizard using PRIQ instead of HFSC, speed is back to where it should be. The problem is restricted to HFSC algorithm (CBQ is also fine after just testing that now).
-
Your queues are probably too small and dropping packets. Have you checked your queue status?
-
@bradenmcg:
Show us your traffic-shaper settings.
They were exactly as the wizard spits out. I increased priority for some traffic via the check boxes in the wizard, but nothing else was altered.
I edited the original post, see the new bottom section. If I clear and re-run wizard using PRIQ instead of HFSC, speed is back to where it should be. The problem is restricted to HFSC algorithm (CBQ is also fine after just testing that now).
Exactly what values are you putting into LAN and WAN interfaces in the traffic-shaper?
You may have a fubared config.
-
@bradenmcg:
Show us your traffic-shaper settings.
They were exactly as the wizard spits out. I increased priority for some traffic via the check boxes in the wizard, but nothing else was altered.
I edited the original post, see the new bottom section. If I clear and re-run wizard using PRIQ instead of HFSC, speed is back to where it should be. The problem is restricted to HFSC algorithm (CBQ is also fine after just testing that now).
Exactly what values are you putting into LAN and WAN interfaces in the traffic-shaper?
You may have a fubared config.
The wizard doesn't ask for values for each interface, it asks you for up and downstream speed on your WAN link.
I simply input the speeds (30 down, 5 up) in Mbit/sec and used the dropdown boxes to pick Mbit/sec. I'm not doing anything special or crazy here, just using the wizard. If it's not working correctly, it seems like there's a bug.I will clear shaper rules and re-run the wizard again (HFCS mode) later tonight or on Monday and grab the relevant section of the config file and put it up here.
Your queues are probably too small and dropping packets. Have you checked your queue status?
I didn't look at the queues; why would the shaper wizard create a setup with improperly sized queues?
-
This is an uncommon problem with too many possibilities for us to name. If you can, during the 15-but-should-be-30Mbit bug, look at pftop and any of the diagnostics to help narrow the posdibiities.
I would either forget HFSC or try a fresh install/config.
-
This is an uncommon problem with too many possibilities for us to name. If you can, during the 15-but-should-be-30Mbit bug, look at pftop and any of the diagnostics to help narrow the posdibiities.
What specifically should I be looking for? Queue exhaustion / lots of drops? Is there a specific set of pftop flags I should be using (console/SSH) to get what you guys need to see? Again, all I've done to set this up is first clear the shaper config, and then go through the wizard. If the wizard isn't working correctly or is somehow causing this, that seems like it should be investigated further (and I'm happy to provide whatever help I can).
I would either forget HFSC or try a fresh install/config.
This seems pretty ridiculous.
I'm going to reconfigure back to "slow mode" ;D and will dump the config and provide the shaper section in my next post.
-
IMHO the wizard is only useful to provide a basic view into how the shaper might be configured.
If it doesn't work for you it doesn't work for you.
HFSC shaping is not for the faint of heart.
That said, it does work if configured properly.
-
HFSC is not hard, I don't know why people think it's confusing. It does have advanced features, just don't use them. The hardest part of HFSC is that people keep saying it's hard, then start off explaining the advanced parts.
I can't wait for CAKE. Then you just set the bandwidth, nothing more. No child queues, no queue sizes. The only possible options will be the RTT option to tune for your typical latency.
-
HFSC is not hard, I don't know why people think it's confusing.
Because nobody has managed to document the thing so that everyone can easily understand it. Toastman's guide is probably the best I've seen, and I find it lacking.
-
I could try to write a non-official guide kind of as experiment. HFSC works well for me, but my Internet connection is seemingly exceptional and could mask some of my mistakes. My personal pet peeve is that when something works, people rarely come back to mention that. They just complain when things aren't working, you have them try something, and you never hear from them again. Did it work?
-
My biggest issue with grokking HFSC is all of the variables and how they interrelate, and which ones are mandatory versus optionals. Most guides talk about everything theoretically, whereas I would be much better off with a series of empirical examples with Q&A to handle the edge/corner cases. I can't help but notice that Traffic Shaping has been conspicuously absent from the monthly hangouts, and that's a shame as I believe such a hangout would help a lot of people.
If you want to tackle a guide, I would be more then happy to proof it and ask lots of silly questions.
-
I know that I have played with PRIQ and other shapers and for what I use it for , HFSC works out the best for me. Granted my needs for it are unique but you could take my config and look at it and tweak it for your use or application purposes.
You can talk theory all you want but the best way to get used to using a shaper is to be able to put it into practice and try things out , changing a setting at a time and see what the results are. Does it take time , yes but it will yield a better result.
I feel that a lot of people come here looking for the magic bullet that will solve all their problems and are not willing to put in the work necessary to figure it out on their own. People like KOM , Nullity , Harvey66, Derelict answer questions in here and ask for specifics and try and help people out as best they can.
When your posting a question be sure to post specifics and use screenshots (Windows has this free Snipping tool that works great) , document your setup and how you are reproducing the results. Help them help you.
I know I haven't upgraded my PFSense past 2.2.1 right now and that is what I run as a "gold" level with my HFSC. Just my 2 cents.
-
Granted my needs for it are unique but you could take my config and look at it and tweak it for your use
That depends on the person knowing what the heck they're doing :D
You can talk theory all you want but the best way to get used to using a shaper is to be able to put it into practice and try things out
This is easy to say but not so easy in practice. Creating a virtual lab is simple, but then having clients simulating different traffic types and creating contention is where it gets tricky. Having a live LAN that you can diddle with without upsetting users is very hard to find.
I feel that a lot of people come here looking for the magic bullet that will solve all their problems and are not willing to put in the work necessary to figure it out on their own.
I believe that they shouldn't have to. Having the requisite base knowledge is mandatory of course, but some stuff you shouldn't need to know all of the ins & outs. People know what they want, but they don't know how to do it and that's a reflection of the GUI. The wizard helps a lot, but it's pretty basic in my opinion. I don't help very much in this particular forum after it became apparent to me that I don't really know what I'm talking about so I should stop talking.
-
For hfsc, the range is 0 to 7. The default is 1. Hfsc queues with a higher priority are preferred in the case of overload.
Having language like that in the shaper config page when priority means nothing to HFSC doesn't help.
-
@KOM:
I feel that a lot of people come here looking for the magic bullet that will solve all their problems and are not willing to put in the work necessary to figure it out on their own.
I believe that they shouldn't have to. Having the requisite base knowledge is mandatory of course, but some stuff you shouldn't need to know all of the ins & outs. People know what they want, but they don't know how to do it and that's a reflection of the GUI. The wizard helps a lot, but it's pretty basic in my opinion. I don't help very much in this particular forum after it became apparent to me that I don't really know what I'm talking about so I should stop talking.
Exactly. My whole point here is that I simply ran the shaper wizard, provided my upstream & downstream bandwidth, checked some of the boxes, and it's not working as I expect (i.e. "correctly"). This makes it seem like something is wrong, either with the shaper wizard or with the software itself. If the wizard is truly only meant as a "guideline" and some tweaking is not only expected but required, that needs to be made much more clear, and possibly stop calling it a "wizard."
More concerning to me is that I had a previous HFSC shaper config in place that never interfered with speed in the past, but then after an upgrade (unfortunately not sure which one), it started impacting traffic, and clearing that config (Which was also wizard-generated in an earlier version of pfSense) and then adding a new one still continued to exhibit the problem.
-
This problem is not common. There is nothing to fix (unless you can get enough information and submit a proper bug report).
I do not mean to seem insensitive or accusatory but I commonly encounter problems with software that are not common/well-documented and I must find a work-around myself. You may need to do this. Personally I consider this an everday part of using any software (especially free software).
Just saying "it's broken" is no help to developers. They need detailed bug reports.
-
This problem is not common. There is nothing to fix (unless you can get enough information and submit a proper bug report).
I do not mean to seem insensitive or accusatory but I commonly encounter problems with software that are not common/well-documented and I must find a work-around myself. You may need to do this. Personally I consider this an everday part of using any software.
Just saying "it's broken" is no help to developers. They need detailed bug reports.
I need a suggestion of what to collect / log in order to prove that something is wrong, as I asked earlier.
I just watched Diagnostics : Queues and nothing looked amiss - there were some "drops" showing but not a huge number.
Here's a Pastie link with both the Shaper config and all of my firewall rules (you can see my setup is pretty basic, most of the rules are from the shaper wizard!)
Note that I purposefully used higher bandwidth values than my connection is rated for, to see if it would improve the test at all. (When I test without any shaper config, I'll show ~36Mbps downstream and ~6Mbps upstream, even though the connection is only rated for 30 / 5.)
-
@bradenmcg:
I need a suggestion of what to collect / log in order to prove that something is wrong, as I asked earlier.
Google how to submit a proper bug report and perhaps search the development sub-forum.
Practically, you need to precisely document how someone else can recreate the bug.
If the bug cannot be repeatably recreated, the problem might be your own.