[LARTC] Question on prio qdisc

Cheng Kwok Wing, William wing328@yahoo.com
Wed, 2 Jul 2003 09:28:01 -0700 (PDT)


--0-819289054-1057163281=:34807
Content-Type: text/plain; charset=us-ascii

Hi,
 
You can refer to http://lxr.linux.no/source/net/sched/sch_prio.c for the source code of prio qdisc.
 
If you look at the drop function of prio (prio_drop), it really drops packet with precedence of low to high priority. But when a incoming packet finds that there is no room in the queue, it's dropped without calling prio_drop function. The prio_drop will be called based on other condition that I can't remember.
 
If you want to achieve what you want, which is to drop packets with low priority first, I think you can attach a RED qdisc to low prioity queues and set the limit to drop packets before the queues are full.
 
I think my solution is worth trying.
 
Hope this helps,
Wing


"Cain, Joseph" <jcain01@harris.com> wrote:

I have been doing some experiments with the 
prio qdisc. I haven't tried to understand the
code, but the behavior I have observed in the
experiments leads me to believe that the prio
qdisc operates in the following manner when the
interface queue is full:
1) Suppose that we are operating with the default
3 priority bands and the interface queue is full
of packets of the lowest priority (indicated by the
TOS byte).
2) Then suppose a new packet of highest priority is to be 
sent to the interface for queuing.
3) It appears to me that the newly arriving packet of 
highest priority will be dropped because the queue is
full. Prio does not appear to drop one of the lower priority
packets waiting in the queue to make room for the 
higher priority packet.

The evidence for this conclusion is that I can set the
"txqueuelen" to a large value to make ample room for 
queuing high priority packets. Then if the interface 
is sent a mixture of an overload of low priority
packets and a small load of high priority packets, the
high priority packet suffer just as high a packet loss
percentage as the low priority packets. To me this indicates
that they are getting dropped at the interface because the
queue is full.

Can anyone with knowledge of the code or more knowledge
of the proper operation of the prio qdisc verify that this
is indeed what is happening?

Also, the way I would really like prio to operate is that when
the queue is full, I want it not to drop a newly arriving packet
unless there are no lower priority packets waiting in the queue.
If there is a lower priority packets waiting in the queue, I would
like this packet to be dropped to make room for the higher priority packet.
Does anyone know if there is a version of prio that operates this way, or
if there is another qdisc that provides this capability?

Thanks,
Bibb Cain
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
--0-819289054-1057163281=:34807
Content-Type: text/html; charset=us-ascii

<DIV>Hi,</DIV>
<DIV>&nbsp;</DIV>
<DIV>You can refer to <A href="http://lxr.linux.no/source/net/sched/sch_prio.c">http://lxr.linux.no/source/net/sched/sch_prio.c</A>&nbsp;for the source code of prio qdisc.</DIV>
<DIV>&nbsp;</DIV>
<DIV>If you look at the drop function of prio (prio_drop), it really drops packet with precedence of low to high priority. But when a incoming packet finds that there is no room in the queue, it's dropped without calling prio_drop function. The prio_drop will be called based on other condition that I can't remember.</DIV>
<DIV>&nbsp;</DIV>
<DIV>If you want to achieve what you want, which is to drop packets with low priority first, I think you can attach a RED qdisc to low prioity queues and set the limit to drop packets before the queues are full.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I think my solution is worth trying.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Hope this helps,</DIV>
<DIV>Wing</DIV>
<DIV><BR><BR><B><I>"Cain, Joseph" &lt;jcain01@harris.com&gt;</I></B> wrote:</DIV>
<DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid; WIDTH: 100%"><BR>I have been doing some experiments with the <BR>prio qdisc. I haven't tried to understand the<BR>code, but the behavior I have observed in the<BR>experiments leads me to believe that the prio<BR>qdisc operates in the following manner when the<BR>interface queue is full:<BR>1) Suppose that we are operating with the default<BR>3 priority bands and the interface queue is full<BR>of packets of the lowest priority (indicated by the<BR>TOS byte).<BR>2) Then suppose a new packet of highest priority is to be <BR>sent to the interface for queuing.<BR>3) It appears to me that the newly arriving packet of <BR>highest priority will be dropped because the queue is<BR>full. Prio does not appear to drop one of the lower priority<BR>packets waiting in the queue to make room for the <BR>higher priority packet.<BR><BR>The evidence for this conclusion is that I can set the<BR>"txqueuelen" to a large
 value to make ample room for <BR>queuing high priority packets. Then if the interface <BR>is sent a mixture of an overload of low priority<BR>packets and a small load of high priority packets, the<BR>high priority packet suffer just as high a packet loss<BR>percentage as the low priority packets. To me this indicates<BR>that they are getting dropped at the interface because the<BR>queue is full.<BR><BR>Can anyone with knowledge of the code or more knowledge<BR>of the proper operation of the prio qdisc verify that this<BR>is indeed what is happening?<BR><BR>Also, the way I would really like prio to operate is that when<BR>the queue is full, I want it not to drop a newly arriving packet<BR>unless there are no lower priority packets waiting in the queue.<BR>If there is a lower priority packets waiting in the queue, I would<BR>like this packet to be dropped to make room for the higher priority packet.<BR>Does anyone know if there is a version of prio that operates this way, or<BR>if
 there is another qdisc that provides this capability?<BR><BR>Thanks,<BR>Bibb Cain<BR>_______________________________________________<BR>LARTC mailing list / LARTC@mailman.ds9a.nl<BR>http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/</BLOCKQUOTE></DIV><p><hr SIZE=1>
Do you Yahoo!?<br>
<a href="http://pa.yahoo.com/*http://rd.yahoo.com/evt=1207/*http://promo.yahoo.com/sbc/">SBC Yahoo! DSL</a> - Now only $29.95 per month!
--0-819289054-1057163281=:34807--