Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0d5deeb

Browse files
committed
Reorganize OS-specific details about write caching into a list.
Along the way, clarify that sdparm can be used on Linux as well as FreeBSD.
1 parente6721c6 commit0d5deeb

File tree

1 file changed

+51
-20
lines changed

1 file changed

+51
-20
lines changed

‎doc/src/sgml/wal.sgml

Lines changed: 51 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -69,26 +69,57 @@
6969
</para>
7070

7171
<para>
72-
To check write caching on <productname>Linux</> use
73-
<command>hdparm -I</>; it is enabled if there is a <literal>*</> next
74-
to <literal>Write cache</>; <command>hdparm -W</> to turn off
75-
write caching. On <productname>FreeBSD</> use
76-
<application>atacontrol</>. (For SCSI disks use <ulink
77-
url="http://sg.danny.cz/sg/sdparm.html"><application>sdparm</></ulink>
78-
to turn off <literal>WCE</>.) On <productname>Solaris</> the disk
79-
write cache is controlled by <ulink
80-
url="http://www.sun.com/bigadmin/content/submitted/format_utility.jsp"><literal>format
81-
-e</></ulink>. (The Solaris <acronym>ZFS</> file system is safe with
82-
disk write-cache enabled because it issues its own disk cache flush
83-
commands.) On <productname>Windows</> if <varname>wal_sync_method</>
84-
is <literal>open_datasync</> (the default), write caching is disabled
85-
by unchecking <literal>My Computer\Open\{select disk
86-
drive}\Properties\Hardware\Properties\Policies\Enable write caching on
87-
the disk</>. Also on Windows, <literal>fsync</> and
88-
<literal>fsync_writethrough</> never do write caching. The
89-
<literal>fsync_writethrough</> option can also be used to disable
90-
write caching on <productname>MacOS X</>.
91-
</para>
72+
These caches can typically be disabled; however, the method for doing
73+
this varies by operating system and drive type:
74+
</para>
75+
76+
<itemizedlist>
77+
<listitem>
78+
<para>
79+
On <productname>Linux</>, IDE drives can be queried using
80+
<command>hdparm -I</command>; write caching is enabled if there is
81+
a <literal>*</> next to <literal>Write cache</>. <command>hdparm -W</>
82+
can be used to turn off write caching. SCSI drives can be queried
83+
using <ulink url="http://sg.danny.cz/sg/sdparm.html"><application>sdparm</></ulink>.
84+
for SCSI drives. Use <command>sdparm --get=WCE</command> to check
85+
whether the write cache is enabled and <command>sdparm --clear=WCE</>
86+
to disable it.
87+
</para>
88+
</listitem>
89+
90+
<listitem>
91+
<para>
92+
On <productname>FreeBSD</>, IDE drives can be queried using
93+
<command>atacontrol</command>, and SCSI drives using
94+
<command>sdparm</command>.
95+
</para>
96+
</listitem>
97+
98+
<listitem>
99+
<para>
100+
On <productname>Solaris</>, the disk write cache is controlled by
101+
<ulink url="http://www.sun.com/bigadmin/content/submitted/format_utility.jsp"><literal>format -e</></ulink>.
102+
(The Solaris <acronym>ZFS</> file system is safe with disk write-cache
103+
enabled because it issues its own disk cache flush commands.)
104+
</para>
105+
</listitem>
106+
107+
<listitem>
108+
<para>
109+
On <productname>Windows</>, if <varname>wal_sync_method</> is
110+
<literal>open_datasync</> (the default), write caching is disabled
111+
by unchecking <literal>My Computer\Open\{select disk drive}\Properties\Hardware\Properties\Policies\Enable write caching on the disk</>.
112+
Alternatively, set <varname>wal_sync_method</varname> to <literal>fsync</> or <literal>fsync_writethrough</>, which never do write caching.
113+
</para>
114+
</listitem>
115+
116+
<listitem>
117+
<para>
118+
On <productname>MacOS X</productname>, write caching can be disabled by
119+
setting <varname>wal_sync_method</> to <literal>fsync_writethrough</>.
120+
</para>
121+
</listitem>
122+
</itemizedlist>
92123

93124
<para>
94125
Many file systems that use write barriers (e.g. <acronym>ZFS</>,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp