From owner-freebsd-current@FreeBSD.ORG Fri May 2 10:58:21 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2192237B401 for ; Fri, 2 May 2003 10:58:21 -0700 (PDT) Received: from ns2.gnf.org (ns2.gnf.org [63.196.132.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D79B43FCB for ; Fri, 2 May 2003 10:58:20 -0700 (PDT) (envelope-from gtetlow@gnf.org) Received: from EXCHCLUSTER01.lj.gnf.org (exch02.lj.gnf.org [172.25.10.20]) by ns2.gnf.org (8.12.6p2/8.12.3) with ESMTP id h42HwI8V090839 for ; Fri, 2 May 2003 10:58:18 -0700 (PDT) (envelope-from gtetlow@gnf.org) Received: from roark.gnf.org ([172.25.24.15]) by EXCHCLUSTER01.lj.gnf.org with Microsoft SMTPSVC(5.0.2195.5329); Fri, 2 May 2003 10:58:19 -0700 Received: from roark.gnf.org (localhost [127.0.0.1]) by roark.gnf.org (8.12.9/8.12.9) with ESMTP id h42HwJSY005979; Fri, 2 May 2003 10:58:19 -0700 (PDT) (envelope-from gtetlow@gnf.org) Received: (from gtetlow@localhost) by roark.gnf.org (8.12.9/8.12.9/Submit) id h42HwHUg005795; Fri, 2 May 2003 10:58:17 -0700 (PDT) (envelope-from gtetlow) Date: Fri, 2 May 2003 10:58:17 -0700 From: Gordon Tetlow To: "Daniel C. Sobral" Message-ID: <20030502175817.GV14221@roark.gnf.org> References: <1051793484.2200.112.camel@localhost> <3EB12490.4000500@newsguy.com> <1051797636.2209.142.camel@localhost> <3EB270AA.9000904@tcoip.com.br> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ui+0LsrIBWBNb/ay" Content-Disposition: inline In-Reply-To: <3EB270AA.9000904@tcoip.com.br> User-Agent: Mutt/1.4i X-Habeas-SWE-1: winter into spring X-Habeas-SWE-2: brightly anticipated X-Habeas-SWE-3: like Habeas SWE (tm) X-Habeas-SWE-4: Copyright 2002 Habeas (tm) X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this X-Habeas-SWE-6: email in exchange for a license for this Habeas X-Habeas-SWE-7: warrant mark warrants that this is a Habeas Compliant X-Habeas-SWE-8: Message (HCM) and not spam. Please report use of this X-Habeas-SWE-9: mark in spam to . X-OriginalArrivalTime: 02 May 2003 17:58:20.0024 (UTC) FILETIME=[6A5F2F80:01C310D4] cc: Niall Dalton cc: freebsd-current@freebsd.org Subject: Re: In-kernel http server X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2003 17:58:21 -0000 --ui+0LsrIBWBNb/ay Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 02, 2003 at 10:20:42AM -0300, Daniel C. Sobral wrote: > Niall Dalton wrote: > >On Thu, 2003-05-01 at 14:43, Daniel C. Sobral wrote: > > > >>Supposedly, most of the gain of a kernel-based httpd can be achieved=20 > >>through accept filters (specifically, of course, the accept_http filter= ). > > > > > >You mean simply compiling the accept_http filter into the > >kernel and running a standard web server is it? Has this > >been benchmarked? A google search didn't throw up much for > >me on this. >=20 > AFAIK, the application has to select the accept filter: >=20 > An accept filter is requested via the setsockopt(2) system call, passing= =20 > in an optname of SO_ACCEPTFILTER. (that's from accept_filter(9)) Apache understands accept filters iirc. So as long as you have them in your kernel (I believe you can load them from loader.conf but not from the commandline), it should help speed things up. We used these at Blue Mountain. The instance that you'll find they help alot is when you are getting a very large request from the user (ie, there is alot of cookie data to be passed back and forth). Basically what the accept filter does is not pass the HTTP request from the kernel to the userland application until a '\n\n' is encountered. This is incredibly helpful if you have a slow client talking to your server. -gordon --ui+0LsrIBWBNb/ay Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+srG5Ru2t9DV9ZfsRAjn6AKDA1cMPlDCzn8mIsxeMzE64CN2TkwCfUufd Wx7b07yS7cJxf6GPe71FN/s= =fWXk -----END PGP SIGNATURE----- --ui+0LsrIBWBNb/ay--