Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id D41326502DD for ; Wed, 23 Jul 2008 14:39:31 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 62894-05-2 for ; Wed, 23 Jul 2008 14:39:05 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from ag-out-0708.google.com (ag-out-0708.google.com [72.14.246.245]) by postgresql.org (Postfix) with ESMTP id 649E3650248 for ; Wed, 23 Jul 2008 14:25:38 -0300 (ADT) Received: by ag-out-0708.google.com with SMTP id 31so17362249agc.5 for ; Wed, 23 Jul 2008 10:25:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=YsmaA9+TPloRA1tMtiHqi7Au9fedrD2Ke2kLZx3yVxE=; b=WLT0Z+p1t1GhHUc8pkLmVV1c/WwOrQRFiNxJhOd3c0PD+seWfA4Y2iGOggAEdjwsOK c4/cF/93M6186iza5EA4I/uFuZMd4rUNp6kTYpQnWbdlKhTzy+mY2ZfPxI/1cZ+Hss17 7cWHHC359XzyiP/dPGeRv9meXXt3y6zD6K2bs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=xgM/1KozXvfn75Em5cQHh98Hqc0ZMFL7hVkVSOfCGpt6Gk2ZM0+3GezELJAq/an9nH z54bostSZyw/hEyybx/Qu+pogDUavEX62VhKeB/4MqRfSPXJ7YQB7piqSe99aortD0Eq Pr5ydJZGobUYOVWk2OgElv6ZdlOp9rwwBxn/4= Received: by 10.114.24.5 with SMTP id 5mr5419wax.160.1216833935643; Wed, 23 Jul 2008 10:25:35 -0700 (PDT) Received: by 10.114.130.17 with HTTP; Wed, 23 Jul 2008 10:25:35 -0700 (PDT) Message-ID: Date: Wed, 23 Jul 2008 11:25:35 -0600 From: "Scott Marlowe" To: Miernik Subject: Re: how to fix problem then when two queries run at the same time, it takes longer to complete then if run in sequence Cc: pgsql-performance@postgresql.org In-Reply-To: <20080723152112.30A4.0.NOFFLE@turbacz.local> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080723152112.30A4.0.NOFFLE@turbacz.local> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200807/216 X-Sequence-Number: 30816 On Wed, Jul 23, 2008 at 9:21 AM, Miernik wrote: > I have a PostgreSQL database on a very low-resource Xen virtual machine, > 48 MB RAM. When two queries run at the same time, it takes longer to > complete then if run in sequence. Is there perhaps a way to install > something like a query sequencer, which would process queries in a FIFO > manner, one at a time, even if a new query comes before the last one > running is finished, it would not give the new query to the server > before the one running now finishes? That would greatly improve > performance. > > Any tips in general for running PostgreSQL on such low-resource machine? > > I have: > > shared_buffers = 5MB > work_mem = 1024kB > > are these good values, or could perhaps changing something improve it a > bit? Any other parameters to look at? Well, you're basically working on a really limited machine there. I'd set shared buffers up by 1 meg at a time and see if that helps. But you're basically looking at a very narrow problem that most people won't ever run into. Why such an incredibly limited virtual machine? Even my cell phone came with 256 meg built in two years ago.