[Click] Traffic Shaping in Click

Roman Chertov rchertov at cs.ucsb.edu
Tue Feb 10 12:53:09 EST 2009


>> 2) Where are packets being dropped -  at the rx/tx NIC level, Queue or
>> ToDevice levels?
>>
> During long periods of bursts, I saw some packet drops at the tx level
> of the NIC? Is this an artifact of polling? I also saw some ToDevice
> drops with the single threaded version (might be due to scheduling
> delay).. But in most cases the majority of the drops were due to queue
> overflow.. Now, if I throw in say X GB RAM, shouldn't click allocate
> memory via kmalloc() instead of vmalloc if #memory required <
> (available phy memory - some constant)? The reason I am asking is that
> I may add memory as a function of queue size to absorb longer periods
> of bursts..

ToDevice drops occur as ToDevice can sometimes insert packets faster 
than the device can process them.  If you want, I can email you a patch 
that prevents that from happening.  (all the drops would occur in the 
queue then)

> 
> 
>> 3) I recommend using the IGNORE argument of AverageCounter or reset handler
>> to ensure accurate measurements on AverageCounter. What is the byte_rate
>> value of ctr0/1 during the test?
> I was not sure if the AverageCounter values were accurate.. For 70Mbps
> of input traffic, it gave a rate of 20Mbps.. I think I recorded this
> by reinstalling the click kernel module (all variables start at zero)
> but did not use the IGNORE argument.

It might be a good idea to use Click as well to generate the input 
traffic and then use counters on the traffic generator and link shaper 
to determine the packet rates.

> 
> 
>> 4) To rule out any misbehaving multithreading components, run the test using
>> single threaded click. Also test it in only one direction.
>>
> PollDevice is maxing out at 250Mbps at 128 bytes packet with no
> processing except for PollDevice (eth0) -> PollDevice (eth1) and
> viceversa.. Is that the limit? I am using a pretty decent box. 2xdual
> core Opteron processors (2.6Ghz) with 8GB Ram.

Is that using one thread or two threads?  Is the traffic bidirectional 
or not?  If you have a single threaded config with two PollDevices, then 
you will have lower throughput as both PollDevice elements will compete 
for CPU time.

You can try to increase the BURST parameter of PollDevice to see if you 
can improve the packet rate.  In addition, you can also vary the TX/RX 
sizes on the device via 'ethtool'.

Roman
> 



More information about the click mailing list