1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

QOS not working?

Discussion in 'Tomato Firmware' started by dolly_oops, Jan 16, 2007.

  1. dolly_oops

    dolly_oops Network Guru Member


    I've got some problems getting QOS working on my Tomato installation...

    I'm trying to test it whether QOS is working correctly. I stopped all traffic, and set up a test case. I want web traffic to be fast and interactive, and BitTorrent traffic to be slowed down.

    Because I'm having to use packet encryption, I configure my BT client to bind itself to a particular source port (I usually use Azureus, but I used uTorrent for this test). I start downloading a particularly fast download, and then try to browse the web - I also try viewing a video from a YouTube-style site.

    And it's slow. Really slow. :(

    I've tried a few things to see if they have any effect - I've tried moving web traffic to the highest priority setting (previously was set to "high"), I've configured Tomato to use an upload speed to a much lower value than my actual speed, and I've tried disabling prioritising ACK packets. None of these seemed to make a difference.

    I've attached a couple of screenshots of my settings. I can't really figure out what's wrong with it. Any ideas?

    Attached Files:

  2. dolly_oops

    dolly_oops Network Guru Member

    I didn't realise the screenshots would be scaled down - here they are in a ZIP file for those who want to see them.

    Another thing I forgot to mention - looking at the details of the QOS settings, it seems that the connections are being correctly classified (port 80 connections are rated Highest, other connections are Lowest), but I still have problems...

    Attached Files:

  3. dolly_oops

    dolly_oops Network Guru Member

    I do realise that I seem to be having a conversation with just myself, but never mind. :)

    Looking at the graphs indicating how much outgoing traffic there is, it seems that the majority of outgoing traffic is the traffic marked as "highest" - so presumably the QoS is working (or is the graph misleading)?
  4. GeeTek

    GeeTek Guest

    On the Azureus rules, change the ports from "Src Port" to "SRC or DST". Also customize one category for the P2P traffic. Limit the uplink to about 25 Kb and and download at about 800K and your browser problem should clear up. I usually use one of the lettered ports so I can see the results better. How many ports does it open ?

    Edit - On your global bandwidth limits be sure to use values that are about 15% below what you actually measure.
  5. digitalgeek

    digitalgeek Network Guru Member

    You may want to limit your bt client to a max upload (I usuassly set mine to about 50-60K) You'll keep your bt under control and prevent it from taking over.
  6. der_Kief

    der_Kief Super Moderator Staff Member Member

    Maybe you should upgrade to 1.02 ! you'll never know :)

  7. bogderpirat

    bogderpirat Network Guru Member

    what's your actual line speed?
  8. tievolu

    tievolu Network Guru Member

    This is very important - the upload speed needs to be set to about 80-90% of your real upload speed, or QOS simply won't work.
  9. GhaladReam

    GhaladReam Network Guru Member

    So what would one set it to if one has 10 mbit down/1 mbit up?
  10. der_Kief

    der_Kief Super Moderator Staff Member Member

    Measure your 'real' speed (without QoS) and use about 90% of that ! Than QoS works like charm :biggrin:

  11. GhaladReam

    GhaladReam Network Guru Member

    Ok, I've set it to 850k up and 8500k down, we'll have to see what happens.

    I'm not terribly familiar with QoS, but from what I understand, it allocates unused bandwidth. I have a secondary box in my house that I use solely as a server and downloading station. I have it running 24/7 hosting a small FTP server, downloading torrents, and a couple of other minor tasks. Is it reasonable to assume that if I set my server to lowest priority in QoS that it will use all available bandwidth from my ISP UNLESS something else with higher priority on my network or no rule whatsoever set up in QoS needs the bandwidth first?
  12. dolly_oops

    dolly_oops Network Guru Member

    Thanks for all of your input. I've spent a lot of today just trying to configure the QoS to work well.

    I've been doing some basic tests by downloading a fast speed torrent, and then trying to do a couple of basic things - browsing the web, and trying to watch a video from www.dailymotion.com.

    Basically, I've managed to get three types of behaviour at one time or another:

    1) Can't really watch the video (it's too slow), and browsing the web is really slow too.
    2) Browsing the web is OK, but watching the video is still slow.
    3) Started watching the video, which streams relatively well (still pauses now and then), and actually saw the BT download speed drop by at least 20K to 30K.

    When I first started posting, I was stuck with situation #1. I decided to upgrade the firmware to 1.02, and re-enter all my settings. I enabled basic QOS settings, and managed to get situation #3 (visible drop in BT traffic). I then started slowly to alter the QOS settings to try and have things as I wanted. At some point, I got into situation #2 (no BT drop when watching the video). I then attempted to go back to the settings that had previously worked, except that it wouldn't.

    I tried resetting the router again, but I couldn't recreate the situation where there was a drop in traffic.

    It's really frustrating, since I can't see what I'm doing differently, or even why it fails.... So at least I've got decent browsing, but I can't recreate the video download gain that I had before.


    geetek: Why would I want to change the port to be SRC or DST? As far as I could tell, the source is always my machine, and I want to get all traffic which originates from a particular port - I've got Azureus set up to bind all outgoing connections to a particular port...

    What do you mean when you say "how many ports does it open"? Given that I've got multiple connections originating from one port, do you mean how many connections are established by BT?

    Is there any point in setting a incoming limit for downloads if I'm not capping the download speed for any of the traffic categories?

    I'm trying to see whether I can actually avoid setting a static download cap for my BT traffic if I can get QOS setup correctly to alter the traffic behaviour (like I've seen before).

    der_Kief: I was actually holding back on upgrading, because I couldn't see anything in particular which might remedy my problem in the changes mentioned. But it's on the router now. :)

    bodgerpirat: My line speed? Depends who you ask. Officially, it's meant to be 1024/256. My ADSL modem reports 2272/288, as the data rate (strangely enough). On tests I've done in the past, it's usually fallen lower than the offical rate (around 900/230 if I remember correctly).
  13. digitalgeek

    digitalgeek Network Guru Member

    Here is my settings... have a look and see if it helps you...


  14. tievolu

    tievolu Network Guru Member

    This is why it's important to measure it yourself. If you set the upload bandwidth higher than your real bandwidth, QOS will think you've got more upload bandwidth than you actually have => it will allocate traffic to bandwidth that doesn't exist, and hence it won't work properly!

    Also, remember that QOS only regulates your upload badwidth. It can do nothing about your downstream, because it cannot control what arrives at your router from the internet. The only way to exert any control with your QOS rules is to disable the prioritise ACK option - this will result in some throttling of low priority TCP downstream traffic in favour of higher priority traffic, because the upstream ACK packets are prioritised according to your QOS rules. This can help you out with bandwidth-swamping torrents, but it will not help at all with UDP traffic (such as VOIP).
  15. pharma

    pharma Network Guru Member


    The link below might help -- especially where the author starts talking about Idea of bandwidth management:


  16. dolly_oops

    dolly_oops Network Guru Member

    Well, I did say in one of my posts, I had set the upload bandwidth limit to be much much lower than what it should be, but I still had problems.

    I did do some tests with the ACK option on and off. I started uploading a file to my VPN (which I believe all the traffic is done over UDP), with the VPN set to being the highest priority. With prioritise ACK on, both the download and the upload did quite well speed wise. With prioritise ACK off, the download virtually just stopped.

    Tried doing some tests with downloading from my VPN, and playing with the prioritise ACK options, as well as seeing what happens when I changed the VPN category from highest to high, and tried changing the guaranteed upload rates as well for both the High and Highest categories.

    In the end? There was very little difference. Thinking about it now, I probably should have chosen a more standard example of transferring high priority data (downloading from a web site) than using SCP over the VPN connection.

    I think maybe I'll just go down the route of strangling the download bandwidth used by my BT client - probably by restricting the speed in the client itself, rather than using the inbound QoS.

    The annoying thing is that I have seen QoS work very well in some circumstances on my setup, but I'm not always able to recreate it consistently, so it's quite frustrating... :(
  17. dolly_oops

    dolly_oops Network Guru Member

    Thanks for the info pharma... I did a lot of reading about QoS when I looked into it in the past (though I hadn't come across that article, so thanks for that one).

    I think I'll go for a QoS setup similar to the standard setup that Tomato provides (but fine tuning it where I feel comfortable doing it). My ideal situation is to be able to set up something which means that my BT traffic is strangled enough so that people using the web on other machines won't experience any slowness - but I'm not sure there's any way to do that without some form of manual intervention...
  18. GeeTek

    GeeTek Guest

    Yes, the BT connection count is what I referred to. I've noticed that it is easier for the torrent to swamp and otherwise disrupt other traffic when it has 5 or 6 hundred connections open as opposed to when you limit it to 90 or so. Your setup of forcing all BT traffic to a single port number should simplify the QOS rules and control. My torrent traffic is set for 6% upload and 35% download as hard bandwidth caps. With a 3*1.5 cable connection and 7 or 8 BT clients running full bore with a limit of 125 connections each, you cannot even tell BT is running.
  19. dolly_oops

    dolly_oops Network Guru Member

    Hmm, I've got the maximum BT connections set to 200 or so. Maybe I might lower it - though I have to say that when I was doing my tests, it only had about 50 active connections or so (I was only trying with one download).

Share This Page