Re: Scaling further up

From: Matt Davies <matt(at)mattdavies(dot)net>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Scaling further up
Date: 2004-03-15 20:28:35
Message-ID: 1079382515.405611f35f1c5@www.mattdavies.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Quoting Andrew Sullivan <ajs(at)crankycanuck(dot)ca>:

> On Fri, Mar 12, 2004 at 06:25:48PM -0500, Anjan Dave wrote:
> > We upgraded from 8GB to 12GB RAM a month or so ago, but even in the
> > past, I've never seen the system exhaust on it's system cache (~6GB, in
> > 'top'), while it's swapping.
> >
> > Some one had mentioned why not have the entire DB in memory? How do I
> > configure that, for knowledge?
>
> You don't. It'll automatically be in memory if (a) you have enough
> memory, (b) you don't have anything else on the machine using the
> memory, and (c) it's been read at least one time.

This is the preferred method, but you could create a memory disk if running
linux. This has several caveats, though.

1. You may have to recompile the kernel for support.
2. You must store the database on a hard drive partition during reboots.
3. Because of #2 this option is generally useful if you have static content that
is loaded to the MD upon startup of the system.

You could have some fancy methodology of shutting down the system and then
copying the data to a disk-based filesystem, but this is inherently bad since
at any moment a power outage would erase any updates changes.

The option is there to start with all data in memory, but in general, this is
probablt not what you want. Just an FYI.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Rosser Schwarz 2004-03-15 20:28:46 atrocious update performance
Previous Message Andrew Sullivan 2004-03-15 20:09:31 Re: Scaling further up