Trying to schedule QoS upload rate/limit changes.

Discussion in 'Tomato Firmware' started by blackjackel, Dec 27, 2008.

  1. blackjackel

    blackjackel LI Guru Member

    Hi folks, I've been using Tomato for about a year now and consider myself a tomato newbie even though I altered so many settings in tomato that I can't bear to switch over to any other firmware.

    I moved from DD-WRT to tomato because the QoS on DD-WRT wasn't working

    Anywhoo, I was wondering what the command was to alter the QoS upload rate/limit (the max bandwidth), because apparently i have more upload leeway at night than I do during the day. I notice tomato allows you to enter custom scheduler commands and was wondering what I can stick in there to change my QoS.

    Also, my MAX upload rate at night is 525 kbits/sec, this is where the connection is saturated and the download drops to the upload speed... obviously I need to set QoS lower. BUT... I'm running bittorent downloads and trying to host a warcraft 3 game at the same time. I find that if I set the QoS upload limit to anything above 375 kbits/sec the game (wc3) will lag horribly. Does this sound right to you guys or is there some other QoS setting I'm missing? If 525 is my max then 375 is 71% of that.... (or a decrease of 29%) doesn't seem right to me.

    Feel free to point me to a readme about QoS commands and such as I am willing to learn.
  2. rhester72

    rhester72 Network Guru Member

    As for what to schedule:

    nvram set qos_obw=XXX;service qos restart

    where XXX is your desired outbound bandwidth in kilobits/second should do the trick.

    QOS is an art, not a science. ;) The need to set your outbound bandwidth so low may be legitimate (if you are sending a tremendous number of ACK packets in response, the bandwidth for them has to come from somewhere!), but it does seem rather high. It also makes a difference if you are prioritizing small ACKs.

    What is more likely is that it is your downlink that is actually being saturated and thus affecting the gaming packets coming into you (because they are lost in the flood of torrent packets which probably outnumber them by at least 100:1). There's not a great deal you can do about this, because it's the ISP that is handing you the packets in the order received. You can partially mitigate this by intentionally lowering your download bandwidth ceiling in the torrent client itself, though it's rather robbing Peter to pay Paul.

    I know it sounds counterintuitive (since you are capping your uplink and seeing improved performance, so what could it possibly have to do with the downlink being saturated?), but when you reduce the speed of your uplink, the natural process of ACKs and your torrent client attempting to maintain some sort of ratio fairness will invariably result in your downlink slowing as your uplink slows, which gives some of the headroom back. I've been able to reproduce this quite reliably on my 5000/768 ADSL connection.

    A last possible culprit is the sheer number of connections established - beyond a certain threshhold, the router spends so much time just juggling all the open connections that it actually starts to affect its performance (and thus your latency). Artificially constraining your maximum number of connections, either through your torrent client or through the router (there's been some recent posts on this forum on how to achieve that through iptables) may help.

  3. Toastman

    Toastman Super Moderator Staff Member Member

    Try setting the outbound rate and limit for your QOS class to 1% and 10%. That should limit your P2P enough to prevent saturating your router with incoming P2P.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice