From owner-freebsd-questions@FreeBSD.ORG Thu Dec 15 17:52:47 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CEF11065701 for ; Thu, 15 Dec 2011 17:52:47 +0000 (UTC) (envelope-from max@mxcrypt.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0F7638FC0A for ; Thu, 15 Dec 2011 17:52:46 +0000 (UTC) Received: by qabg14 with SMTP id g14so1775570qab.13 for ; Thu, 15 Dec 2011 09:52:46 -0800 (PST) Received: by 10.224.216.197 with SMTP id hj5mr7239656qab.15.1323971566218; Thu, 15 Dec 2011 09:52:46 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.155.198 with HTTP; Thu, 15 Dec 2011 09:52:15 -0800 (PST) In-Reply-To: <20111213131547.27bda580@gumby.homeunix.com> References: <20111213131547.27bda580@gumby.homeunix.com> From: Maxim Khitrov Date: Thu, 15 Dec 2011 12:52:15 -0500 Message-ID: To: RW Content-Type: text/plain; charset=UTF-8 Cc: freebsd-questions@freebsd.org Subject: Re: Implementation details of altq hfsc scheduler in pf 4.5 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2011 17:52:47 -0000 On Tue, Dec 13, 2011 at 8:15 AM, RW wrote: > On Mon, 12 Dec 2011 21:51:39 -0500 > Maxim Khitrov wrote: > >> I've read everything I could find on the topic of configuring hfsc >> altq in pf (4.5, FreeBSD 9), but I still have no clear idea of how it >> is actually implemented. I even started looking through the source >> code, but that might take a while. My main questions are: >> >> 1. Difference between 'realtime' and 'linkshare'? > > It's about latency, realtime has priority over non-realtime. I sort of understand this, but I can't figure out how that would apply to my example: altq on $wan hfsc bandwidth 25Mb queue {one, two} queue one bandwidth 70% hfsc(default, realtime 20%) queue two bandwidth 30% hfsc(realtime 60%) If realtime and linkshare priorities are reversed, what happens as total bandwidth utilization approaches 100%? >> 2. In service curve configuration (m1, d, m2), what is 'd' relative >> to? > > It looks like it's a leaky-bucket algorithm. It's not really relative > to anything except for special cases like a traffic step-function. Can you please clarify what you mean? I'm familiar with the leaky bucket algorithm, but it still doesn't answer what triggers the switch from m1 to m2 and whether it's a per-queue or per-connection setting. >> 3. Are priorities actually used for anything? > > Priority determines which queue is serviced next when more than one is > under its limit. Understood, thanks. - Max