pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Stark <gsstark@mit.edu>
To: Grzegorz Jaśkiewicz <gryzman@gmail.com>
Cc: S Arvind <arvindwill@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Running some query in low priority
Date: Thu, 5 Nov 2009 11:32:22 +0000
Message-ID: <407d949e0911050332n5ef355c1y156dcd26aa28d222@mail.gmail.com> (raw)
In-Reply-To: <2f4958ff0911050138n3f246b7ck6182cb702ac48e91@mail.gmail.com>
References: <abf9211d0911050136g48739f0ft53b63f96cddf706@mail.gmail.com>
	<2f4958ff0911050138n3f246b7ck6182cb702ac48e91@mail.gmail.com>

2009/11/5 Grzegorz Jaśkiewicz <gryzman@gmail.com>:
>
>
> On Thu, Nov 5, 2009 at 9:36 AM, S Arvind <arvindwill@gmail.com> 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(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. 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



view thread (8+ messages)  latest in thread

Message-ID: <407d949e0911050332n5ef355c1y156dcd26aa28d222@mail.gmail.com>
Permalink:  ../407d949e0911050332n5ef355c1y156dcd26aa28d222@mail.gmail.com/
Also on:    postgresql.org/message-id/407d949e0911050332n5ef355c1y156dcd26aa28d222@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: gsstark@mit.edu, gryzman@gmail.com, arvindwill@gmail.com
  Subject: Re: Running some query in low priority
  In-Reply-To: <407d949e0911050332n5ef355c1y156dcd26aa28d222@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox