Re: Mapping Database completly into memory

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: Mapping Database completly into memory
Дата
Msg-id Pine.LNX.4.33.0307281155070.19692-100000@css120.ihs.com
обсуждение исходный текст
Ответ на Mapping Database completly into memory  (Daniel Migowski <Mig-O@artis.uni-oldenburg.de>)
Список 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.


В списке pgsql-performance по дате отправления:

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: Mapping a database completly into Memory
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Optimization