How does active congestion control work?

General discussion about Gargoyle, OpenWrt or anything else even remotely related to the project

Moderator: Moderators

Post Reply
mgiammarco
Posts: 6
Joined: Sun Jan 24, 2010 3:40 pm

How does active congestion control work?

Post by mgiammarco »

Hello,
I would like to understand how active congestion control work.

First thing I notice is that you can have several classes and in each class you can specify bandwidth amount but not latency limit.

Then I notice that congestion control tries to keep ping always very low.

It can be a good thing but unfortunately I have a 2mbit adsl and if it keeps the ping to 80 ms it means that I can download files at only half a megabyte.

I do not understand if ping control kicks in only when there is more than one class active. I have often more than one class active even if I have only one download.

Can someone explain me howto improve download performance? It seems that in my case congestion control is too aggressive.

Thanks in advance,
Mario

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

Re: How does active congestion control work?

Post by pbix »

As you noticed the active congestion controller is idle unless more than one class is active.

I myself have a 1Mbps ADSL link. Normally my link gets throttled to around 750kbps to maintain my ping rates when the link is saturated and more than one class is active. But this level varies some throughout the day depending on what is going on with my ISP.

High ping times indicate congestion. The only remedy known is to lower the throughput. I disagree that your controller is being "too aggressive" or that 85ms pings are "very low" as you state. This ping rate was selected because any higher level becomes very noticeable for VoIP applications and online games. What are your normal ping times on an idle link?

The only advise I can give is to try and minimize the number of classes you create such that only one class is active most of the time and the controller becomes active only when you really need it.
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

mgiammarco
Posts: 6
Joined: Sun Jan 24, 2010 3:40 pm

Re: How does active congestion control work?

Post by mgiammarco »

I do not want do criticize the active congestion control which is an algorithm very nice and it is only present on gargoyle.

I want only to understand very well is inner working.

I appreciate very much your suggestion to minimize the number of active classes.

Now that I understand better the algorithm I have a suggestion: there are some classes that are ping sensitive (eg. voip, ssh) other that are not ping sensitive (http,ftp,torrent). Why do not add a flag in the class so I can mark it as time sensitive?

In this case if I have two (or more) active classes that are NOT time sensitive (like http and torrent) the congestion control can ignore latency.

Thanks again for help!

mgiammarco
Posts: 6
Joined: Sun Jan 24, 2010 3:40 pm

Re: How does active congestion control work?

Post by mgiammarco »

I add a thing: in the default configuration there is an interesting "tip": there are two rules for http connections. Short connections (with less than one mega) are faster than longer connections. It is a good thing because a long http usually is a file transfer and a short usually is a web page so it is a good thing that is faster.

Unfortunately in my case it seems it does not work.
With all idle I start an ubuntu download and I see that there is always traffic in "normal" class and in "fast" class. So congestion algorithm kicks in and... good bye full bandwidth.

What's happens?

thanks,
Mario

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

Re: How does active congestion control work?

Post by pbix »

You can examine the connections list to see the connections and decide what is going on. Sometime web applications open many small connections in which case you will always have some connections in the fast class.

Please answer my previous question about what your normal ping times are on an unload link. Also when you say that your bandwidth gets throttled please tell me what percentage is typical not just worst case. I think you stated that you saw 500bps on your 2Mbps link which is 25%.

I have never heard of a link being throttle down to 25% before which makes me think there is something wrong in your setup. Please turn off QoS (both upload and download) and run a speed test at http://www.speakeasy.net/speedtest/ and confirm your speeds on an unloaded LAN. If you incorrectly specify your upload speed then you will have the problems you indicate. Re-enable QoS and put in the measure download speed and only 75% of measure upload speed on the upload QoS page. Then lets see if the controller still throttles to the same bps under load. If that works the you can start to increase the upload speed but do not go beyond 95% of the measured upload speed. Report your results of the above testing.

I saw your suggestions about more configuration options for the controller. I agree that such a change would give finer control but I am concerned that many users are already confused enough with the options at hand plus it would be a lot of work to do and the pay sucks :-)
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

mgiammarco
Posts: 6
Joined: Sun Jan 24, 2010 3:40 pm

Re: How does active congestion control work?

Post by mgiammarco »

Ok I have read your post, I will do test you have said but now in 1.4.1 I have a problem, the button "save changes" in qos download page does nothing (in qos upload it works)

What I have done wrong?

Sorry and thanks again.

Mario

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

Re: How does active congestion control work?

Post by pbix »

You should go back to 1.4.0. The QoS save bug has been identified and the fixed in 1.4.2. There is nothing in 1.4.1 that you will miss.
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

mgiammarco
Posts: 6
Joined: Sun Jan 24, 2010 3:40 pm

Re: How does active congestion control work?

Post by mgiammarco »

My connection really stays at only 500kb (25%).

I have used www.speedtest.net that reported a lower upload speed than 384kbits (but 234KBytes download speed).

So I have put 150 kbits on upload qos page but without luck.

My ping is 85/90 secs already on idle link: at the first download becomes immediately higher.

Can I change your 85 msec ping limit?

Thanks,
Mario

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

Re: How does active congestion control work?

Post by pbix »

If your idle ping is already 90ms then the 85ms controller setup will not work for you. What kind of link is this? Sounds like a satellite link to have such high ping times.

The only way to change this ping is to edit the value in the /etc/init.d/qos_gargoyle script. Look for 'qosmon' in the file and change the '85' you see as a command line parameter to something higher and then save the file back to the router. I would think something between 150ms-250ms will be needed in your case.

You can also remove the '85' entirely in which case qosmon will automatically determine the a pinglimit for you. It does this by measuring the ping on the idle link and multiplying by 2.5. I would be curious how this works for you.

I have no experience with a link with such a long ping time. Please report your results for the benefit of others.
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

Post Reply