All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Token Bucket Filter and Dropping
@ 2007-05-08 11:44 Piotr Wójcicki
  2007-05-08 14:03 ` Marco Aurelio
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Piotr Wójcicki @ 2007-05-08 11:44 UTC (permalink / raw)
  To: lartc

I am trying to create my own Token Bucket Filter. However, I have a problem
with packet dropping.

Scenario :
I got two streams 20KB/s each.
I got one bucket with rate 20KB/s

I put both streams into this bucket.

When buffer is full packets need to be dropped. The problem is that only
every other packet needs to be dropped in this scenario.
Streams are the same so queue looks like that :

S1  | S2 | S1 | S2

Packets form both streams are one by one. 
The result is that all packets from stream S1 are being dropped and all
packets from Stream S2 are being sent. 
Ideally half of dropped packets would be from S1 and half from S1.

What are possible solutions to this problem ?


Piotr Wojcicki

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LARTC] Token Bucket Filter and Dropping
  2007-05-08 11:44 [LARTC] Token Bucket Filter and Dropping Piotr Wójcicki
@ 2007-05-08 14:03 ` Marco Aurelio
  2007-05-08 15:08 ` Piotr Wójcicki
  2007-05-09 20:24 ` John Default
  2 siblings, 0 replies; 4+ messages in thread
From: Marco Aurelio @ 2007-05-08 14:03 UTC (permalink / raw)
  To: lartc

you need hierarchical token bucket for that
have you tried HTB?

On 5/8/07, Piotr Wójcicki <pwl@4me.pl> wrote:
> I am trying to create my own Token Bucket Filter. However, I have a problem
> with packet dropping.
>
> Scenario :
> I got two streams 20KB/s each.
> I got one bucket with rate 20KB/s
>
> I put both streams into this bucket.
>
> When buffer is full packets need to be dropped. The problem is that only
> every other packet needs to be dropped in this scenario.
> Streams are the same so queue looks like that :
>
> S1  | S2 | S1 | S2
>
> Packets form both streams are one by one.
> The result is that all packets from stream S1 are being dropped and all
> packets from Stream S2 are being sent.
> Ideally half of dropped packets would be from S1 and half from S1.
>
> What are possible solutions to this problem ?
>
>
> Piotr Wojcicki
>
> _______________________________________________
> LARTC mailing list
> LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
>


-- 
Marco
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [LARTC] Token Bucket Filter and Dropping
  2007-05-08 11:44 [LARTC] Token Bucket Filter and Dropping Piotr Wójcicki
  2007-05-08 14:03 ` Marco Aurelio
@ 2007-05-08 15:08 ` Piotr Wójcicki
  2007-05-09 20:24 ` John Default
  2 siblings, 0 replies; 4+ messages in thread
From: Piotr Wójcicki @ 2007-05-08 15:08 UTC (permalink / raw)
  To: lartc

I am more like creating my own filter. So separate streams shouldn't be put
in one bucket ? But I believe it is possible in htb...

-----Original Message-----
From: Marco Aurelio [mailto:marco.casaroli@gmail.com] 
Sent: Tuesday, May 08, 2007 4:04 PM
To: Piotr Wójcicki; lartc@mailman.ds9a.nl
Subject: Re: [LARTC] Token Bucket Filter and Dropping

you need hierarchical token bucket for that
have you tried HTB?

On 5/8/07, Piotr Wójcicki <pwl@4me.pl> wrote:
> I am trying to create my own Token Bucket Filter. However, I have a
problem
> with packet dropping.


_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LARTC] Token Bucket Filter and Dropping
  2007-05-08 11:44 [LARTC] Token Bucket Filter and Dropping Piotr Wójcicki
  2007-05-08 14:03 ` Marco Aurelio
  2007-05-08 15:08 ` Piotr Wójcicki
@ 2007-05-09 20:24 ` John Default
  2 siblings, 0 replies; 4+ messages in thread
From: John Default @ 2007-05-09 20:24 UTC (permalink / raw)
  To: lartc

Hi
No need for htb, simple tbf will do.

But if you are creating your own:
As i understand token bucket, you should take each packet from the end 
of queue in order they are there, i.e S1, S2, S1, S2, not just each 
other. When the bucket is full, you will drop every packet on input. It 
is unlikely that you will free space in buffer everytime right when S2 
packet comes... You would have buffer full of s2 then, not s1|s2|s1... 
as you say. Are you sure you are dequeuing from front and doing tail-drop ?

As i understand:
dequeue at constant 
rate<--que_front_s1,s2,s1,s2,s1,s2_que_tail<--enqueue input or drop

Maybe change in size of token could help mix this... How big is one 
token now? (i do not know how your tbf is implemented...)Can you give 
more details ?
By the way: how are you creating those streams, i think it is unusual to 
see such properly ordered packets of streams in real life ...

If i am completely out, sorry then, just beginner.
Best regards (default)

Piotr Wójcicki wrote:
> I am trying to create my own Token Bucket Filter. However, I have a problem
> with packet dropping.
>
> Scenario :
> I got two streams 20KB/s each.
> I got one bucket with rate 20KB/s
>
> I put both streams into this bucket.
>
> When buffer is full packets need to be dropped. The problem is that only
> every other packet needs to be dropped in this scenario.
> Streams are the same so queue looks like that :
>
> S1  | S2 | S1 | S2
>
> Packets form both streams are one by one. 
> The result is that all packets from stream S1 are being dropped and all
> packets from Stream S2 are being sent. 
> Ideally half of dropped packets would be from S1 and half from S1.
>
> What are possible solutions to this problem ?
>
>
> Piotr Wojcicki
>
> _______________________________________________
> LARTC mailing list
> LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
>   
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-05-09 20:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-08 11:44 [LARTC] Token Bucket Filter and Dropping Piotr Wójcicki
2007-05-08 14:03 ` Marco Aurelio
2007-05-08 15:08 ` Piotr Wójcicki
2007-05-09 20:24 ` John Default

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.