Re: optimal memory

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: optimal memory
Дата
Msg-id AANLkTikDp2SVyJ4w_8=4WVKaLqYC0tNov0ToN6Wwt+N6@mail.gmail.com
обсуждение исходный текст
Ответ на optimal memory  (Sim Zacks <sim@compulab.co.il>)
Ответы Re: optimal memory  (Sim Zacks <sim@compulab.co.il>)
Список pgsql-general
2010/8/3 Sim Zacks <sim@compulab.co.il>:
> Is there a way to tell what the optimal memory is for a specific
> postgresql instance?
>
> I am configuring Xen virtual machines and I don't want to give it more
> then it needs.
>
> Would looking at the swap be an indication? As soon as it starts to use
> swap, that means I need more, but until that point, I have enough?

Once you start using swap space it's WAY too small.  If your db is say
1GB, and you have 10 or so connections running at once, and each might
need 20MB of work_mem, then it would be good to at least 2Gig or so so
that the db can be cached by the cache and you've got enough memory
left over for the db to allocate enough shared_buffers to hold a
decent chunk of it (say 256 to 512Meg).

OTOH, if your database is 1TB in size, then you can't really have too
much memory, as every bit you throw at the machine will help.

So, about how big is your db?  How many users are likely to be running
queries at once?  How big of a chunk of data are those users likely to
each need for sorts etc?

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

Предыдущее
От: "A. Kretschmer"
Дата:
Сообщение: Re: optimal memory
Следующее
От: Sim Zacks
Дата:
Сообщение: Re: optimal memory