From owner-freebsd-net@FreeBSD.ORG Tue Oct 6 13:33:26 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 8E5E21065670 for ; Tue, 6 Oct 2009 13:33:26 +0000 (UTC) (envelope-from rihad@mail.ru) Received: from mx30.mail.ru (mx30.mail.ru [94.100.176.44]) by mx1.freebsd.org (Postfix) with ESMTP id 473818FC12 for ; Tue, 6 Oct 2009 13:33:26 +0000 (UTC) Received: from [217.25.27.27] (port=1178 helo=[217.25.27.27]) by mx30.mail.ru with asmtp id 1MvAAO-000Cub-00; Tue, 06 Oct 2009 17:33:24 +0400 Message-ID: <4ACB4720.40004@mail.ru> Date: Tue, 06 Oct 2009 18:33:20 +0500 From: rihad User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) MIME-Version: 1.0 To: Luigi Rizzo References: <4AC9D87E.7000005@mail.ru> <20091005120418.GA63131@onelab2.iet.unipi.it> <4AC9E29B.6080908@mail.ru> <20091005123230.GA64167@onelab2.iet.unipi.it> <4AC9EFDF.4080302@mail.ru> <4ACA2CC6.70201@elischer.org> <4ACAFF2A.1000206@mail.ru> <4ACB0C22.4000008@mail.ru> <20091006093408.GA86830@onelab2.iet.unipi.it> <4ACB0F28.3000906@mail.ru> <20091006101747.GA87655@onelab2.iet.unipi.it> In-Reply-To: <20091006101747.GA87655@onelab2.iet.unipi.it> 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, Julian Elischer 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: Tue, 06 Oct 2009 13:33:26 -0000 Luigi Rizzo wrote: > On Tue, Oct 06, 2009 at 02:34:32PM +0500, rihad wrote: >> Luigi Rizzo wrote: >> 8664 output packets dropped due to no bufs, etc. >> net.inet.ip.dummynet.io_pkt_drop: 111 > > io_pkt_drop only reports packets dropped to errors (missing pipes, > randomly forced packet drops which you don't use, no buffers and so on). > > The packets intentionally dropped in dummynet because queues are full > are listed by 'ipfw pipe show'. > > Even if pipes expire, there is a difference between having partial > information and completely ignoring what is available and claiming > "it's plain useless". Ok, without looking I can say: there _are_ always some users overrunning their queues that have non-zero Drp column in ipfw pipe show. But they are also there downloading like crazy when the number of online users is below 2000 or so, so how come that they're overrunning their share without getting reflected in the global netstat -s drop counter? There are 0 drops! netstat -s only starts growing when the number of online users exceeds 2000. > > BTW at least while you try to debug the problem you can temporarily > disable the pipe expire with 'sysctl net.inet.ip.dummynet.expire=0' > and also you could poll the stats more frequently (say every 1-2-5 sec) > to get a better idea of what happens. > I've tried expire=0 for a while, too. No difference whatsoever. > The one time you sent the 'pipe show' info there were clearly > a few pipes with thousand packet drops -- as i said those are > unavoidable and correspond to clients that systematically > exceed their share (500k/1m as you set) e.g. because they are flooding > the net with TCP SYN or UDP requests. This may be due to viruses, > aggressive p2p, and so on. A single client can easily generate > the extra 2000 packets per seconds that you are seeing. > Only downloads (i.e. traffic arriving from the Net) crosses the PC at hand. What makes me think this is a global problem, is that the drops _never_ happen when the number of online users in IPFW tables is below 2000 or so, no matter how high global traffic load is. Please see my previous email with ipfw rules.