Re: Error in getting queue size
Eddie Kohler <[email protected]> Wed, 12 Jun 2013 09:18:53 -0400
| Newsgroups | gmane.network.routing.click |
|---|---|
| Message-ID | <CAF0C5SLUqkXwZ5oM5yChY+GhwmNNUb2bWzMsxpy1Q1Qfka0buQ@mail.gmail.com> |
Hi, The queue will only grow if the input rates are greater than the output CAPACITY. And this might not be the case; maybe iperf3 isn't generating traffic as fast as you think. Counter can tell you the actually observed input rates, as can Linux settings. Eddie On Wed, Jun 12, 2013 at 4:06 AM, llong_li <[email protected]> wrote: > Dear all: > > I create a click element named AF to get the size of a queue element > In the implementation file, I override the simple_action method as follows: > > Packet * > simple_action(Packet *p) { > uint32_t _qlen = queue_size() ; > //and something else just as in the EtherSwitch element. > } > where the method queue_size is defined as follows: > uint32_t > queue_size() const{ > if(_queue1){ > if(_queue1->size() != 0) > click_chatter("_queue1->size: %d\n", _queue1->size()); > return _queue1->size(); > } > else{ > int s = 0; > for(int i = 0; i < _queues.size(); i++) > s += _queues[i]->size(); > return s; > } > > I have a similar initialization like the RED element to initialize the > _queues/_queue1 . > And the configuration files is as follows: > switch :: EtherSwitch; > queue1 :: Queue > queue2 :: Queue > queue3 :: Queue > queue4 :: Queue > FromDevice(eth6, PROMISC true) -> [0]switch; > FromDevice(eth7, PROMISC true) -> [1]switch; > FromDevice(eth8, PROMISC true) -> [2]switch; > FromDevice(eth9, PROMISC true) -> [3]switch; > > switch[0] -> AF -> queue1 -> ToDevice(eth6); > switch[1] -> AF -> queue2 -> ToDevice(eth7); > switch[2] -> AF -> queue3 -> ToDevice(eth8); > switch[3] -> AF -> queue4 -> ToDevice(eth9); > > > In my configuration, eth6~eth8 are connected to host 1, 2, 3, and 4 > I start iperf test (UDP) on my servers, host 1 and 3 as the client and > host2 as the server, none on host4. > h1: iperf3 -u -c h2 -b 1000m > h3: iperf3 -u -c h2 -b 1000m -p 5202. > > The screen output that the queue size is 0, and sometimes 1. > > In my opinion, the queue's input rate is 2x larger than the output rate, > so the queue size should increase continuous, util the queue overflow. But > the screen output is different. > Are there any wrong with configuration or implementation. > > Thanks. > _______________________________________________ > click mailing list > [email protected] > https://amsterdam.lcs.mit.edu/mailman/listinfo/click >