Re: Mount database on RAM disk?

From: Christopher Browne <cbbrowne(at)acm(dot)org>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Mount database on RAM disk?
Date: 2005-07-10 04:54:37
Message-ID: m33bqnl0qa.fsf@mobile.int.cbbrowne.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> On 8 Jul 2005, at 20:21, Merlin Moncure wrote:
>> ditto windows.
>>
>> Files cached in memory are slower than reading straight from memory
>> but not nearly enough to justify reserving memory for your use. In
>> other words, your O/S is a machine with years and years of
>> engineering designed best how to dole memory out to caching and
>> various processes. Why second guess it?
>
> Because sometimes it gets it wrong. The most brutal method is
> occasionally the most desirable. Even if it not the "right" way to do
> it.

The fact that cache allows reads to come from memory means that for
read-oriented activity, you're generally going to be better off
leaving RAM as "plain ordinary system memory" so that it can
automatically be drawn into service as cache.

Thus, the main reason to consider using a RAM-disk is the fact that
update times are negligible as there is not the latency of a
round-trip to the disk.

That would encourage its use for write-heavy tables, with the STRONG
caveat that a power outage could readily destroy the database :-(.
--
let name="cbbrowne" and tld="acm.org" in String.concat "@" [name;tld];;
http://cbbrowne.com/info/rdbms.html
Rules of the Evil Overlord #153. "My Legions of Terror will be an
equal-opportunity employer. Conversely, when it is prophesied that no
man can defeat me, I will keep in mind the increasing number of
non-traditional gender roles." <http://www.eviloverlord.com/>

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Alexander Kirpa 2005-07-10 22:07:14 Re: Data Warehousing Tuning
Previous Message Alex Stapleton 2005-07-09 21:48:43 Re: Mount database on RAM disk?