Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Oct 2009 14:07:54 +0500
From:      rihad <rihad@mail.ru>
To:        Peter Jeremy <peterjeremy@acm.org>
Cc:        freebsd-net@freebsd.org
Subject:   Re: dummynet dropping too many packets
Message-ID:  <4ADADAEA.5050000@mail.ru>
In-Reply-To: <4ADAD42B.2070406@mail.ru>
References:  <4AC8A76B.3050502@mail.ru> <20091017215454.GG38569@server.vk2pj.dyndns.org> <4ADACDA8.2080506@mail.ru> <4ADAD42B.2070406@mail.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
rihad wrote:
> rihad wrote:
>> Peter Jeremy wrote:
>>
>>> Since the problem only appears to manifest when table(0) exceeds 2000
>>> entries, have you considered splitting (at least temporarily) that
>>> table (and possibly table(2)) into two (eg table(0) and table(4))?
>>> This would help rule out an (unlikely) problem with table sizes.
>> It was quite easy to simulate without touching any code:
>> # ipfw table 0 list|wc -l
>>     3697
>> # move half the table into the new table(1)
>> # ipfw table 0 list|head -n1800|while read ip pipeid; do ipfw -q table 
>> 1 add $ip $pipeid && ipfw -q table 0 delete $ip; done
>> # ipfw table 0 list|wc -l
>>     1899
>> # ipfw table 1 list|wc -l
>>     1800
>> # ipfw add 1061 pipe tablearg ip from any to table'(1)' out recv bce0 
>> xmit bce1
>>
>> now the ipfw looks like this:
>> 01060 pipe tablearg ip from any to table(0) out recv bce0 xmit bce1
>> 01061 pipe tablearg ip from any to table(1) out recv bce0 xmit bce1
>>
>> The drops are at 100-200 per second. It may have descreased by 100-200 
>> drops.  Strangely, deleting rule 1061 instantly increases the drop 
>> rate to 300-400 up to 700/s, although there's still only 1980 entries 
>> in table(0), which is somewhat inexplicable.
>>
> Splitting the table 0 across 4 tables in the same way, resulting in each 
> having around 500-600 entries didn't help much either:
> 01060 pipe tablearg ip from any to table(0) out recv bce0 xmit bce1
> 01061 pipe tablearg ip from any to table(10) out recv bce0 xmit bce1
> 01061 pipe tablearg ip from any to table(11) out recv bce0 xmit bce1
> 01061 pipe tablearg ip from any to table(12) out recv bce0 xmit bce1
> 
> 
> Still 100-200-300-400 drops/s.
> 

That's because I had neglected to also split the cross-ISP table 2, 
which for various reasons currently has less than 1% of total traffic. 
Despite that, and to my great surprise, flushing table 0 didn't stop the 
drops until I had also flushed the mostly idle table 2!

I've just split both table(0) and table(2) in two, and the output drops 
were brought down to 20-80 up to 150 (in systat -ip). Now there are 
around 1700 in each of the tables 0 and 2, and exactly 1500 enries in 
each of the tables 10 and 20.

01060 pipe tablearg ip from any to table(0) out recv bce0 xmit bce1
01061 pipe tablearg ip from any to table(10) out recv bce0 xmit bce1
01070 allow ip from any to table(0) out recv bce0 xmit bce1
01071 allow ip from any to table(10) out recv bce0 xmit bce1
01100 pipe tablearg ip from any to table(2)
01101 pipe tablearg ip from any to table(20)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4ADADAEA.5050000>