pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <smarlowe@g2switchworks.com>
To: Madison Kelly <linux@alteeve.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Setting "nice" values
Date: Thu, 02 Nov 2006 09:20:36 -0600
Message-ID: <1162480836.28047.20.camel@state.g2switchworks.com> (raw)
In-Reply-To: <454A0B69.9070000@alteeve.com>
References: <454A0B69.9070000@alteeve.com>

On Thu, 2006-11-02 at 09:14, Madison Kelly wrote:
> Hi all,
> 
>    I've got a script (perl, in case it matters) that I need to run once
> a month to prepare statements. This script queries and updates the
> database a *lot*. I am not concerned with the performance of the SQL
> calls so much as I am about the impact it has on the server's load.
> 
>    Is there a way to limit queries speed (ie: set a low 'nice' value on
> a query)? This might be an odd question, or I could be asking the
> question the wrong way, but hopefully you the idea. :)

While you can safely set the priority lower on the calling perl script,
setting db backend priorities lower can result in problems caused by
"priority inversion"  Look up that phrase on the pgsql admin, perform,
general, or hackers lists for an explanation, or go here:

http://en.wikipedia.org/wiki/Priority_inversion

I have a simple script that grabs raw data from an oracle db and shoves
it into a postgresql database for reporting purposes.  Every 100 rows I
put into postgresql, I usleep 10 or so and the load caused by that
script on both systems is minimal.  You might try something like that.



view thread (14+ messages)  latest in thread

Message-ID: <1162480836.28047.20.camel@state.g2switchworks.com>
Permalink:  ../1162480836.28047.20.camel@state.g2switchworks.com/
Also on:    postgresql.org/message-id/1162480836.28047.20.camel@state.g2switchworks.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: smarlowe@g2switchworks.com, linux@alteeve.com
  Subject: Re: Setting "nice" values
  In-Reply-To: <1162480836.28047.20.camel@state.g2switchworks.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