Re: Resource allocation? - Mailing list pgsql-hackers

From Neil Conway
Subject Re: Resource allocation?
Date
Msg-id 689438E4-9E67-11D8-9D77-000A95AB279E@samurai.com
Whole thread Raw
In response to Resource allocation?  (David Fetter <david@fetter.org>)
List pgsql-hackers
On 4-May-04, at 2:18 PM, David Fetter wrote:
> I'd like to be able to run large batch-process jobs for caching, but
> limit the total resource utilization on them, something like nice(1).
> Better still would be some way to put a max on total resources & be
> able to allocate from that.
>
> Does PostgreSQL have facilities for such a thing?

Well, nice(1) does not limit resource allocation, it changes the 
scheduling priority of a process -- ISTM the two features are largely 
orthogonal.

Limits on resource allocation (i.e. essentially quotas, getrlimit() and 
so on) would be cool; some other people have expressed interest in them 
in the past.

Implementing "batch processes" would be trickier: it seems to me that a 
naive implementation would fall prey to priority inversion. It should 
definitely possible to do, though. If you're interested, have at it :-)

-Neil



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Multiple Xids in PGPROC?
Next
From: jihuang
Date:
Subject: Re: ERROR: heapgettup: failed ReadBuffer