From owner-freebsd-performance@FreeBSD.ORG Wed Nov 21 19:01:51 2007 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98CCD16A418; Wed, 21 Nov 2007 19:01:51 +0000 (UTC) (envelope-from marcio29@live.com) Received: from bay0-omc1-s2.bay0.hotmail.com (bay0-omc1-s2.bay0.hotmail.com [65.54.246.74]) by mx1.freebsd.org (Postfix) with ESMTP id C43F013C4BB; Wed, 21 Nov 2007 19:01:50 +0000 (UTC) (envelope-from marcio29@live.com) Received: from BAY126-W36 ([65.55.131.71]) by bay0-omc1-s2.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 21 Nov 2007 10:49:26 -0800 Message-ID: X-Originating-IP: [193.137.211.11] From: Marcio Cicero To: Date: Wed, 21 Nov 2007 19:49:22 +0100 Importance: Normal MIME-Version: 1.0 X-OriginalArrivalTime: 21 Nov 2007 18:49:26.0363 (UTC) FILETIME=[3D6D62B0:01C82C6F] Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Optimal Apache22 configuration X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Nov 2007 19:01:51 -0000 Hello all, Tomorrow i'll start configuring an apache22 server at work and I've been se= arching what's the best configuration for apache22 on apache. Is it possible to use kqueue() support for apache22? Also, the best threadi= ng library around for apache22 on freebsd is libthr? The best mpm for this kind of environment is still worker? Is there any updated documentation on this matter? Thanks in advance.=20 Regards, Marcio _________________________________________________________________ Invite your mail contacts to join your friends list with Windows Live Space= s. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=3Dcreate&wx_url=3D/friends.= aspx&mkt=3Den-us= From owner-freebsd-performance@FreeBSD.ORG Thu Nov 22 12:07:05 2007 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D562116A46B for ; Thu, 22 Nov 2007 12:07:05 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by mx1.freebsd.org (Postfix) with ESMTP id 518BA13C4E7 for ; Thu, 22 Nov 2007 12:07:04 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: by ug-out-1314.google.com with SMTP id y2so386271uge for ; Thu, 22 Nov 2007 04:06:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer; bh=Ic7KGvGYkM89Ny3ZhiZfIbcIWhxnJ0V07KxTz2GmVj0=; b=C8wQRauTDpRqdAMpO0LlWnTXYh/C8PevcK3AXD3135m+djt51vbLmEyMEiXFKqmtzQy4NooC+dNCa3YJiU7VBk4ei6+FzGDdsY+ArB/YA8mKdvJFt0HGkhJmIRffCAsuX9G4iyNLDe1eQaT2g4qCBdnZEc8+7HeauDN8KT2LUPk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer; b=QnWLDWZMOJb26aG2vMmzi2KEHqptjvweDbiH5QX2GqaTIILA11xBjtFRI+4W/O99F/cJnf3AKG8Na8eJBolL9Jf6lXp+mv5K9Y+3zz50UwGD0l070K6Zt9JqfdL54PdXPVjlq4Mvn+GKgpJXXM0mS3MWXjrFF3HpLWmO00qrNEw= Received: by 10.67.22.2 with SMTP id z2mr1347529ugi.1195731557429; Thu, 22 Nov 2007 03:39:17 -0800 (PST) Received: from ?127.0.0.1? ( [217.206.187.79]) by mx.google.com with ESMTPS id i6sm534056gve.2007.11.22.03.39.14 (version=SSLv3 cipher=RC4-MD5); Thu, 22 Nov 2007 03:39:14 -0800 (PST) From: Tom Evans To: Marcio Cicero In-Reply-To: References: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-Wrzz2RHeEQrjTAcaeP2+" Date: Thu, 22 Nov 2007 11:39:12 +0000 Message-Id: <1195731553.82763.30.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.10.2 FreeBSD GNOME Team Port Cc: freebsd-performance@freebsd.org, freebsd-questions@freebsd.org Subject: Re: Optimal Apache22 configuration X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Nov 2007 12:07:05 -0000 --=-Wrzz2RHeEQrjTAcaeP2+ Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 2007-11-21 at 19:49 +0100, Marcio Cicero wrote: > Hello all, >=20 > Tomorrow i'll start configuring an apache22 server at work and I've been = searching what's the best configuration for apache22 on apache. >=20 > Is it possible to use kqueue() support for apache22? Also, the best threa= ding library around for apache22 on freebsd is libthr? >=20 > The best mpm for this kind of environment is still worker? >=20 > Is there any updated documentation on this matter? >=20 > Thanks in advance.=20 > Regards, > Marcio >=20 We use a pair of apache22 webservers in a round robin configuration at work, doing proxying to app servers and serving static content for all our websites, and they run very nicely indeed under the event MPM. This is still marked as 'experimental' as apache, but the reason is that it doesn't support accept filters or SSL yet (support is planned). If you need SSL, I'd go for worker. If you need PHP, I'd go for prefork :) We wanted a pair for redundancy and failover support, and we were unsure one server could handle the load, but load tends to hover at about 0.1 on both boxes, and they tend to 'just work', which is nice :) We use libthr, which works perfectly (as you would expect, lots of apache devs run and recommend FreeBSD). Cheers Tom --=-Wrzz2RHeEQrjTAcaeP2+ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQBHRWpclcRvFfyds/cRAlXAAKC+ILXgsydc2UGhu/twCsRob5qCZgCePk1U QE7tBKJFKIG9WdRlhqns5/k= =7dHX -----END PGP SIGNATURE----- --=-Wrzz2RHeEQrjTAcaeP2+-- From owner-freebsd-performance@FreeBSD.ORG Thu Nov 22 13:58:42 2007 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 977FB16A418; Thu, 22 Nov 2007 13:58:42 +0000 (UTC) (envelope-from marcio29@live.com) Received: from bay0-omc3-s9.bay0.hotmail.com (bay0-omc3-s9.bay0.hotmail.com [65.54.246.209]) by mx1.freebsd.org (Postfix) with ESMTP id 6ED9813C4D1; Thu, 22 Nov 2007 13:58:42 +0000 (UTC) (envelope-from marcio29@live.com) Received: from BAY126-W57 ([65.55.131.92]) by bay0-omc3-s9.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 22 Nov 2007 05:58:24 -0800 Message-ID: X-Originating-IP: [193.137.211.11] From: Marcio Cicero To: Tom Evans Date: Thu, 22 Nov 2007 14:58:24 +0100 Importance: Normal In-Reply-To: <1195731553.82763.30.camel@localhost> References: <1195731553.82763.30.camel@localhost> MIME-Version: 1.0 X-OriginalArrivalTime: 22 Nov 2007 13:58:24.0899 (UTC) FILETIME=[BFFF2D30:01C82D0F] Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-performance@freebsd.org, freebsd-questions@freebsd.org Subject: RE: Optimal Apache22 configuration X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Nov 2007 13:58:42 -0000 Hi Tom, Thanks for your input. As far as I can remember there were experimental support for kqueue polling= events on apache2 which I remember as nice performance improvement. But un= fortunately I can't find any info regarding kqueue for apache22.=20 Is this possible for apache22? TIA Regards, Marcio > Subject: Re: Optimal Apache22 configuration > From: tevans.uk@googlemail.com > To: marcio29@live.com > CC: freebsd-performance@freebsd.org; freebsd-questions@freebsd.org > Date: Thu, 22 Nov 2007 11:39:12 +0000 >=20 > On Wed, 2007-11-21 at 19:49 +0100, Marcio Cicero wrote: > > Hello all, > >=20 > > Tomorrow i'll start configuring an apache22 server at work and I've bee= n searching what's the best configuration for apache22 on apache. > >=20 > > Is it possible to use kqueue() support for apache22? Also, the best thr= eading library around for apache22 on freebsd is libthr? > >=20 > > The best mpm for this kind of environment is still worker? > >=20 > > Is there any updated documentation on this matter? > >=20 > > Thanks in advance.=20 > > Regards, > > Marcio > >=20 >=20 > We use a pair of apache22 webservers in a round robin configuration at > work, doing proxying to app servers and serving static content for all > our websites, and they run very nicely indeed under the event MPM. This > is still marked as 'experimental' as apache, but the reason is that it > doesn't support accept filters or SSL yet (support is planned). If you > need SSL, I'd go for worker. If you need PHP, I'd go for prefork :) >=20 > We wanted a pair for redundancy and failover support, and we were unsure > one server could handle the load, but load tends to hover at about 0.1 > on both boxes, and they tend to 'just work', which is nice :) >=20 > We use libthr, which works perfectly (as you would expect, lots of > apache devs run and recommend FreeBSD). >=20 > Cheers >=20 > Tom >=20 >=20 _________________________________________________________________ Explore the seven wonders of the world http://search.msn.com/results.aspx?q=3D7+wonders+world&mkt=3Den-US&form=3DQ= BRE= From owner-freebsd-performance@FreeBSD.ORG Thu Nov 22 14:27:20 2007 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08F7316A417 for ; Thu, 22 Nov 2007 14:27:20 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.189]) by mx1.freebsd.org (Postfix) with ESMTP id 697C813C4E5 for ; Thu, 22 Nov 2007 14:27:19 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: by mu-out-0910.google.com with SMTP id i10so3430231mue for ; Thu, 22 Nov 2007 06:27:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=beta; h=domainkey-signature:received:received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer; bh=GSferW3zdxB4Zr4w+ZBx783Lr0OQLY4SYHqsp9xqxEE=; b=Eq0CpdF7JgVQFKJwRiyVpOpvH2DIkSFY+mOJeMXqv3LPRx6BBlyzTMkhSGZXIWyC01GUHckZnBsAxPQ5j8ZlmClWEIMh4o+qagX2JASGnIrRUNHChkgJcqyp5wD5erQwrLnnNiz4k7ZBLE76CcGVUFl1/UcGmLKcVjElEAPWqSk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer; b=jR9IneUMg1hVj9n7K8Q+dohfP5s/P6e3KQQZ2xLxe+hX+6OuZo/lI0dr/hvhYvn4z2p5PvuiK7Su7jLVzxe2RpUNzyNnu3Y4FuCOnrm0fLErtJu2q3OP3mh2BKnhVpPHIWhF9DQmY37A4HMFiFfsxk9AenTG8LHddePnmJ+juVI= Received: by 10.82.107.15 with SMTP id f15mr23667085buc.1195741632265; Thu, 22 Nov 2007 06:27:12 -0800 (PST) Received: from ?127.0.0.1? ( [217.206.187.79]) by mx.google.com with ESMTPS id b23sm617178gvc.2007.11.22.06.27.10 (version=SSLv3 cipher=RC4-MD5); Thu, 22 Nov 2007 06:27:11 -0800 (PST) From: Tom Evans To: Marcio Cicero In-Reply-To: References: <1195731553.82763.30.camel@localhost> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-wuTfXBJC6exdBjBPgre3" Date: Thu, 22 Nov 2007 14:27:09 +0000 Message-Id: <1195741629.82763.37.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.10.2 FreeBSD GNOME Team Port Cc: freebsd-performance@freebsd.org, freebsd-questions@freebsd.org Subject: RE: Optimal Apache22 configuration X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Nov 2007 14:27:20 -0000 --=-wuTfXBJC6exdBjBPgre3 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Thu, 2007-11-22 at 14:58 +0100, Marcio Cicero wrote: > Hi Tom, >=20 > Thanks for your input. >=20 > As far as I can remember there were experimental support for kqueue > polling events on apache2 which I remember as nice performance > improvement. But unfortunately I can't find any info regarding kqueue > for apache22.=20 >=20 > Is this possible for apache22? >=20 > TIA > Regards, > Marcio >=20 > ______________________________________________________________________ > > Subject: Re: Optimal Apache22 configuration > > From: tevans.uk@googlemail.com > > To: marcio29@live.com > > CC: freebsd-performance@freebsd.org; freebsd-questions@freebsd.org > > Date: Thu, 22 Nov 2007 11:39:12 +0000 > >=20 > > On Wed, 2007-11-21 at 19:49 +0100, Marcio Cicero wrote: > > > Hello all, > > >=20 > > > Tomorrow i'll start configuring an apache22 server at work and > I've been searching what's the best configuration for apache22 on > apache. > > >=20 > > > Is it possible to use kqueue() support for apache22? Also, the > best threading library around for apache22 on freebsd is libthr? > > >=20 > > > The best mpm for this kind of environment is still worker? > > >=20 > > > Is there any updated documentation on this matter? > > >=20 > > > Thanks in advance.=20 > > > Regards, > > > Marcio > > >=20 > >=20 > > We use a pair of apache22 webservers in a round robin configuration > at > > work, doing proxying to app servers and serving static content for > all > > our websites, and they run very nicely indeed under the event MPM. > This > > is still marked as 'experimental' as apache, but the reason is that > it > > doesn't support accept filters or SSL yet (support is planned). If > you > > need SSL, I'd go for worker. If you need PHP, I'd go for prefork :) > >=20 > > We wanted a pair for redundancy and failover support, and we were > unsure > > one server could handle the load, but load tends to hover at about > 0.1 > > on both boxes, and they tend to 'just work', which is nice :) > >=20 > > We use libthr, which works perfectly (as you would expect, lots of > > apache devs run and recommend FreeBSD). > >=20 > > Cheers > >=20 > > Tom > >=20 > >=20 >=20 Hi Marcio (Please don't top post, it destroys the logical flow of the conversation :) Apache 2.2 by default uses epoll() or kqueue() if it is available. Indeed, it is mandatory for the event MPM to work correctly. From the=20 event manual page: ( http://httpd.apache.org/docs/2.2/mod/event.html ) The MPM assumes that the underlying apr_pollset implementation is reasonably threadsafe. This enables the MPM to avoid excessive high level locking, or having to wake up the listener thread in order to send it a keep-alive socket. This is currently only compatible with KQueue and EPoll. The use of kqueue is actually performed by the underlying apr implementation, but I'm sure if it is available to apr, it will use it. Regards Tom --=-wuTfXBJC6exdBjBPgre3 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQBHRZG5lcRvFfyds/cRApQ0AJ44TqpW3OgIe1+RqD5td07t82WkjQCgtwkz /GUqoRLh5ljF8R8eoB65pxk= =SQYo -----END PGP SIGNATURE----- --=-wuTfXBJC6exdBjBPgre3-- From owner-freebsd-performance@FreeBSD.ORG Thu Nov 22 21:31:35 2007 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B78716A418; Thu, 22 Nov 2007 21:31:35 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [82.208.36.70]) by mx1.freebsd.org (Postfix) with ESMTP id 6A40E13C442; Thu, 22 Nov 2007 21:31:35 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from localhost (localhost.codelab.cz [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id 676EA19E019; Thu, 22 Nov 2007 22:12:25 +0100 (CET) Received: from [192.168.1.2] (r3a200.net.upc.cz [213.220.192.200]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTP id E87BD19E023; Thu, 22 Nov 2007 22:12:22 +0100 (CET) Message-ID: <4745F0C5.9040208@quip.cz> Date: Thu, 22 Nov 2007 22:12:37 +0100 From: Miroslav Lachman <000.fbsd@quip.cz> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: cz, cs, en, en-us MIME-Version: 1.0 To: Marcio Cicero References: <1195731553.82763.30.camel@localhost> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: Tom Evans , freebsd-performance@freebsd.org, freebsd-questions@freebsd.org Subject: Re: Optimal Apache22 configuration X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Nov 2007 21:31:35 -0000 Marcio Cicero wrote: > Hi Tom, > > Thanks for your input. > > As far as I can remember there were experimental support for kqueue polling events on apache2 which I remember as nice performance improvement. But unfortunately I can't find any info regarding kqueue for apache22. > > Is this possible for apache22? As I look in to Makefile, you can use WITH_MPM=event and Apache will use KQueue http://httpd.apache.org/docs/2.2/mod/event.html (but I am not 100% sure, I am using prefork) Miroslav Lachman