[Click] LinkUnqueue multiple flows shaping issues

Eddie Kohler kohler at cs.ucla.edu
Thu Jun 23 14:02:43 EDT 2011


Milos,

Are you sure this is a bug?

Remember that LinkUnqueue enforces a BANDWIDTH limit.  That means that you 
SHOULD see more smaller packets per second than larger ones.

I wrote the following Click script to test the enforced bandwidth of 
LinkUnqueue at three packet sizes, first 64, then 1000, then 32.  The observed 
bandwidths for these three packet sizes is:

10039296
10000000
10000080

all of which are pretty close to 10000000 bps!!

If you really think this is a bug please provide the simplest test case 
possible -- preferably involving only one LinkUnqueue.

Eddie


s :: InfiniteSource(LENGTH 64)
	-> q :: Queue
	-> l :: LinkUnqueue(LATENCY 0, BANDWIDTH 10000000 bps)
	-> c :: Counter
	-> Discard;

DriverManager(
	wait 5s,
	write s.active false,
	print $(mul $(c.count) $(s.length) 1.6), // 1.6 == 8 bits / 5 sec

	write c.reset,
	write q.reset,
	write l.reset,
	write s.length 1000,
	write s.active true,
	wait 5s,
	write s.active false,
	print $(mul $(c.count) $(s.length) 1.6),

	write c.reset,
	write q.reset,
	write l.reset,
	write s.length 30,
	write s.active true,
	wait 5s,
	write s.active false,
	print $(mul $(c.count) $(s.length) 1.6),
);


On 06/23/2011 07:00 AM, milos rovcanin wrote:
> Greetings to all,
>
> I have noticed an awkward behaviour of the LinkUnqueue() element when trying
> to send two flows at the same time (UDP/UDP, TCP/TCP, UDP/UDP). This is,
> pretty much, what my configuration looks like:
>
>   ...
>    ->Qtag0::Queue(20)
>    ->  LinkUnqueue(LATENCY 0,BANDWIDTH 13000000 bps)
>    ->  Queue()
>    ->  [0]output;
>
>   ...
>    ->  Qtag1::Queue(20)
>    ->  LinkUnqueue(LATENCY 0,BANDWIDTH 9000000 bps)
>    ->  Queue()
>    ->  [1]output;
>
> and while I am sending at rates lower than the ones defined in the
> LinkUnqueue() element, everything seems to be working fine. Problems start
> to occur when one or both of the flows exceed the threshold. In other words,
> when LinkUnque() starts to shape. Both flow rates drop significantly, but
> only if the packet size is over 850 bytes! For example, if I use MSS of 1000
> bytes, everything work fine even with higher rates.
>
> I used Clicky to check the status of the LinkUnqueue() element and I noticed
> this:
> - Qtag0/Qtag1 lenghts are 1 all the time and LinkEnqueue's handler
> "scheduled" is true - when I send smaller packets (the ones that cause
> problems)
> - Qtag0/Qtag1 gets immediately full all the time and LinkEnqueue's handler
> "scheduled" is false - when I send larger packets (~850B and larger)
>
> Does anyone have any idea what could be the problem and how to solve it?
>
> Thank you in advance!
>


More information about the click mailing list