Skip site navigation (1) Skip section navigation (2)

Re: Two hard drives --- what to do with them?

From: Shane Ambler <pgsql(at)Sheeky(dot)Biz>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Peter Kovacs <maxottovonstirlitz(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Carlos Moreno <moreno_pg(at)mochima(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Two hard drives --- what to do with them?
Date: 2007-02-27 05:05:13
Message-ID: 45E3BC09.60100@Sheeky.Biz (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Jeff Davis wrote:

>> Sorry for for not being familar with storage techonologies... Does
>> "battery" here mean battery in the common sense of the word - some
>> kind of independent power supply? Shouldn't the disk itself be backed
>> by a battery? As should the entire storage subsystem?
> Yes, a battery that can hold power to keep data alive in the write cache
> in case of power failure, etc., for a long enough time to recover and
> commit the data to disk.

Just to expand a bit - the battery backup options are available on some 
raid cards - that is where you would be looking for it. I don't know of 
any hard drives that have it built in.

Of cause another reason to have a UPS for the server - keep it running 
long enough after the clients have gone down so that it can ensure 
everything is on disk and shuts down properly.

> So, a write cache is OK (even for pg_xlog) if it is durable (i.e. on
> permanent storage or backed by enough power to make sure it gets there).
> However, if PostgreSQL has no way to know whether a write is durable or
> not, it can't guarantee the data is safe.
> The reason this becomes an issue is that many consumer-grade disks have
> write cache enabled by default and no way to make sure the cached data
> actually gets written. So, essentially, these disks "lie" and say they
> wrote the data, when in reality, it's in volatile memory. It's
> recommended that you disable write cache on such a device.

 From all that I have heard this is another advantage of SCSI disks - 
they honor these settings as you would expect - many IDE/SATA disks 
often say "sure I'll disable the cache" but continue to use it or don't 
retain the setting after restart.


Shane Ambler

Get Sheeky @ http://Sheeky.Biz

In response to


pgsql-performance by date

Next:From: Jim C. NasbyDate: 2007-02-27 05:11:44
Subject: Re: Dead Space Map version 2
Previous:From: ITAGAKI TakahiroDate: 2007-02-27 03:05:57
Subject: Dead Space Map version 2

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group