pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Merlin Moncure <mmoncure@gmail.com>
To: Charles A. Landemaine <landemaine@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Loading the entire DB into RAM
Date: Fri, 7 Apr 2006 11:29:57 -0400
Message-ID: <b42b73150604070829o3275125x49b6bc710170500@mail.gmail.com> (raw)
In-Reply-To: <e6575a30604070737n20b2d7a4l33ba51dcbf4527a@mail.gmail.com>
References: <e6575a30604070737n20b2d7a4l33ba51dcbf4527a@mail.gmail.com>

On 4/7/06, Charles A. Landemaine <landemaine@gmail.com> wrote:
> I have a web server with PostgreSQL and RHEL. It hosts a search
> engine, and each time some one makes a query, it uses the HDD Raid
> array. The DB is not very big, it is less than a GB. I plan to add
> more RAM anyway.
>
> What I'd like to do is find out how to keep the whole DB in RAM so
> that each time some one does a query, it doesn't use the HDD. Is it
> possible, if so, how?

don't bother.

If your database is smaller than ram on the box, the operating will
cache it quite effectively.  All you should be worrying about is to
set fsync=on (you care about your data) or off (you don't).  If your
data is truly static you might get better performance out of a
in-process data storage, like sqlite for example.

Merlin



view thread (7+ messages)  latest in thread

Message-ID: <b42b73150604070829o3275125x49b6bc710170500@mail.gmail.com>
Permalink:  ../b42b73150604070829o3275125x49b6bc710170500@mail.gmail.com/
Also on:    postgresql.org/message-id/b42b73150604070829o3275125x49b6bc710170500@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: mmoncure@gmail.com, landemaine@gmail.com
  Subject: Re: Loading the entire DB into RAM
  In-Reply-To: <b42b73150604070829o3275125x49b6bc710170500@mail.gmail.com>
  References: <e6575a30604070737n20b2d7a4l33ba51dcbf4527a@mail.gmail.com> <b42b73150604070829o3275125x49b6bc710170500@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox