From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-user+bounces-145157-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 387D013893C for <garchives@archives.gentoo.org>; Sat, 9 Feb 2013 13:51:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5C2AC21C0A8; Sat, 9 Feb 2013 13:51:19 +0000 (UTC) Received: from mail-ia0-f169.google.com (mail-ia0-f169.google.com [209.85.210.169]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BD07321C01A for <gentoo-user@lists.gentoo.org>; Sat, 9 Feb 2013 13:51:17 +0000 (UTC) Received: by mail-ia0-f169.google.com with SMTP id j5so5251021iaf.28 for <gentoo-user@lists.gentoo.org>; Sat, 09 Feb 2013 05:51:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=p5csjVxMb1wdJ0XuU4zLbCY6jwlFzIZMn/MyJe4Fku0=; b=G4EBkG88XNZtDQxtPHcFUArgOd9teXVnFe8Yj7iQbAXbBRTe3BHoxazhcigD7c+SXJ 0sq+acTb/Z3WKhXRGQlxgqUe0lE9y1PZ3RzhLLQ2bGiNtTuqiPSjP0+JPUIqeNUfn65X a4PnowqoWOBRq0BklL6h4YggeqcF7+uEEHx+GrJpDHG0X2v1Hy4ibI5gltvJm4xtGJtx Kz6jPXPeD+XQ5HNXJ2BhEG7gDf7qRGVB3VjlkZ8743Lsd0rmUlbMS658wQEFtQG2N5oh IHCmGZM2X7PFzWdXEpcJnLOdZYHtCUhKLKaPVVNfOAE6Of5rScXnFfGJKcibsiMpyRnB GDaQ== X-Received: by 10.50.12.226 with SMTP id b2mr7670261igc.28.1360417877050; Sat, 09 Feb 2013 05:51:17 -0800 (PST) Received: from ?IPv6:2001:5c0:1000:a::33? ([2001:5c0:1000:a::33]) by mx.google.com with ESMTPS id u4sm19909347igw.6.2013.02.09.05.51.15 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 09 Feb 2013 05:51:16 -0800 (PST) Message-ID: <51165452.10600@gmail.com> Date: Sat, 09 Feb 2013 08:51:14 -0500 From: Michael Mol <mikemol@gmail.com> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130205 Thunderbird/17.0.2 Precedence: bulk List-Post: <mailto:gentoo-user@lists.gentoo.org> List-Help: <mailto:gentoo-user+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-user.gentoo.org> X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] {OT} LWP::UserAgent slows website References: <CAN0CFw0Zcn5BtzHbOVELrN+ihJ1B93+=Cr+YAfkSXJrSsuD__g@mail.gmail.com> <5113DA25.7060408@gmail.com> <CAN0CFw1bfy8huhECBFyn3H_XpOfJGPZ-BjPpXo5mGLaC_5ihHQ@mail.gmail.com> <CA+czFiCe1u=b9m+bt95Bdo9WAi6EULqBG1GqCRsZs62nWVon4w@mail.gmail.com> <CAN0CFw3hx7huykjkkujppjBcY=ZMhnYg=Sd1iM=gvvX3BxmoYg@mail.gmail.com> <5115BB67.9010307@gmail.com> <CAC=wYCFOOqSsRKLWAbAtfSh+g5kxK1sGC34SEBNQo6tYyJ_osg@mail.gmail.com> In-Reply-To: <CAC=wYCFOOqSsRKLWAbAtfSh+g5kxK1sGC34SEBNQo6tYyJ_osg@mail.gmail.com> X-Enigmail-Version: 1.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archives-Salt: 47ed02f5-0a67-4523-873a-57b65daf84a5 X-Archives-Hash: f91c8842602126e3a3636da5087047b2 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 02/09/2013 05:36 AM, Adam Carter wrote: > > There are several things you can do to improve the state of > things. The first and foremost is to add caching in front of the > server, using an accelerator proxy. (i.e. squid running in > accelerator mode.) In this way, you have a program which receives > the user's request, checks to see if it's a request that it already > has a response for, checks whether that response is still valid, > and then checks to see whether or not it's permitted to respond on > the server's behalf...almost entirely without bothering the main > web server. This process is far, far, far faster than having the > request hit the serving application's main code. > > > > I was under the impression that Apache coded sensibly enough to > handle incoming requests as least as well as Squid would. Agree > with everything else tho. Sure, so long as Apache doesn't have any additional modules loaded. If it's got something like mod_php loaded (extraordinarily common), mod_perl or mod_python (less common, now) then the init time of mod_php gets added to the init time for every request handler. > OP should look into what's required on the back end to process > those 6 requests, as it superficially appears that a very small > number of requests is generating a huge amount of work, and that > means the site would be easy to DoS. Absolutely, hence the steps I outlined to reduce or optimize backend processing. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRFlRSAAoJED5TcEBdxYwQ7BwH/Aj3hgQgGjzBoQhlZqPKDzEW pZJJVcVf4CF4sk88el8X/hPMfx2cTpuM53tLDsv3KGR1dwjP48O2oiiTubH/HRxI lNR5I22QK2YEbLzeRTZN+pkpGnyA1W+d3kF7F9aiNXVUV8KyuyxSxx+7Xm1tRW/W xcNhSLTQIpyTAx+R9MGNkJFs0gFGFgIMML4bfi5BpIrbeeVWsoe1C0syFF+HIFWP WZRtsCFhdWrZkvKUYIBkoFq9VKkSTt13eIvrPjxFUVJwFSmntxSgfqiaZxfHXp5A oSLtyz0vR6qByoivkuilNK7sI3fK8fHA0q4XF1AUaOuwcHg9AFG9pCFBUF2KOgk= =R/kD -----END PGP SIGNATURE-----