From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 30 01:47:52 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD0C216A401 for ; Thu, 30 Mar 2006 01:47:51 +0000 (UTC) (envelope-from awasthi.ashish@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.235]) by mx1.FreeBSD.org (Postfix) with ESMTP id 14F0F43D49 for ; Thu, 30 Mar 2006 01:47:49 +0000 (GMT) (envelope-from awasthi.ashish@gmail.com) Received: by wproxy.gmail.com with SMTP id i24so311621wra for ; Wed, 29 Mar 2006 17:47:49 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=P92f/kLzsbYw7wW32cW5pPzahp2nUVAqAN7nckUcTGRP72w0+R/6gtOPsS6xxay+ru4nShibM5xx5C0JXBIJB3B7LOQV3zsFKZNoE/XIqFZRS7BwODD+rhVq7i6h411i8fDviprr3bDs93Thstoo7P+msnZAMIJRvePtd47wyo0= Received: by 10.65.176.17 with SMTP id d17mr938361qbp; Wed, 29 Mar 2006 17:47:49 -0800 (PST) Received: by 10.65.252.10 with HTTP; Wed, 29 Mar 2006 17:47:49 -0800 (PST) Message-ID: <5289d17a0603291747yc74f86al2f045efb95f13b6@mail.gmail.com> Date: Wed, 29 Mar 2006 20:47:49 -0500 From: "Ashish Awasthi" To: freebsd-hackers@freebsd.org In-Reply-To: <5289d17a0603291736s2f05bb55m293e2ec32af8a3af@mail.gmail.com> MIME-Version: 1.0 References: <5289d17a0603291735u194807cbu853b438edc80049b@mail.gmail.com> <5289d17a0603291736s2f05bb55m293e2ec32af8a3af@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Packet drops and queue length upon bandwidth limiting in PF X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2006 01:47:52 -0000 Hi friends, I am a relative newbie, so please don't flame me if my question doesn't mak= e sense. In a network experiment to determine appropriate length of router buffers, = I am using pfctl on FreeBSD 5.3 to limit the bandwidth to 100 Mbps on a 1 Gig link and limit the queue to 240 packets, and I use iperf for sending out data. Connection is maintained between two routers running FreeBSD 5.3, connected by a 1 Gig link. I monitor on sender the pfctl and iperf statisitcs. As I see the iperf throughput go down from 94 Mbps to 50 Mbps and then rise again in accordance with the classic sawtooth curve of TCP, it is clear tha= t there must have been a packet drop, but "pfctl -s -queue -v -v" at the sender shows 0 losses and 0 drops. Moreover, the queue length as reported never overflows. Even netstat shows 0 retransmissions! I tried this with queue lengths of 50, 100, 240, 10 and 5. Only when queue length is on the order of 5 or 10 do I see packet drops in pfctl report (an= d also retransmissions in the netstat report); however, since I have limited the bandwidth and the outgoing traffic is shaped by this limitation, it is clear that there must be some packet losses in other cases as well. So, I tend to think that some other queueing is occuring apart from the ALTQ, and drops are occuring there. If so, how can I obtain those statistics? Thanks a lot for your help! Ashish