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

IMQ (Inbound QOS Limit) -- How to reconcile the figures?

Discussion in 'Tomato Firmware' started by Planiwa, Feb 18, 2012.

  1. Planiwa

    Planiwa LI Guru Member

    How can we tell how much of the incoming data was dropped?
    How do we interpret the imq0 view of bwm-24.asp ?

    What about?:
    Code:
    iptables -t mangle -L PREROUTING -v |grep IMQ
    
            102K   84M IMQ        tcp  --  ppp0   any     anywhere             anywhere            IMQ: todev 0
    
    ifconfig imq0 | bytes
    
            RX bytes:1960258990 (1.8 GiB)  TX bytes:1682370207 (1.5 GiB)
    
    0218imqa.png
     
  2. Porter

    Porter LI Guru Member

    I'm currently wondering how this is possible. I checked my traffic graphs and didn't find any such deviations.

    Do you have any idea which traffic was passing through your router when this happened?

    If you execute the qos-script under /etc/qos you get statistical output that will tell you how many drops occured for each class and each direction.
     
  3. Planiwa

    Planiwa LI Guru Member

    How can we find out how much data was dropped?

    Is it true that incoming traffic is routed from the WANIF through the IMQ, which drops some of the data, such that:

    WANIF.RX = IMQ.RX

    and

    WANIF.RX = IMQ.TX - IMQ.Drop

    because

    IMQ.RX - IMQ.Drop = IMQ.TX

    Is that how it is supposed to be?

    Here is some data from ifconfig:

    NB: ifconfig uses 32 bit integers -- the counters are modulo 2^32 == 4294967296.

    Sat Feb 18 23:53:33 EST 2012

    ppp0
    RX packets:75918485 errors:0 dropped:0 overruns:0 frame:0
    TX packets:47248212 errors:0 dropped:0 overruns:0 carrier:0
    RX bytes:2533029362 (2.3 GiB) TX bytes:634212376 (604.8 MiB)
    imq0
    RX packets:154360939 errors:0 dropped:0 overruns:0 frame:0
    TX packets:154129598 errors:0 dropped:0 overruns:0 carrier:0
    RX bytes:3423910111 (3.1 GiB) TX bytes:3145992980 (2.9 GiB)

    60 seconds . . .

    ppp0
    RX packets:75926176 errors:0 dropped:0 overruns:0 frame:0
    TX packets:47252957 errors:0 dropped:0 overruns:0 carrier:0
    RX bytes:2539791083 (2.3 GiB) TX bytes:634703875 (605.3 MiB)
    imq0
    RX packets:154365931 errors:0 dropped:0 overruns:0 frame:0
    TX packets:154134590 errors:0 dropped:0 overruns:0 carrier:0
    RX bytes:3428084360 (3.1 GiB) TX bytes:3150167229 (2.9 GiB)

    . . . Packets Bytes
    WAN in : 7691 6761721
    IMQ in : 4992 4174249
    IMQ out: 4992 4174249

    Sat Feb 18 23:54:33 EST 2012
     
  4. Porter

    Porter LI Guru Member

    I can see that it is interesting to know how much data was dropped for the purpose of optimzing your QoS-setup. But I think you are on the wrong path. The data you provided in your last post doesn't seem to explain a lot because there is always some traffic that is being dropped. Better use the statistics of /etc/qos for that.

    Looking at your fist screenshot I still have no explanation why wan0 and imq0 differ so much. The peak in wan0 looks like a TCP stream, because of the shape of the curve it looked like it had been accelerating and that is only happening, when there are ACK packets being sent and recieved correctly by the other side. But it might as well be speculation.

    On the other hand it might be more likely that it's UDP because it didn't react to being dropped by imq0.

    Then again if it is UDP it might not get shaped because of one option on QoS/Basic Settings which is called "No Ingress QOS for UDP". Untick the box and reload and everything should be fine.

    Just one question if this doesn't help:
    How much bandwidth does your default (Bulk) class get?
     

Share This Page