Re: Limiting processor power on queries

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Ron Mayer" <ron(at)intervideo(dot)com>
Cc: "Josh Berkus" <josh(at)agliodbs(dot)com>, "Chad Thompson" <chad(at)weblinkservices(dot)com>, "pgsql-novice" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Limiting processor power on queries
Date: 2003-06-19 02:46:46
Message-ID: 5875.1055990806@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Ron Mayer" <ron(at)intervideo(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message HK 2003-06-19 06:14:17 can we use PQstatus for knowing connection status
Previous Message Tom Lane 2003-06-19 02:40:48 Re: "Bad date external representation"