From owner-freebsd-net@FreeBSD.ORG Mon Dec 10 19:42:05 2007 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 72BC616A585 for ; Mon, 10 Dec 2007 19:42:05 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from mail-out3.apple.com (mail-out3.apple.com [17.254.13.22]) by mx1.freebsd.org (Postfix) with ESMTP id 5A4F613C46B for ; Mon, 10 Dec 2007 19:42:05 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from relay12.apple.com (relay12.apple.com [17.128.113.53]) by mail-out3.apple.com (Postfix) with ESMTP id 0276B1ABBD29; Mon, 10 Dec 2007 11:22:34 -0800 (PST) Received: from relay12.apple.com (unknown [127.0.0.1]) by relay12.apple.com (Symantec Mail Security) with ESMTP id DE15E2804E; Mon, 10 Dec 2007 11:22:33 -0800 (PST) X-AuditID: 11807135-9d8bebb000003911-43-475d91f9d2a7 Received: from cswiger1.apple.com (cswiger1.apple.com [17.214.13.96]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by relay12.apple.com (Apple SCV relay) with ESMTP id BF4832804D; Mon, 10 Dec 2007 11:22:33 -0800 (PST) Message-Id: From: Chuck Swiger To: rihad In-Reply-To: <475D6FD7.2000500@mail.ru> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v915) Date: Mon, 10 Dec 2007 11:22:33 -0800 References: <475D6FD7.2000500@mail.ru> X-Mailer: Apple Mail (2.915) X-Brightmail-Tracker: AAAAAA== Cc: freebsd-net@freebsd.org Subject: Re: Pipe queues 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: Mon, 10 Dec 2007 19:42:05 -0000 On Dec 10, 2007, at 8:56 AM, rihad wrote: > Hi, > > I'm having a hard time to understand what pipe queues are with > respect to bandwidth limitation. ipfw(8) and dummynet(4) manuals > didn't help me much. Pipes and queues are two different things; a pipe simulates a network link, and a queue is used to hold packets which are backlogged because they are arriving faster than the outbound link (ie, a pipe) can transmit them. > How does dummynet's traffic shaping function? It uses a variant of weighted fair queuing. > Why does it need a queue at all? So the traffic shaper can choose which of the queues with traffic it should drain and send out next. Unless you use multiple queues, you won't be able to prioritize traffic between 'em. > As each connection's queue takes some memory, can I just disable the > queueing, or set its size to 1 slot (1500 bytes)? You could, but that would largely disable effective traffic shaping also. > What if I set it to 10000 slots, why should it wait to fill the > queue before starting to send stuff out the network interface? Well, it *doesn't* wait for the queue to be filled before starting to send stuff out the network. > As packets arrive, AFAIK they are stored in mbufs in system memroy. > Do pipe queues also use mbufs? I might be servicing hundreds of > pipes simultaneously, this is why I'm concerned about memory use. Pipes aren't queues. Queues buffer packets into mbufs. -- -Chuck