From owner-freebsd-net@FreeBSD.ORG Wed Oct 7 10:16:32 2009 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67E991065692; Wed, 7 Oct 2009 10:16:32 +0000 (UTC) (envelope-from rihad@mail.ru) Received: from mx40.mail.ru (mx40.mail.ru [94.100.176.54]) by mx1.freebsd.org (Postfix) with ESMTP id 249678FC15; Wed, 7 Oct 2009 10:16:31 +0000 (UTC) Received: from [217.25.27.27] (port=42136 helo=[217.25.27.27]) by mx40.mail.ru with asmtp id 1MvTZM-000Gey-00; Wed, 07 Oct 2009 14:16:28 +0400 Message-ID: <4ACC6A7B.5050808@mail.ru> Date: Wed, 07 Oct 2009 15:16:27 +0500 From: rihad User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) MIME-Version: 1.0 To: Oleg Bulyzhin References: <4AC8A76B.3050502@mail.ru> <20091007085902.GA88982@lath.rinet.ru> <4ACC5E23.8090405@mail.ru> <20091007100503.GB88982@lath.rinet.ru> In-Reply-To: <20091007100503.GB88982@lath.rinet.ru> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam: Not detected X-Mras: Ok Cc: freebsd-net@freebsd.org Subject: Re: dummynet dropping too many packets X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2009 10:16:32 -0000 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: #!/usr/local/bin/bash while :; do ( buff="$(ipfw pipe show | grep -E '^[[:digit:]]+:' | sort -n -k8,8 -r)" online="$(mysql -Bs -u... -p... dbname -e"select count(*) from online")" clear 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 else sleep 15 fi done Public domain ;-)