From owner-freebsd-pf@FreeBSD.ORG Sat Jun 11 20:07:22 2005 Return-Path: X-Original-To: freebsd-pf@freebsd.org Delivered-To: freebsd-pf@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9CB1516A41F for ; Sat, 11 Jun 2005 20:07:22 +0000 (GMT) (envelope-from vladgalu@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4733643D4C for ; Sat, 11 Jun 2005 20:07:22 +0000 (GMT) (envelope-from vladgalu@gmail.com) Received: by zproxy.gmail.com with SMTP id 9so1143639nzo for ; Sat, 11 Jun 2005 13:07:21 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=qeT43F/MNyo/BJ1Gwq0EsjxSDOV81CqPF0aElAgOUSrUd6efLXrvtdKtungb3/I0ZT/rd++aKK/KGYZdeLw323Trxs/2mWowA31hBHC8Xx8QRs1RalOZv9d7JWa6FaPtZNLqKOVGSTqNuIiQ0GJiZEPu7YCoFJciGrAJeWUjm1I= Received: by 10.36.115.1 with SMTP id n1mr1934741nzc; Sat, 11 Jun 2005 13:07:21 -0700 (PDT) Received: by 10.36.86.4 with HTTP; Sat, 11 Jun 2005 13:07:21 -0700 (PDT) Message-ID: <79722fad050611130734c36979@mail.gmail.com> Date: Sat, 11 Jun 2005 23:07:21 +0300 From: Vlad GALU To: freebsd-pf@freebsd.org, freebsd-net@freebsd.org In-Reply-To: <79722fad0506110228538ee434@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <79722fad05060914123edd1004@mail.gmail.com> <79722fad050609151068c71c91@mail.gmail.com> <79722fad0506110228538ee434@mail.gmail.com> Cc: Subject: Re: Please review & test this X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Vlad GALU List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jun 2005 20:07:22 -0000 On 6/11/05, Vlad GALU wrote: > On 6/10/05, Vlad GALU wrote: > > On 6/10/05, Vlad GALU wrote: > > > As you may all know, the packet classifier in ALTQ is very > > > slow on large numbers of classes, because it stores them linearly, in > > > an array. I rewrote the way classes are stored, replacing the array > > > with a hash table. I tested [1] on a system with about 8000 classes > > > and noticed a remarkable performance difference (the system went from > > > almost unusable to nice & smooth). It breaks the ABI by adding an > > > extra TAILQ_ENTRY member to the HFSC class structure, though. > > > > And also replaces the class array in struct hfsc_if with the hash tab= le. >=20 > Bummer. Increasing the number of classes led to locking the machine > up. Something slipped my eye: the filters are also linearly searched > for. I'll try to do something about them as well and come back with > something. >=20 Duhhh, I need more coffee. I didn't notice the ALTQ3_COMPAT ifdef in the source. Luckily, the patch in my first mail deals with it as well. The classifying is entirely done by pf, so I guess it only depends on how (un)optimized your ruleset is. > > > > > If anyone reviews and tests it, I would be grateful. > > > > > > [1] http://night.rdslink.ro/dudu/altq/altq_hfschash.diff > > > > > > P.S. please keep in mind that I'm not exactly a black belt in kernel > > > programming, so glitches might exist. I would be most happy to hear > > > some suggestions. > > > > > > -- > > > If it's there, and you can see it, it's real. > > > If it's not there, and you can see it, it's virtual. > > > If it's there, and you can't see it, it's transparent. > > > If it's not there, and you can't see it, you erased it. > > > > > > > > > -- > > If it's there, and you can see it, it's real. > > If it's not there, and you can see it, it's virtual. > > If it's there, and you can't see it, it's transparent. > > If it's not there, and you can't see it, you erased it. > > >=20 >=20 > -- > If it's there, and you can see it, it's real. > If it's not there, and you can see it, it's virtual. > If it's there, and you can't see it, it's transparent. > If it's not there, and you can't see it, you erased it. >=20 --=20 If it's there, and you can see it, it's real. If it's not there, and you can see it, it's virtual. If it's there, and you can't see it, it's transparent. If it's not there, and you can't see it, you erased it.