Controlling CPU Usage in PostgreSQL

From: "Aaron Bono" <postgresql(at)aranya(dot)com>
To: "Postgresql Admin" <pgsql-admin(at)postgresql(dot)org>
Subject: Controlling CPU Usage in PostgreSQL
Date: 2006-07-31 08:06:06
Message-ID: bf05e51c0607310106w415fe34ep4b5046984cd11341@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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
==================================================================

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Thomas Pundt 2006-07-31 09:01:36 Re: Controlling CPU Usage in PostgreSQL
Previous Message Dilipkumar 2006-07-31 04:41:23 Re: Scheduled backup in postgresql