RE: [LARTC] Question on prio qdisc

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Leonardo:

Thank you for the reply to my question>
See comments below.

Bibb Cain


-----Original Message-----
From: Leonardo Balliache [mailto:leoball@xxxxxxxxxxxx]
Sent: Monday, July 07, 2003 2:08 PM
To: Cain Joseph
Cc: lartc@xxxxxxxxxxxxxxx
Subject: RE: [LARTC] Question on prio qdisc


Hi, Joseph:

At 06:45 a.m. 03/07/03 +0200, you wrote:

>Thank you Lars and Wing for your responses.
>
>I just ran another experiment using RED on the
>lowest priority flow as suggested by Wing. I had
>used RED before (on all flows) without success.
>In this experiment, specified a large queue size for the interface.
>In this case the result was roughly the same.
>I overloaded the interface with 9.5 Mb/s of
>flow with 8 Mb/s at the lowest priority, 1 Mb/s
>at the medium priority, and 0.5 Mb/s at the highest
>priority hoping that RED would discard lowest
>priority packets to make room for the higher priority
>packets. The result was that all flows suffered
>approximately the same packet loss rate (about 45%).
>The interface was an 802.11b interface at 11 Mb/s
>with the two nodes very close to each other so that
>link quality was very high. Apparently RED does not
>discard the lowest priority packets that are overloading
>the interface. The following script was
>used:

RED doesn´t have any way to know which are lower, medium or higher priority 
packets. To do what you want you need to use GRED.


*******************************************************
Thanks. I will take a look at GRED.
*****************************************************


>My next step will be to modify the enqueue function to call
>prio_drop() if there is not enough room to enqueue a new
>packet as you have both suggested. I will have to get some help
>for this from some of our engineers that can understand the code
>better than I could.

The enqueue code is here:

static int
prio_enqueue(struct sk_buff *skb, struct Qdisc* sch)
{
    struct prio_sched_data *q = (struct prio_sched_data *)sch->data;
    struct Qdisc *qdisc;
    int ret;

    qdisc = q->queues[prio_classify(skb, sch)];

    if ((ret = qdisc->enqueue(skb, qdisc)) == 0) {
        sch->stats.bytes += skb->len;
        sch->stats.packets++;
        sch->q.qlen++;
        return 0;
     }
     sch->stats.drops++;
     return ret;
}

As you see in:

         qdisc = q->queues[prio_classify(skb, sch)];

each queue is an independent queue. Then if high priority packets are 
dropped is because the high priority queue has overflow, not because some 
(unique?) queue is full from low priority packets.

*****************************************
I understand your point, but I have tried to determine
the answers to a couple of questions from the code
without success (I don't understand the source code
well enough). Maybe you could answer these:
1) If I specify a queue length for the interface
by configuring "txqueuelen" to some number (say 1000), then
does that mean that the 3 FIFO queues for the 3 bands
in either "prio" scheduler or the default "pfifo_fast" scheduler are set each
to a size of 1000 packets? If this is the case, then I don't
see how my high priority queue can drop packets when the high
priority flow rate is well below what the link can support.
Can you think of any reason this should happen?
2) My testing leads me to believe that there are 3 queues,
but the buffer allocated for a new packet enqueued to
any of the queues is allocated from a common pool of buffers
that might be of size equal to "txqueuelen" = 1000. Is it
possible that it is implemented this way? I could see
high priority packets being dropped if this was the
implementation?
******************************************


Also, in drop-tail queues, as its name imply and prio is, never a already 
enqueue packet is dropped to make room for a new one. Packets are dropped 
from the tail.

Best regards,

Leonardo Balliache





[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux