From: | "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com> |
---|---|
To: | Daniel Migowski <Mig-O(at)artis(dot)uni-oldenburg(dot)de> |
Cc: | <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: Mapping Database completly into memory |
Date: | 2003-07-28 17:58:11 |
Message-ID: | Pine.LNX.4.33.0307281155070.19692-100000@css120.ihs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Sun, 27 Jul 2003, Daniel Migowski wrote:
> Hallo pgsql-performance,
>
> I just wondered if there is a possibility to map my database running
> on a linux system completly into memory and to only use disk
> accesses for writes.
>
> I got a nice machine around with 2 gigs of ram, and my database at
> the moment uses about 30MB on the disks.
>
> Or does Postgresql do this automtatically, with some cache adjusting
> parameters, and after doing a select * from <everything> on my
> database?
Are you looking at a read only type database thing here? It's generally
considered bad practice to run databases from memory only, since a loss of
power results in a loss of all data.
Postgresql and whatever OS it runs on can usually cache an entire 30 meg
data set in memory easily. You'll need to crank up shared buffers a bit
(1000 shared buffers is 8 megs, so 5000 should be enough to cache the
whole thing (~40 megs). Also, be sure and crank up your
effective_cache_size so the planner knows the kernel has lots of space for
caching data and favors index scans.
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2003-07-28 18:00:19 | Re: Optimization |
Previous Message | Franco Bruno Borghesi | 2003-07-28 17:48:02 | Re: Mapping a database completly into Memory |