[Click] queue element taking high number of cpy cycles

Eddie Kohler kohler at icir.org
Thu Aug 7 18:39:35 EDT 2003


Shilpi

> Now the cpucycles spent in queue are very large..and it increases with number of
> packets ..here is some statistics ..
> 
> packet   packet  queue   cycles       cycles
> rate     size    size    in queue     in whole forwarding patch
> 
> 300k     68       100    4100.8       4836.83
> 300k     66       100    4287.86      5032.55
> 200k     66       100    2681.68      3366.0
> 200k     66        50    2525.57      3200
> 
> Its irrespective of queue size. Even if i increase the queue size to be 5000 or
> 1000 ..i get the same statistics... I am running Pentium 4 ,2 ghz machine. So
> time spent in ns is half of cpu cycles .


The CycleCountAccum is counting the time packets spend in the queue waiting
to be output.  PollDevice and ToDevice batch requests (PollDevice's BURST
parameter defaults to 8 for example).  So they do not alternate: it goes
PollDevice, PollDevice, PollDevice, ToDevice, TODevice, ToDevice, not
PollDevice, TODEvice, PollDevice, ToDevice.  So the first packet in any
PollDevice burst will wait in the queue until the whole burst is done.
Obviously as the input rate increases, the average burst length will grow
longer, so average queue-wait latency will increase too.  This is just not
a problem.


> Does anyone have any idea ..why is it so ?? I guess..since i have a queue some
> of the cpu cycles are common for a fraction of packets. So it gets accumulated
> more than once. Thats why if i increase packet rate i see more cpu cycles..if
> thats the case..how can i measure the exact number of cpu cycles ?

We measure packets spent in the push and pull paths separately, using
CLICK_DEVICE_STATS and/or RoundTripCycleCount.

Eddie


More information about the click mailing list