From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Greg Smith <gsmith(at)gregsmith(dot)com> |
Cc: | PostgreSQL-documentation <pgsql-docs(at)postgresql(dot)org> |
Subject: | Re: [GENERAL] full_page_writes = off? |
Date: | 2007-12-10 14:06:26 |
Message-ID: | 200712101406.lBAE6QU19627@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs pgsql-general |
I thought we had the disk write cache control documented for popular
operating systems, but I see we don't so I added the following patch to
our documentation.
---------------------------------------------------------------------------
Greg Smith wrote:
> On Sat, 1 Dec 2007, Tomasz Ostrowski wrote:
>
> > You can also use "hdparm -I" to check this - look for a "Write
> > caching" in "Commands/features" section. If it has a "*" in front
> > then it is enabled and dangerous.
>
> Right; using -I works with most Linux hdparm versions:
>
> # hdparm -V
> hdparm v6.6
> # hdparm -I /dev/hda | grep "Write cache"
> * Write cache
> # hdparm -W 0 /dev/hda
>
> /dev/hda:
> setting drive write-caching to 0 (off)
> # hdparm -I /dev/hda | grep "Write cache"
> Write cache
>
> While being able to check the state with -W only works in very recent
> ones.
>
> The best way to make this change permanent varies depending on your Linux
> distribution.
>
> Also: nowadays many SATA disks appear as SCSI devices like /dev/sda. In
> some cases I believe you can use a recent hdparm on them anyway, in others
> I've had to use sdparm instead. Several of the examples at
> http://sg.torque.net/sg/sdparm.html show how to manipulate the Write Cache
> Enabled (WCE) status similarly to the above on SCSI devices.
>
> > I don't know how to check it on BSD.
>
> In FreeBSD I believe you use atacontrol to check the settings, and you can
> make the changes permanent by fiddling with the /boot/device.hints file.
>
> --
> * Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org/
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Attachment | Content-Type | Size |
---|---|---|
/rtmp/diff | text/x-diff | 1.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Smith | 2007-12-10 14:27:31 | Re: [GENERAL] full_page_writes = off? |
Previous Message | Alvaro Herrera | 2007-12-10 01:48:39 | Re: [HACKERS] "distributed checkpoint" |
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2007-12-10 14:13:15 | Re: Simpler dump? |
Previous Message | Tino Wildenhain | 2007-12-10 13:16:22 | Re: Simpler dump? |