Re: PostgreSQL Performance on OpenBSD

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: PostgreSQL Performance on OpenBSD
Дата
Msg-id m3of1w2irn.fsf@varsoon.wireboard.com
обсуждение исходный текст
Ответ на Re: PostgreSQL Performance on OpenBSD  ("scott.marlowe" <scott.marlowe@ihs.com>)
Список pgsql-general
"Jim C. Nasby" <jim@nasby.net> writes:

> On Mon, May 19, 2003 at 08:50:31PM -0400, Doug McNaught wrote:

> > Per-connection is easy: 'man ulimit'
> >
> > Across all connections is possible if your system supports per-user
> > limits (in addition to per-process) but otherwise all the bookkeeping
> > would have to be done in the server, kept in shared memory and managed
> > with a semaphore.  Somehow I doubt you'd get that patch accepted.  :)
>
> Where would you do the ulimit? In the pgsql ~/.profile?

In whatever script starts the postmaster.

> More importantly, what happens when this limit is hit? I'm guessing the
> engine would fail, which isn't very helpful. If the server tracked
> resource usage on it's own, it would be able to throttle back things
> like sort memory when things started getting tight.

That's a lot of overhead for a feature that's not needed for most
installations.

It's already not that hard to put a crude limit on memory usage: set
your shared buffers and sort_mem appropriately, taking into account
the number of connections expected and the memory in the system.  I
fail to see how more detailed resource accounting would be a win,
given that the application doesn't know what other apps are on the
system and how close it is to the swap limit at any given time.

-Doug

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ERROR: Memory exhausted in AllocSetAlloc(188)
Следующее
От: nolan@celery.tssi.com
Дата:
Сообщение: Re: DBI connection to multiple database