Can we add some QOS options?

Report issues relating to bandwith monitoring, bandwidth quotas or QoS in this forum.

Moderator: Moderators

guyso
Posts: 47
Joined: Fri Jan 06, 2012 6:52 pm

Can we add some QOS options?

Post by guyso »

Hi all. I have an Broadband cable line with very bad evening congestion. I get a rock solid 30mbps during the day but this can drop to nearly 3mbps in the evening peak.

The trouble I have is that the ACC bottoms out at a Fair Link Limit of 15% of Total Download Bandwidth, or 4.5mbps in my case. I see this happening at night and as my max rate at this time is around 3mbps I do not get any QOS as I can not reach 4.5mbps. Is it possible to add an option to change the lower cutoff threshold? If this can not be added in the menu, is there a setting I can edit to adjust this, maybe in one of the etc/config files?

The other problem I have is that once the Fair Link Limit is sitting on 4500kbps (as it is now) the next day it never really recovers to 30mbps with normal browsing as the short bursts of downloads for browsing and email are not long enough to push the limit back up that far. Thus I am limited to very slow speeds all day when in reality I could have 30mbps at this time. I can restore the Fair Load Limit either by downloading a 1 gig file though this still takes nearly 15 minutes to restore back to max speed, or I can log in and click save settings on QOS (Download) page to reset the ACC Fair Load Limit. After giving this some thought the best option I can see is to have a setting which allows the Fair Load Limit to restore to Total Download Bandwidth after a period of very low activity as determined by the ACC status being IDLE. In my case if the ACC was IDLE for about four to six hours then restore back to Total Download Bandwidth. The time could be an option setting. An alternative though maybe not as effective would be to use a time based function to do this, in my case I would set it to about 6.00am. If these are too complex a simple option to restore the Fair Load Limit every six hours (option setting?) would also work in mine and possibly other cases. I have noticed some posts from others on the Forum who seem to have similar problems. They may have better suggestions.

Sorry for the long post and thank you for Gargoyle, it is a fantastic piece of software. I should mention that I am trying to get the Broadband supplier to do something, though I have little confidence with this course of action.
Netgear WNDR3700 v1 and v2 and v4
Linksys WRT1900ACS

pbix
Developer
Posts: 1373
Joined: Fri Aug 21, 2009 5:09 pm

Re: Can we add some QOS options?

Post by pbix »

Hi guyso,

Sounds like you do struggle with getting good service from your ISP.

There are no options to change the dynamic range of ACC so your only recourse (without resorting to the source code yourself) is to set your upper limit at 8x your lowest observed service. So yes in those limited periods when your service is actually over this value you will loose some bandwidth.

As for resetting ACC you can do that from a chron task by just running /etc/init.d/qos-gargoyle restart. You would need to do this periodically, in the mornings for example, to get back to your high limit quickly.
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

guyso
Posts: 47
Joined: Fri Jan 06, 2012 6:52 pm

Re: Can we add some QOS options?

Post by guyso »

Hi pbix,

Thank you for your response. I was hoping the changes I described could go onto the list for Feature Requests. Particularly the second request to have the Fair Load Limit reset after a period of no ACC activation as restoring the Fair Load Limit seems to have been an issue with others based on posts I have read. Should I repeat the posting in the Feature Requests Section of the Forum?

I would really appreciate some help with adding the chron task you mention as this would be a good alternative fix. I take it I need to add the following line to a file to reset the Fair Load Limit at 5.30am each morning. My Linus skills are limited though I can edit files using WinSCP.

Based on a bit of Googling am I correct in assuming the following line should be inserted in the /etc/config/crontab file? I notice that the "config" folder appears to be a shortcut and I actually end up at the /mnt/HDA_ROOT/.config/crontab file though I do not imagine this makes a difference, I can still add the following line to the crontab file if this is the right location. Thanks very much.

30 5 * * * /etc/init.d/qos-gargoyle restart
Netgear WNDR3700 v1 and v2 and v4
Linksys WRT1900ACS

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Can we add some QOS options?

Post by Lantis »

That looks correct.
But the cron file is
/etc/crontabs/root

(I can't remember if it's "crontab" or "crontabs" but in WinSCP it will be obvious.)


As far as requesting these as a feature, you're already talking to the right guy (pbix).my understanding is that QoS and ACC are his babies.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

guyso
Posts: 47
Joined: Fri Jan 06, 2012 6:52 pm

Re: Can we add some QOS options?

Post by guyso »

Thank you Lantis for your help.

You are correct with your location of the cron file, I was getting muddled up with another device I was investigating. For the info of anyone else who is looking to implement this reset, the command line provided by pbix had a small typo. It should be

/etc/init.d/qos_gargoyle restart

with an underscore between qos and gargoyle and not a dash.

I have experimented with the command by setting a time about ten minutes into the future and it seems to work. I did need to power down and power up the router after any change, not sure if a software reset will work. I have now set it for 5.30am and will see how it goes tomorrow morning.

One more question, why does the reset make the Fair Load Limit 27,000kbps when I have a Total Download Limit Setting of 30,000kbps? I would have thought it would have reset the limit to the maximum, not 90% of the maximum.

I hope the developers can see their way to implementing some sort of option to have this time setting as permanent, else I will have to manually implement this update with each firmware change.

Thanks again.
Netgear WNDR3700 v1 and v2 and v4
Linksys WRT1900ACS

guyso
Posts: 47
Joined: Fri Jan 06, 2012 6:52 pm

Re: Can we add some QOS options?

Post by guyso »

For an update, I have tested the the cron task installed as described and it works with ACC reset at 5.30am.

The only thing I would still like to know is why ACC resets the Fair Load Limit to 27000kbps when I have a 30000kbps Total Download Load Limit.
Netgear WNDR3700 v1 and v2 and v4
Linksys WRT1900ACS

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Can we add some QOS options?

Post by Lantis »

That's another set constant in the code. It subtracts a percentage (5%) to make QOS work.
Under high download situations where QOS isn't having to actively manage anything the number will raise to your 30mbit limit eventually.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

guyso
Posts: 47
Joined: Fri Jan 06, 2012 6:52 pm

Re: Can we add some QOS options?

Post by guyso »

Thank you Lantis for that answer. One more question for you and/or pbix if that is OK.

Now that I know how to use Cron to restart QOS at 5.30am, is there a command I can attached to a Cron which will replace the 30000kbps limit in the etc/config/qos_gargoyle file (the line which says "option total_bandwidth '30000'") with a different value. The reason for needing to do this is that during the day I set my Total Download Limit to 30,000kbps to get my full bandwidth, but at night and due to congestion my bandwidth drops to around 3,500kbps. As this is below the 15% ACC cutoff (4500kbps), during the congested evening peak my QOS never works. Worst still this is when I need QOS most as this is when I have minimum bandwidth and both my kids are home using their PCs.

What I would like to do is use a cron to reset my Total Download Bandwidth limit to say 15,000kbps in the evening so my reduced bandwidth is always above the 15% lower limit and QOS will work, and then another cron to increase the setting back to 30,000kbps in the morning so I get my full daytime speed. If I could attach a command to a cron to reset the Total Download Limit to appropriate values followed by a restart cron and do this each night and morning to adjust my Total Download Limit then my problem would be solved.

I have done some googling and found 'sed' and 'awk' commands which sound promising, though I know little of Linux and I am worried about bricking the router if I get it wrong.

Thank you for looking at this for me.
Netgear WNDR3700 v1 and v2 and v4
Linksys WRT1900ACS

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Can we add some QOS options?

Post by Lantis »

Sed and awk is one option.
I'd be more inclined to use "uci".

I'm not at a computer today but something along the lines of

Uci get gargoyle_qos.dowload.limit

I'm not sure the exact but the format is

uci get <config file>.<section>.<variable>

You can use uci set to of course change the variable. After you make a change you must "uci commit" the change.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

guyso
Posts: 47
Joined: Fri Jan 06, 2012 6:52 pm

Re: Can we add some QOS options?

Post by guyso »

Thanks Lantis excellent advice.

I did a bit of Googling and found the following six cron tasks set the Total Download Bandwidth limit from inital 30000kbps down to 6000kbps and then 10 minutes later back to 29000kbps.

35 15 * * * uci set qos_gargoyle.download.total_bandwidth=6000
36 15 * * * uci commit qos_gargoyle
37 15 * * * /etc/init.d/qos_gargoyle restart
45 15 * * * uci set qos_gargoyle.download.total_bandwidth=29000
46 15 * * * uci commit qos_gargoyle
47 15 * * * /etc/init.d/qos_gargoyle restart


I will try tonight and set down in the evening and up in the morning. All going well, a bit of experimentation will arrive at the right times and limits.

My final problem is that the approach I have used with three one minute separated cron tasks per change seems very messy. Is there a more elegant way to write these into one or two cron tasks? Maybe some way to combine the set and commit commands?

Thanks again.
Netgear WNDR3700 v1 and v2 and v4
Linksys WRT1900ACS

Post Reply