Re: How much RAM is too much ?

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: A J <s5aly(at)yahoo(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: How much RAM is too much ?
Date: 2010-07-22 21:03:06
Message-ID: AANLkTimrtHW5qldCkyWvQneBPZUz19vNyVu28rt8XYUk@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Jul 22, 2010 at 2:45 PM, A J <s5aly(at)yahoo(dot)com> wrote:
> Cost aside, are there any technical factors to consider before increasing
> RAM (assuming the system can support it) ? Is there a sweet spot beyond
> which more RAM does not help Postgres or actually harms ?
> If my database is only couple of hundred Gigs, can I not just have RAM that
> big and have read from buffer all the time ?

On some architectures, as you add memory the memory itself becomes
slower. In the old days it was Intel's brain dead VX pentium
architecture that could only cache the first 64Megs of ram but could
handle 256M that had issues. Since windows tended to load things from
the top of memory down, having > 64 Meg could make a machine
noticeably slower.

Nowadays it's nothing so drastic. Some hardware can only support say
800MHz memory with 2 or 4 banks of DRAM, then 667, then 500 as you
fill them up. I avoid hardware like that since dbs are often memory
hungry machines.

Most modern machines are actually faster as you add memory because it
can now address more banks at the same time, and with AMD and Intel's
latest creations more banks filled is almost always a win. To the
point that having the same amount of memory, but using smaller DIMMs
makes the machine faster than using fewer, larger DIMMs.

Generally speaking, unless your hardware is the kind that acts up with
more memory, no, adding memory will almost never hurt. But once you
can cache your entire db with some room to spare in memory, adding
memory won't usually help.

So, what CPU / Memory architecture are you running?

-- To understand recursion, one must first understand recursion.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Greg Smith 2010-07-22 23:48:40 Re: How much RAM is too much ?
Previous Message Kevin Grittner 2010-07-22 20:55:29 Re: How much RAM is too much ?