Re: Controlling memory of session

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Controlling memory of session
Дата
Msg-id 20070118123734.GC29963@svana.org
обсуждение исходный текст
Ответ на Re: Controlling memory of session  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-general
On Thu, Jan 18, 2007 at 11:52:12AM +0100, Magnus Hagander wrote:
> > Not knowing how much RAM can take the server is annoying. You have to be
> > extra careful and scale the server down as you don't know what will happen.
>
> The fact that work_mem is "per sort" and not "per backend" is going to
> cause you more problems than the overhead in trying to figure out how
> far you can do. The fact that there is no "work_mem per backend" is
> certainly very annoying, but it's obviously hard to fix or it would've
> been fixed already :-)

If you knew beforehand how much memory you were going to need, you
wouldn't need to run any queries because you'd know the answers already
:)

What exactly would you expect to happen? At some point you run a query
and it says "out of memory", even though your machine has masses of
memory left over? A bit like VM overcommit?

If you know your queries don't generally use more than one sort, it's
fairly easy to estimate memory usage. The best way to find out how many
backends you can handle is: simulation. Anything else is guesswork.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

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

Предыдущее
От: Frank Wittig
Дата:
Сообщение: Re: Get SQL dump from readonly FS
Следующее
От: Bill Moran
Дата:
Сообщение: Re: Index bloat of 4x