X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 57AC9529D2 for ; Tue, 2 Aug 2005 14:00:46 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 53174-02 for ; Tue, 2 Aug 2005 17:00:34 +0000 (GMT) Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by svr1.postgresql.org (Postfix) with ESMTP id F032452E8E for ; Tue, 2 Aug 2005 14:00:30 -0300 (ADT) Received: from mainbox.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id DC2B540C3C5; Tue, 2 Aug 2005 18:00:17 +0100 (BST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id 304D815EDA; Tue, 2 Aug 2005 17:54:56 +0100 (BST) Received: from mainbox.archonet.com ([127.0.0.1]) by localhost (mainbox [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 06583-10; Tue, 2 Aug 2005 17:54:53 +0100 (BST) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 1D39C15ED9; Tue, 2 Aug 2005 17:54:53 +0100 (BST) Message-ID: <42EFA55C.3080903@archonet.com> Date: Tue, 02 Aug 2005 17:54:52 +0100 From: Richard Huxton User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: Tobias Brox , pgsql-performance@postgresql.org Subject: Re: "nice"/low priority Query References: <20050802160434.GD9278@tobias.lan> <11484.1122999570@sss.pgh.pa.us> In-Reply-To: <11484.1122999570@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.057 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200508/22 X-Sequence-Number: 13769 Tom Lane wrote: > Tobias Brox writes: > >>Is there any ways to give postgresql a hint that a >>particular SQL call should be run at lower priority? Since every db >>connection has a pid, I can manually run "renice" to scheduele it by the OS >>- but of course I can't do it manually all the time. > > And it won't help you anyway, because renice only affects CPU priority > not I/O scheduling ... which, by your description, is the real problem. > > I think the only thing that's likely to help much is trying to arrange > that the "simple" queries only need to touch pages that are already in > memory. Some playing around with shared_buffer sizing might help. > Also, if you're not on PG 8.0.*, an update might help. Would it be useful to be able to re-use the vacuum_cost_xxx settings in 8.0 for this sort of thing? I'm thinking a long-running report query isn't that different from a vacuum. -- Richard Huxton Archonet Ltd