Rate Measurement!!

Eddie Kohler kohler at icir.org
Wed Feb 13 11:59:10 EST 2002


Hi Arvind,

> 1. RatedSource(1234,10000000,10000000) -> AverageCounter() -> Discard();
>
> 2. RatedSource(1234,10000000,10000000) -> AverageCounter() -> ToDevice(eth0);
> the read handler value for rate was 95264.
> 
> Since the 'rate' measures the arrival rate I expected both values to be
> the same.
> 
> Can anybody please explain the discrepancy???
> 
> Does ToDevice (by any chance) adjust the rate depending on how much can it 
> send out? 

The situations you have created are actually not comparable. In the first
configuration, all the ports have been assigned to push (all ports are
agnostic, and in the absence of any constraints, agnostic ports default to
push). So RatedSource is in charge of how many packets get sent, and it
sends as many as it can. In the second configuration, all the ports are
assigned to pull (because ToDevice's input must be pull, and the constraint
propagates back). Now ToDevice is in charge of how many packets get sent,
since it determines how many pull requests are made. Your assumption is
right: ToDevice, here, is adjusting the rate depending on how much it can
send out. For more on push and pull ports, see any of our general-purpose
papers. To see whether a port is push or pull, check the
/proc/click/NAME/ports handler.

> In the second experiment sometimes I occassionally saw
> this message : "ToDevice rejected a packet on eth0 !"

That sounds like the "busy reject" case you talked about in your previous
mail. It looks like you're triggering it. Was Linux sending any packets at
the time?

Eddie



More information about the click mailing list