From owner-freebsd-stable@FreeBSD.ORG Sun Oct 2 10:10:37 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D763106564A; Sun, 2 Oct 2011 10:10:37 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3fd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id ACC078FC0A; Sun, 2 Oct 2011 10:10:36 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.187.76.163]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.5/8.14.5) with ESMTP id p92AAWVM029027 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 2 Oct 2011 11:10:32 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.8.3 smtp.infracaninophile.co.uk p92AAWVM029027 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1317550232; bh=YJo6bTze93mv6veDo9AutJ7sC2n3bfTATzsiDcMn4Us=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Cc:Content-Type:Date:From:In-Reply-To: Message-ID:Mime-Version:References:To; z=Message-ID:=20<4E883890.4020704@infracaninophile.co.uk>|Date:=20S un,=2002=20Oct=202011=2011:10:24=20+0100|From:=20Matthew=20Seaman= 20|User-Agent:=20Mozilla/5.0=20(M acintosh=3B=20Intel=20Mac=20OS=20X=2010.6=3B=20rv:7.0.1)=20Gecko/2 0110929=20Thunderbird/7.0.1|MIME-Version:=201.0|To:=20Doug=20Barto n=20|CC:=20Jeremy=20Chadwick=20,=20=0D=0A=20freebsd-stable@freebsd.org|Subject:=20Re:=2 07.3=20+=20kqueue=20+=20apache/php=20+=20DNS=20lookup=20problem|Re ferences:=20<4E865146.8090108@FreeBSD.org>=20<20111001003735.GA283 46@icarus.home.lan>=20<4E866A70.8060203@FreeBSD.org>|In-Reply-To:= 20<4E866A70.8060203@FreeBSD.org>|X-Enigmail-Version:=201.3.2|OpenP GP:=20id=3D60AE908C|Content-Type:=20multipart/signed=3B=20micalg=3 Dpgp-sha1=3B=0D=0A=20protocol=3D"application/pgp-signature"=3B=0D= 0A=20boundary=3D"------------enig53E550BC93E0603B67CCCE20"; b=pJILOG8HCWkqlLoW4n8GvNz86wTDte7NLAaHMdBE3k8ppCZJq36KUGBhsc6ifLOQU can1dLJ5RW5pNsQQQznSgI2bLK39112Pcwknq/N0TYqAzeAuvxKwgfO8PXmf4ZG9BQ L9sg97fyDlqhPk/cfCs4WrolLX8FrTWGtvKoeZOY= Message-ID: <4E883890.4020704@infracaninophile.co.uk> Date: Sun, 02 Oct 2011 11:10:24 +0100 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Doug Barton References: <4E865146.8090108@FreeBSD.org> <20111001003735.GA28346@icarus.home.lan> <4E866A70.8060203@FreeBSD.org> In-Reply-To: <4E866A70.8060203@FreeBSD.org> X-Enigmail-Version: 1.3.2 OpenPGP: id=60AE908C Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig53E550BC93E0603B67CCCE20" X-Virus-Scanned: clamav-milter 0.97.2 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_FAIL autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk Cc: freebsd-stable@freebsd.org, Jeremy Chadwick Subject: Re: 7.3 + kqueue + apache/php + DNS lookup problem X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2011 10:10:37 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig53E550BC93E0603B67CCCE20 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 01/10/2011 02:18, Doug Barton wrote: >> Does this happen when httpd tries to do DNS resolution for, say, an >> > incoming connection to the web server (e.g. trying to resolve the >> > incoming IP address of the client to an FQDN), or is it happening wi= thin >> > some PHP code (assuming PHP is installed/used as an Apache module) >> > that's trying to do DNS resolution of some kind? > It's a php module doing a lookup for the hostname of the back-end mysql= > server. Hmmm... Is this a function of DNS traffic being via UDP? Presumably you're not seeing the same sort of delays when eg. apache connects to mysql via TCP. Hard to think of another UDP protocol you could use to test -- SNMP perhaps? Or somehow forcing the DNS traffic to go via TCP? Tricky to make that happen when the resolver is on localhost. Of course, since DNS will only fall back to TCP after trying UDP, that's going to be even slower overall than your current situation, but the point here is to examine the truss output for timing details specifically around where the TCP query is issued. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matthew@infracaninophile.co.uk Kent, CT11 9PW --------------enig53E550BC93E0603B67CCCE20 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6IOJcACgkQ8Mjk52CukIwKWQCfUPe85Qs07MkU2GC4zfRkrTFv za4An0tWh7LsUuxdfbfVU40SLbEyo4ZM =71kT -----END PGP SIGNATURE----- --------------enig53E550BC93E0603B67CCCE20--