Is it better to use OS cache or max out memory usage of PostgreSQL?

Поиск
Список
Период
Сортировка
От Andy DePue
Тема Is it better to use OS cache or max out memory usage of PostgreSQL?
Дата
Msg-id 3CE26E07.9080908@eworksmart.com
обсуждение исходный текст
Ответы Re: Is it better to use OS cache or max out memory usage of PostgreSQL?  (Andrew Sullivan <andrew@libertyrms.info>)
Список pgsql-general
Hello all,
  I think I've figured out that posting to the newsgroup doesn't work. :-)
  Which is more effecient, to setup PostgreSQL to use as much system RAM as possible (for example, setting up 800MB for PostgreSQL on a 1GB system), or to keep PostgreSQL memory usage to something like 25% of RAM and depend on the OS (in this case, Linux) file system cache to optimize memory usage?
  At first glance, it would seem that depending on the OS file system cache would not be the way to go... If PostgreSQL needs data and that data is not in PostgreSQL's shared memory, then PostgreSQL must go out and retrieve the data from the filesystem (I'm guessing).  If the OS has cached the data, then the data is effectively copied from the OS cache into PostgreSQL's memory... not only is there the overhead of copying the data, but now there are two copies of it in memory.  However, I have been told in the past that it is indeed better to keep PostgreSQL memory usage small and depend more on the OS file system cache.  What is the right balance?

   Thanks in advance,
        Andy

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

Предыдущее
От: Jean-Luc Lachance
Дата:
Сообщение: Re: Spped of max
Следующее
От: Bill Gribble
Дата:
Сообщение: (security) Rules of thumb for escaping user input?