From owner-freebsd-net@FreeBSD.ORG Sun Oct 4 14:42: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 821FD1065679 for ; Sun, 4 Oct 2009 14:42:32 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 4844D8FC1C for ; Sun, 4 Oct 2009 14:42:32 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 025AA730DA; Sun, 4 Oct 2009 16:49:10 +0200 (CEST) Date: Sun, 4 Oct 2009 16:49:09 +0200 From: Luigi Rizzo To: rihad Message-ID: <20091004144909.GA42503@onelab2.iet.unipi.it> References: <4AC8A76B.3050502@mail.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4AC8A76B.3050502@mail.ru> User-Agent: Mutt/1.4.2.3i 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: Sun, 04 Oct 2009 14:42:32 -0000 On Sun, Oct 04, 2009 at 06:47:23PM +0500, rihad wrote: > Hi, we have around 500-600 mbit/s traffic flowing through a 7.1R Dell > PowerEdge w/ 2 GigE bce cards. There are currently around 4 thousand ISP > users online limited by dummynet pipes of various speeds. According to > netstat -s output around 500-1000 packets are being dropped every second > (this accounts for wasting around 7-12 mbit/s worth of traffic according > to systat -ifstat): what kind of packets are you seeing as dropped ? please give the output of 'netstat -s output | grep drop' At those speeds you might be hitting various limits with your config (e.g. 50k nmbclusters is probably way too small for 4k users -- means you have an average of 10-15 buffers per user; the queue size of 350kbytes = 2.6Mbits means 2.6 seconds of buffering, which is quite high besides the fact that in order to scale to 4k users you would need over 1GB of kernel memory just for the buffers). I'd most likely suspect the nmbclusters argument. netstat -m might give you some useful stats. cheers luigi > # while :; do netstat -z -s 2>/dev/null | fgrep -w "output packets > dropped"; sleep 1; done > 16824 output packets dropped due to no bufs, etc. > 548 output packets dropped due to no bufs, etc. > 842 output packets dropped due to no bufs, etc. > 709 output packets dropped due to no bufs, etc. > 652 output packets dropped due to no bufs, etc. > ^C > > Pipes have been created like this: > ipfw pipe 1024 config bw 1024kbit/s mask dst-ip 0xffffffff queue 350KBytes > etc., and then assigned to users by application (ipfw tablearg). > > I've tried playing with the queue setting, from as little as 1 slot to > as much as 4096KBytes - packets are still being dropped, more or less. > Should I somehow calculate the proper queue value for the given pipe > width? The manpage says 50 slots is typical for Ethernet devices (not > mentioning whether it's 10, 100 or 1000 mbit/s), and that's it. > > sysctls: > kern.ipc.nmbclusters=50000 > net.inet.ip.dummynet.io_fast=1 > > Polling can't be enabled with bce. > > Any hints? Should I provide any further info? > > Thanks. > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"