Re: Setting oom_adj on linux?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Setting oom_adj on linux?
Дата
Msg-id 8716.1262971458@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Setting oom_adj on linux?  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: Setting oom_adj on linux?
Список pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
> * Tom Lane (tgl@sss.pgh.pa.us) wrote:
>> I don't want to go to the trouble of creating (and documenting) a
>> configure option for this.  Much less a GUC ;-)

> Requiring a custom build to disable it would be horrible, in my view.
> Or, at best, just means that the packagers won't enable it, which
> obviously would be less than ideal.

I'm a packager, and I think that this approach is perfectly fine.
The place where the rubber meets the road is in the init script,
which is the packager's responsibility.  If the packager is going
to provide an init script that sets oom_adj in the first place,
he can turn on the compensation code inside the binary.  If not,
the compensation code has no purpose anyhow.  There are no moving
parts in this as far as the end user is concerned.

> Sorry if it's a pain, but I think it needs to either be configurable or
> not done.  As I said before, it definitely needs to handle failure
> gracefully,

We just ignore any error from the attempt to write to /proc.

> but I worry that even that won't be sufficient in some
> cases.  Just thinking about how we run PG under VServers and Linux
> Containers and whatnot,

I think you are missing the point that the code won't even be compiled
except on platforms where the packager has determined that it's sensible
to have it.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: RFC: PostgreSQL Add-On Network
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Setting oom_adj on linux?