From: | Andy DePue <adepue(at)eworksmart(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Is it better to use OS cache or max out memory usage of PostgreSQL? |
Date: | 2002-05-15 14:17:43 |
Message-ID: | 3CE26E07.9080908@eworksmart.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Jean-Luc Lachance | 2002-05-15 14:24:55 | Re: Spped of max |
Previous Message | Evgeniy Strokin | 2002-05-15 13:58:18 | XML from postgreSQL tables |