pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Aaron Bono <postgresql@aranya.com>
To: Postgresql Admin <pgsql-admin@postgresql.org>
Subject: Controlling CPU Usage in PostgreSQL
Date: Mon, 31 Jul 2006 03:06:06 -0500
Message-ID: <bf05e51c0607310106w415fe34ep4b5046984cd11341@mail.gmail.com> (raw)

I have a nightly process that runs in production to refresh reports.  This
process runs fine but takes a significant portion of the CPU for an hour or
so.  I was wanting to limit this particular process so it does not consume
the full CPU while running (unless nothing else needs the CPU cycles
anyway).

Is there a way I can tell PostgreSQL to give session a low priority so even
if it does take the full CPU, it only does so if it would otherwise be
idle?  This process runs a series of functions so if there is a command I
can put at the beginning of each function, that would be ideal.  I would
rather do it after logging into PostgreSQL and not by limiting the process
at the OS level though that may be an option if there is nothing better.

Of course, if there are other ways to approach this, I am quite open to
alternatives.

Thanks,
Aaron

==================================================================
   Aaron Bono
   Aranya Software Technologies, Inc.
   http://www.aranya.com
==================================================================

view thread (8+ messages)  latest in thread

Message-ID: <bf05e51c0607310106w415fe34ep4b5046984cd11341@mail.gmail.com>
Permalink:  ../bf05e51c0607310106w415fe34ep4b5046984cd11341@mail.gmail.com/
Also on:    postgresql.org/message-id/bf05e51c0607310106w415fe34ep4b5046984cd11341@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: postgresql@aranya.com
  Subject: Re: Controlling CPU Usage in PostgreSQL
  In-Reply-To: <bf05e51c0607310106w415fe34ep4b5046984cd11341@mail.gmail.com>
  References: <bf05e51c0607310106w415fe34ep4b5046984cd11341@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