Re: Limiting processor power on queries - Mailing list pgsql-novice

From Tom Lane
Subject Re: Limiting processor power on queries
Date
Msg-id 5875.1055990806@sss.pgh.pa.us
Whole thread Raw
In response to Re: Limiting processor power on queries  ("Ron Mayer" <ron@intervideo.com>)
List pgsql-novice
"Ron Mayer" <ron@intervideo.com> writes:
> Josh wrote:
>> You cannot cap CPU usage in *any* way unless you are using a "real time
>> operating system", like QNX or Real Time Linux, or some of the radical
>> patches for Linux kernel 2.5.  And PostgreSQL has not been ported to any of
>> those systems AFAIK, so you're on your own ...

FWIW, we did have a working QNX port until recently.  It's suffering bit
rot for lack of a maintainer (Andreas hasn't been seen for awhile :-()
but certainly it could be resurrected if someone wanted to put in some
effort.

> How about "man ulimit" whose man page hasn't changed since Linux 2.0?
> The csh command "limit cputime 1" will happily limit child processes
> to 1 second of CPU time, and any process exceeding this limit will
> die with a SIGXCPU.

Which the postmaster will (indeed must) take as a backend crash prompting
a database-wide restart.  This is not gonna be a useful technique.

            regards, tom lane

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: "Bad date external representation"
Next
From: HK
Date:
Subject: can we use PQstatus for knowing connection status