Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 79CFE633776 for ; Thu, 5 Nov 2009 09:21:07 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 43491-03 for ; Thu, 5 Nov 2009 13:20:43 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pw0-f44.google.com (mail-pw0-f44.google.com [209.85.160.44]) by mail.postgresql.org (Postfix) with ESMTP id B0ACD6336A0 for ; Thu, 5 Nov 2009 09:20:41 -0400 (AST) Received: by pwj15 with SMTP id 15so897933pwj.3 for ; Thu, 05 Nov 2009 05:20:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=loAan6iRspH5FtyuWdbEqtFwtOQ91lHAP4VhP9C9hxs=; b=c/RPxQr2XEpaOpG6YQB5ag4ivroSz55pCbx1Kc55CWu4/SNSQRfhjYQjDA/8+x1x+x Z+Ovyo4nWSbgDsS0Ltq21k+2mS0qfa+iowojbpQfsEycBtLyZTDLSjO8W+oKP35XYeH+ p7W/VM/OJLFV0B2wrqbzITO6D+JCIamCNpYFA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=d7NJSNcv7Mbq4jEMuWtYSrOPkV1tjUnKdydUBQl7XZQRvGmR0uVtNYbldwStdGPiS4 mawZ3AKY0GwzucvXzET1h8zHxHASQh+uPA3otI4W/JnvA7z93QbbmSIvP8lrakj5XnJe sQLZlDq3xXAhSqbuxmiqXbtZ1YvgViY2F6Shc= MIME-Version: 1.0 Received: by 10.114.10.4 with SMTP id 4mr4923492waj.105.1257427239233; Thu, 05 Nov 2009 05:20:39 -0800 (PST) In-Reply-To: <407d949e0911050332n5ef355c1y156dcd26aa28d222@mail.gmail.com> References: <2f4958ff0911050138n3f246b7ck6182cb702ac48e91@mail.gmail.com> <407d949e0911050332n5ef355c1y156dcd26aa28d222@mail.gmail.com> From: S Arvind Date: Thu, 5 Nov 2009 18:50:19 +0530 Message-ID: Subject: Re: Running some query in low priority To: pgsql-performance@postgresql.org Content-Type: multipart/alternative; boundary=00504502e173ece9b004779f9781 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.598 tagged_above=-10 required=5 tests=BAYES_00=-2.599, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200911/66 X-Sequence-Number: 36234 --00504502e173ece9b004779f9781 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thank Greg and Grzegorz, As told i have large batch load to the postgres which i need to be run in low priority. Is it really throttling the data will help to lower th= e postgres workload for some queries? -Arvind S 2009/11/5 Greg Stark > 2009/11/5 Grzegorz Ja=C5=9Bkiewicz : > > > > > > On Thu, Nov 5, 2009 at 9:36 AM, S Arvind wrote: > >> > >> Hi Developers and Tuners, > >> Is there any way to run some query in low priority and some > query > >> in higher priority in pg. The main reason for this is i need my main > >> application(high priority) to be undisturbed by the sub application(lo= w > >> priority) which is running on same DB. Is there anyother good way to > operate > >> this? > > > > other than manually re-nicing back end, no. > > And unfortunately this doesn't really work very well. renicing only > affects cpu priority and usually it's i/o priority you want to adjust. > Even if you can adjust i/o priority per process on your operating > system the database often does i/o work for one process in another > process or has times when a process is waiting on another process to > finish i/o. So lowering the i/o priority of the low priority process > might not have the desired effect of speeding up other processes. > > Usually this isn't a problem unless you have a large batch load or > something like that happening which consumes all available i/o. In > that case you can sometimes reduce the i/o demand by just throttling > the rate at which you send data to or read data from the server. > > > -- > greg > --00504502e173ece9b004779f9781 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thank Greg and Grzegorz,
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 As told i = have large batch load to the postgres which i need to be run in low priori= ty. Is it really throttling the data will help to lower the postgres worklo= ad for some queries?

-Arvind S



2009/11/5 Greg Stark <gsstark@mit.edu&= gt;
2009/11/5 Grzegorz Ja=C5=9Bkiewicz <gryzman@gmail.com>:
>
>
> On Thu, Nov 5, 2009 at 9:36 AM, S Arvind <arvindwill@gmail.com> wrote:
>>
>> Hi Developers and Tuners,
>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Is there any way = to run some query in low priority and some query
>> in higher priority in pg. The main reason for this is i need my ma= in
>> application(high priority) to be undisturbed by the sub applicatio= n(low
>> priority) which is running on same DB. Is there anyother good way = to operate
>> this?
>
> other than manually re-nicing back end, no.

And unfortunately this doesn't really work very well. renic= ing only
affects cpu priority and usually it's i/o priority you want to adjust.<= br> Even if you can adjust i/o priority per process on your operating
system the database often does i/o work for one process in another
process or has times when a process is waiting on another process to
finish i/o. So lowering the i/o priority of the low priority process
might not have the desired effect of speeding up other processes.

Usually this isn't a problem unless you have a large batch load or
something like that happening which consumes all available i/o. In
that case you can sometimes reduce the i/o demand by just throttling
the rate at which you send data to or read data from the server.


--
greg

--00504502e173ece9b004779f9781--