dummynet dropping too many packets

rihad rihad at mail.ru
Wed Oct 7 10:16:32 UTC 2009

Oleg Bulyzhin wrote:
> On Wed, Oct 07, 2009 at 02:23:47PM +0500, rihad wrote:
> Few questions:
> 1) why are you not using fastforwarding?
> 2) search_steps/searches ratio is not that good, are you using 'buckets'
>    keyword in your pipe configuration?
> 3) you have net.inet.ip.fw.one_pass = 0, is it intended?
1) and 3): the box does traffic accounting and shaping, so I need 
one_pass=0 to do both ngtee and pipes.
2) Hm, I'm not using "buckets", but rather 
net.inet.ip.dummynet.hash_size. It's at default, 64. I've tried setting 
net.inet.ip.dummynet.hash_size=65536 in sysctl.conf but somehow it was 
still 64 after reboot, so I left it at 64. Should I make it 128? 256? 
Does it matter that much? The load is at approx. 70-120 consumers per 
pipe, so I thought 64 bucket size was enough. Here's how I've been 
monitoring the pipe load interactively:


while :; do
         buff="$(ipfw pipe show | grep -E '^[[:digit:]]+:' | sort -n 
-k8,8 -r)"
         online="$(mysql -Bs -u... -p... dbname -e"select count(*) from 
         echo "$buff"
         echo "$buff" | awk '{sum+=$8} END {printf "QLoad: %d/%d\n", 
sum, '"$online"'}'
         netstat -m | fgrep -w 'mbuf clusters in use'
         ) | dd 2>/dev/null
         if [ -t 0 ]; then
                 read -s -n 1 -t 15
                 sleep 15

Public domain ;-)

More information about the freebsd-net mailing list