From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-user+bounces-145252-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 4AA431389A6
	for <garchives@archives.gentoo.org>; Mon, 11 Feb 2013 19:59:25 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id C50D021C042;
	Mon, 11 Feb 2013 19:59:06 +0000 (UTC)
Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172])
	(using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 14E1021C00B
	for <gentoo-user@lists.gentoo.org>; Mon, 11 Feb 2013 19:59:04 +0000 (UTC)
Received: by mail-wi0-f172.google.com with SMTP id ez12so3600710wid.5
        for <gentoo-user@lists.gentoo.org>; Mon, 11 Feb 2013 11:59:03 -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:content-type:content-transfer-encoding;
        bh=SXuZBiQWcth9j8vwCOcBzuxGnvIPxafI8YwRI5aieos=;
        b=YQbNPvs0KgC9/glkgG/l+6ZrbGxhqm4acLt/sNsFiqjzbbHFYwV8EiZE0bMPgCNTd5
         0NPlw08OjIIHBBiOTDvDfQzbXVF3jOldeK0Mkiad8EZExRBeCo9TnhME99VSNrFrb2du
         oqkhfoB2kYysGrU5z08ENbRvQusRW2B20tj6XN/06zngb18pkA6JCCQMIOyQtf15yZDA
         2sRXDrK37Ae9Dn+QcnymLk+mdsCP95HwidHOgs0Oyj4skPsqsXbX4NRZLShS9P7TpkXH
         WlMRZG6Se9QCZsNe0NYgt47YAOn0a4ouFq7MZ21uk1Fom/CfBC7I2e9YyptLKUDvG7PZ
         w2+g==
X-Received: by 10.194.80.2 with SMTP id n2mr26163634wjx.14.1360612743661;
        Mon, 11 Feb 2013 11:59:03 -0800 (PST)
Received: from [172.20.0.41] (196-215-209-80.dynamic.isadsl.co.za. [196.215.209.80])
        by mx.google.com with ESMTPS id ex15sm20616382wid.5.2013.02.11.11.59.00
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Mon, 11 Feb 2013 11:59:02 -0800 (PST)
Message-ID: <51194D41.8010508@gmail.com>
Date: Mon, 11 Feb 2013 21:57:53 +0200
From: Alan McKinnon <alan.mckinnon@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130114 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> <CAN0CFw25qnTpJ+6ZHMCErT1wdAU4GeNnaXg+=UwoZPj9MxWGcQ@mail.gmail.com> <51192DC5.6040802@gmail.com>
In-Reply-To: <51192DC5.6040802@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Archives-Salt: 1ed9ddd0-a43a-4a06-9b32-3b15e9943ae0
X-Archives-Hash: 84d2f40531bf7b6e3912eacf298d91e6

On 11/02/2013 19:43, Michael Mol wrote:
> Now that's a new (and important!) piece of information. Your server
> runs slow for 10 *minutes* after your script has made its request?
> 
> To me, that indicates that important data wound up getting swapped to
> disk on the server, and the slow behavior reported by other users is
> the result of that data being swapped back in on-demand.
> 
> That also indicates that your script's requests (and, possibly,
> request pattern) cause some process in the server to allocate far more
> memory than usual, which is why the server is swapping things to disk.


I agree. My rule of thumb was always that I must prevent Apache swapping
at all costs as the performance impact is horrific.

It doesn't have to mean installing more RAM (which is quick, easy, cheap
and often rather effective), sensible optimizations can work wonders
too, as can nginx as a proxy in front of Apache.



-- 
Alan McKinnon
alan.mckinnon@gmail.com