sfq depth

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

Moderator: Moderators

dumas777
Posts: 14
Joined: Wed Oct 31, 2012 4:41 pm

sfq depth

Post by dumas777 »

Isn't the way that the gargoyle qos system is setup with sfq, one of the big goals is fairness in sharing of bandwidth between different ips in the same class? Also isn't the only way to truly achieve this is to have the sfq depth smaller than the sfq limit? The way I understand sfq is once a hash bucket (ie single ip address) has more than the depth number of queued packets it starts auto dropping any more packets for that bucket. If the limit of the whole queue (of all buckets) is always reached first doesn't that mean a single ip address can basically DDOS the others (because once the the limit is reached packets to all hash buckets are also auto dropped) and hog all the bandwidth by constantly queuing packets ala bittorrent? For most people this won't apply to the download at all as 127 is the upper limit of depth and so the limit will be significantly bigger than this. Where I really noticed this is on my adsl where the upload is actually less than a meg and my sfq limit is as low as 30. I am currently trying out setting the depth to half the limit and haven't had time to put it fully through its paces but it seems to be working well. Yes technically two ips could still do the same but at least for home usage stopping one giant hog is usually sufficient. Thank you.

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

Re: sfq depth

Post by Lantis »

Please let us know your findings. I have experience a torrent dragging my network to a complete standstill before despite my QOS rules trying to stop it. But ive only seen it once so I ignored it.
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.

dumas777
Posts: 14
Joined: Wed Oct 31, 2012 4:41 pm

Re: sfq depth

Post by dumas777 »

Could have been the one time was due to you seeding to multiple people heavily which is often harder to replicate. A lot of home users have less upload bandwidth and upload is where most latency comes from in my experience (at least in the consumer router space). That could have been a case where even though the sfq would divide the bandwidth fairly if it could, it never gets a chance if torrents are spamming the upload with packets on one ip address.

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

Re: sfq depth

Post by Lantis »

i came to the same conclusion.
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.

dumas777
Posts: 14
Joined: Wed Oct 31, 2012 4:41 pm

Re: sfq depth

Post by dumas777 »

I ended up backing out the change. I was still able to fubar Netflix with several Steam game downloads on another computer (great test btw) using a single upload and download class for all connections (which works remarkably well %99 of the time). Also the qos script had set the download speed to like %40 of my maximum over time. Based on the behaviour I have a suspicion depth doesn't mean what I thought or there is some type of bug. Regardless back to stock qos for me which is great out of the box. The only problems I have seen is sometimes with torrents and often with steam downloads and I have can throttle both to workaround that.

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

Re: sfq depth

Post by Lantis »

interesting.

if you're feeling adventurous, Chaos Calmer Openwrt was just released and it includes SQM (smart queue management) out of the box. I wonder if you would have better or same results with that.

Of course you'd have to give up this lovely Gargoyle ;) haha.
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.

dumas777
Posts: 14
Joined: Wed Oct 31, 2012 4:41 pm

Re: sfq depth

Post by dumas777 »

Yeah I have played around quite a bit with openwrt including cc but fq_codel doesn't handle torrents any better and then I lose both in class equal bandwidth sharing (changing hashing key on fq_codel doesn't return near as consistent results as sfq) and the really killer gargoyle feature on the fly download adjustment (acc). I have played around trying to adjust the gargoyle acc to work with fq_codel but also got strange results including internet connectivity loss until a reboot. fq_codel doesn't seem to play well with either hfsc or imq. Still fq_codel is real nice especially on the upload keeping latency extraordinary low but it not auto throttling on the download based on conditions (have to use set bandwidth values for htb as straight fq_codel at line speed with pppoe on download doesn't handle latency near as well with heavy download activity) doesn't make it worth it for me. Thanks again.

dumas777
Posts: 14
Joined: Wed Oct 31, 2012 4:41 pm

Re: sfq depth

Post by dumas777 »

Just as an aside I did find an elegant solution (without even having to jack with the stock scripts) that basically allows sfq in many ways to emulate fq_codel without losing any of the gargoyle advantages. What I did was simply make two classes for both upload and download. For both I assigned %75 of the bandwidth to a class that has one rule, a maximum packet size of 400. I then defaulted to the other class (for everything else) with a bandwidth of %25. I set no maximum for either. I am happy to say with this simple setup I have been unable to fubar netflix with steam or anything else. Yes I should use netperf and test all official but it works well for me so far so thought I would share it. As always YMMV.

nworbnhoj
Posts: 916
Joined: Mon Jul 21, 2014 10:08 am
Location: Australia
Contact:

Re: sfq depth

Post by nworbnhoj »

dumas777 wrote:Just as an aside I did find an elegant solution (without even having to jack with the stock scripts) that basically allows sfq in many ways to emulate fq_codel without losing any of the gargoyle advantages. What I did was simply make two classes for both upload and download. For both I assigned %75 of the bandwidth to a class that has one rule, a maximum packet size of 400. I then defaulted to the other class (for everything else) with a bandwidth of %25. I set no maximum for either. I am happy to say with this simple setup I have been unable to fubar netflix with steam or anything else. Yes I should use netperf and test all official but it works well for me so far so thought I would share it. As always YMMV.
That would be a great trick to publish as a wiki gargoyle_tip (nudge nudge) http://www.gargoyle-router.com/wiki/dok ... goyle_tips
Can you help someone else get Gargoyle up and running?
TL-WDR3600 : Gargoyle 1.9.0 : NBN FixedWireless
TL-WR1043ND-V2 : Gargoyle 1.8.0 : 3G Huawei E160E

shm0
Posts: 67
Joined: Sat Sep 19, 2015 10:06 am

Re: sfq depth

Post by shm0 »

dumas777 wrote:Just as an aside I did find an elegant solution (without even having to jack with the stock scripts) that basically allows sfq in many ways to emulate fq_codel without losing any of the gargoyle advantages. What I did was simply make two classes for both upload and download. For both I assigned %75 of the bandwidth to a class that has one rule, a maximum packet size of 400. I then defaulted to the other class (for everything else) with a bandwidth of %25. I set no maximum for either. I am happy to say with this simple setup I have been unable to fubar netflix with steam or anything else. Yes I should use netperf and test all official but it works well for me so far so thought I would share it. As always YMMV.
Thanks for sharing this! Im currently running this setup and it works quite good.
I also come from openwrt and i used the sqm scripts.
Best thing about sqm is you dont have to setup bunch of qos rules to fit your needs. it works actually quite well out of the box.
But one major problem is as you also mentioned that it doesn't work quite well with fluctuating internet speeds. And here is where gargoyle is shining. I think best would be acc + sqm somehow.
I have one question. Where did you get the number for the packet size (400) from?

Thanks.

Post Reply