Re: low priority postmaster threads? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: low priority postmaster threads?
Date
Msg-id 12228.982791712@sss.pgh.pa.us
Whole thread Raw
In response to low priority postmaster threads?  (Chris Storah <cstorah@emis-support.demon.co.uk>)
Responses Re: low priority postmaster threads?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Chris Storah <cstorah@emis-support.demon.co.uk> writes:
> Is there any way in psql to connect to a database and reduce the run
> priority of the child thread it kicks off ?
> i.e. equivalent of 'nice' on the thread?

Not at the moment, though it'd be a fairly trivial hack on postgres.c
to add a "-nice n" backend switch, which you could then specify at
connection time via PGOPTIONS.

> What I am looking for is a postgres system that runs 100 users or so at
> 'full speed', and major day long queries at a 'when idle' priority.

The trouble here is that CPU nice doesn't (on most platforms) change the
behavior of the I/O scheduler, so this would only be of use to the
extent that your queries are CPU bound and not I/O bound.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Vince Vielhaber
Date:
Subject: Re: beta5 ...
Next
From: Peter Eisentraut
Date:
Subject: Re: PHP 4.0.4pl1 / Beta 5