From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id EB64C1389A3 for ; Mon, 11 Feb 2013 17:43:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6FA2B21C04E; Mon, 11 Feb 2013 17:43:39 +0000 (UTC) Received: from mail-ie0-f174.google.com (mail-ie0-f174.google.com [209.85.223.174]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CD01B21C001 for ; Mon, 11 Feb 2013 17:43:37 +0000 (UTC) Received: by mail-ie0-f174.google.com with SMTP id k10so7999174iea.33 for ; Mon, 11 Feb 2013 09:43:36 -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=2A3De16l3eOnh7JGbP6G6ctQ8YFytoQzKk7mRNctKWE=; b=ffY6edcQpVa6O8neLguw+Jvhe0PhJX9jdcnbF3WNRGrmBEfkZeSAlMrIqtHH1fgQLr XHsUD9Kb5uV4BFLilhhOYxfug2Y1MBqDW0rLAPzGV+nzrDaDdx036wOjpuNAy8GOUyk3 qbspsF43ydZFw4oCEZc/fP3g/fmufha+ialP4NwT66RmqielE5pAVVafUWeyvblrgSLx 4gZYGQOZJyry6j9xGAAHg7bjcw+ERYin0kYnUS/jqWx5j/fqR/pUQQyNwJse+RKXTBPu gg7vif0xUImicKw0ivJUUTf3TejHC87YZsobh5RTsxl2IgVhWzCXUegD0vJ3JJA+foT2 giJg== X-Received: by 10.50.33.173 with SMTP id s13mr13053353igi.23.1360604616845; Mon, 11 Feb 2013 09:43:36 -0800 (PST) Received: from ?IPv6:2001:5c0:1000:a::873? ([2001:5c0:1000:a::873]) by mx.google.com with ESMTPS id uy13sm29140432igb.7.2013.02.11.09.43.34 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 11 Feb 2013 09:43:35 -0800 (PST) Message-ID: <51192DC5.6040802@gmail.com> Date: Mon, 11 Feb 2013 12:43:33 -0500 From: Michael Mol User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130205 Thunderbird/17.0.2 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail 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: <5113DA25.7060408@gmail.com> <5115BB67.9010307@gmail.com> In-Reply-To: X-Enigmail-Version: 1.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archives-Salt: 5da8c825-38d4-419b-8c54-62be2545f179 X-Archives-Hash: 808fb61380e72b02877958541425c051 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 02/10/2013 12:05 AM, Grant wrote: >>> The responses all come back successfully within a few seconds. >>> Can you give me a really general description of the sort of >>> problem that could behave like this? >> >> Your server is just a single computer, running multiple >> processes. Each request from a user (be it you or someone else) >> requires a certain amount of resources while it's executing. If >> there aren't enough resources, some of the requests will have to >> wait until enough others have finished in order for the resources >> to be freed up. > > Here's where I'm confused. The requests are made via a browser and > the response is displayed in the browser. There is no additional > processing besides the display of the response. You're running a client-side script that causes the *server* to do work. The more work the server has to do, the slower it will perform for both serving up your requests and those of other users. This is completely independent of the work the client has to do. > The responses are received and displayed within about 3 seconds of > when the requests are made. Shouldn't this mean that all > processing related to these transactions is completed within 3 > seconds? There's client-side processing in handling the server's response, but there's also server-side processing in handling the client's request. What Stroller called a wall of text was a crash course in how a server can have too many things to do in a short amount of time, and some of the side-effects you can see--like having two nominally-3s queries both appear to take 6s, from the client's perspective. > If so, I don't understand why apache2 seems to bog down a bit for > about 10 minutes afterward. 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. Why, exactly, the server is consuming so much memory depends on a lot of factors. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRGS3FAAoJED5TcEBdxYwQs7oH/3Xy0d85bNJ2QtQ4YcTF7g9E TPZbwAUrwxrYf828AMlCUMOww2d1wr0DQOm4lBrzOb/93C8iwGKTjtu1dBaOspdC mEdVmkFXF8YUB8yA3SiSgteHNCDrN27UyJQNP7mOK8PXwri4BYyxTUEJ0UyZXc4F oIoSweHQg7tmyKN7Rudd69axREJ9yIpKt4lw7JZWHhX25hTVxWYF1zRDxNNC1vJ+ kQWSE3ZcP8EdotmcpARPF7N4leHOyU1+Rw9XatLVbb2W23Fza/4+Mqeam9fbObgH w1mdMCzIUxlUL91nU7Zc0zzb2qYS7Te1N7bOcFr1fXowcCBagUdzOKjEcshket0= =sWpw -----END PGP SIGNATURE-----