Rate Measurement!! Contd...

Eddie Kohler kohler at icir.org
Sun Feb 24 19:40:55 EST 2002


> 1. Does the ToDevice element send packets based on the line speed?
> 2. By any chance is the rate of sending packets out of ToDevice bounded by
> the number of "packets" irrespective of line speed?

The ToDevice element sends packets "as fast as it can". The limiting factor
may change based on CPU speed, size of packet, whether or not you are doing
polling, etc.

> 1. RatedSource(RATE 10000000, LIMIT 10000000) -> AverageCounter() ->
> ToDevice(eth0);
> 
> Result: The rated source supposedly makes a default packet size of 64
> bytes.(for some reason when I do a Print()
> the packet size comes out to be 69,..anyway..).
> the rate measured by AverageCounter is 99149 pkts/sec.
> (which is approx 45Mbps)

FYI, RatedSource makes a default packet size of _at least_ 64 bytes.

> I guess this time the experiments are comparable.
> Could you please tell me whats happening?

Each packet incurs two kinds of cost. The first kind is proportional to
packet size, the second kind is not. CPU time, for example, is mostly *not*
proportional to packet size, since every packet goes thru the same
elements. However, the line rate is *all* proportional to packet size -- an
Ethernet cable is all about size of data.

This means that:

 - For small packets, the router's CPU may become saturated before the
   Ethernet. (Packet-size cost low, packet-count cost high.)
 - For large packets, the reverse may be true. (Packet-size cost high,
   packet-count cost low.)

There might also be other factors in play -- a broken RatedSource or
whatever. And are you forcing polling? (PollDevice(eth0) -> Discard)

Eddie



More information about the click mailing list