summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/config.sgml87
-rw-r--r--doc/src/sgml/wal.sgml11
2 files changed, 98 insertions, 0 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 2f726331ac..6c73fb439c 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -1843,6 +1843,35 @@ include_dir 'conf.d'
</para>
</listitem>
</varlistentry>
+
+ <varlistentry id="guc-bgwriter-flush-after" xreflabel="bgwriter_flush_after">
+ <term><varname>bgwriter_flush_after</varname> (<type>int</type>)
+ <indexterm>
+ <primary><varname>bgwriter_flush_after</> configuration parameter</primary>
+ </indexterm>
+ </term>
+ <listitem>
+ <para>
+ Whenever more than <varname>bgwriter_flush_after</varname> bytes have
+ been written by the bgwriter, attempt to force the OS to issue these
+ writes to the underlying storage. Doing so will limit the amount of
+ dirty data in the kernel's page cache, reducing the likelihood of
+ stalls when an fsync is issued at the end of a checkpoint, or when
+ the OS writes data back in larger batches in the background. Often
+ that will result in greatly reduced transaction latency, but there
+ also are some cases, especially with workloads that are bigger than
+ <xref linkend="guc-shared-buffers">, but smaller than the OS's page
+ cache, where performance might degrade. This setting may have no
+ effect on some platforms. The valid range is between
+ <literal>0</literal>, which disables controlled writeback, and
+ <literal>2MB</literal>. The default is <literal>512Kb</> on Linux,
+ <literal>0</> elsewhere. (Non-default values of
+ <symbol>BLCKSZ</symbol> change the default and maximum.)
+ This parameter can only be set in the <filename>postgresql.conf</>
+ file or on the server command line.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
<para>
@@ -1944,6 +1973,35 @@ include_dir 'conf.d'
</para>
</listitem>
</varlistentry>
+
+ <varlistentry id="guc-backend-flush-after" xreflabel="backend_flush_after">
+ <term><varname>backend_flush_after</varname> (<type>int</type>)
+ <indexterm>
+ <primary><varname>backend_flush_after</> configuration parameter</primary>
+ </indexterm>
+ </term>
+ <listitem>
+ <para>
+ Whenever more than <varname>backend_flush_after</varname> bytes have
+ been written by a single backend, attempt to force the OS to issue
+ these writes to the underlying storage. Doing so will limit the
+ amount of dirty data in the kernel's page cache, reducing the
+ likelihood of stalls when an fsync is issued at the end of a
+ checkpoint, or when the OS writes data back in larger batches in the
+ background. Often that will result in greatly reduced transaction
+ latency, but there also are some cases, especially with workloads
+ that are bigger than <xref linkend="guc-shared-buffers">, but smaller
+ than the OS's page cache, where performance might degrade. This
+ setting may have no effect on some platforms. The valid range is
+ between <literal>0</literal>, which disables controlled writeback,
+ and <literal>2MB</literal>. The default is <literal>128Kb</> on
+ Linux, <literal>0</> elsewhere. (Non-default values of
+ <symbol>BLCKSZ</symbol> change the default and maximum.)
+ This parameter can only be set in the <filename>postgresql.conf</>
+ file or on the server command line.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</sect2>
</sect1>
@@ -2475,6 +2533,35 @@ include_dir 'conf.d'
</listitem>
</varlistentry>
+ <varlistentry id="guc-checkpoint-flush-after" xreflabel="checkpoint_flush_after">
+ <term><varname>checkpoint_flush_after</varname> (<type>int</type>)
+ <indexterm>
+ <primary><varname>checkpoint_flush_after</> configuration parameter</primary>
+ </indexterm>
+ </term>
+ <listitem>
+ <para>
+ Whenever more than <varname>checkpoint_flush_after</varname> bytes
+ have been written while performing a checkpoint, attempt to force the
+ OS to issue these writes to the underlying storage. Doing so will
+ limit the amount of dirty data in the kernel's page cache, reducing
+ the likelihood of stalls when an fsync is issued at the end of the
+ checkpoint, or when the OS writes data back in larger batches in the
+ background. Often that will result in greatly reduced transaction
+ latency, but there also are some cases, especially with workloads
+ that are bigger than <xref linkend="guc-shared-buffers">, but smaller
+ than the OS's page cache, where performance might degrade. This
+ setting may have no effect on some platforms. The valid range is
+ between <literal>0</literal>, which disables controlled writeback,
+ and <literal>2MB</literal>. The default is <literal>128Kb</> on
+ Linux, <literal>0</> elsewhere. (Non-default values of
+ <symbol>BLCKSZ</symbol> change the default and maximum.)
+ This parameter can only be set in the <filename>postgresql.conf</>
+ file or on the server command line.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="guc-checkpoint-warning" xreflabel="checkpoint_warning">
<term><varname>checkpoint_warning</varname> (<type>integer</type>)
<indexterm>
diff --git a/doc/src/sgml/wal.sgml b/doc/src/sgml/wal.sgml
index e3941c9391..503ea8a2a7 100644
--- a/doc/src/sgml/wal.sgml
+++ b/doc/src/sgml/wal.sgml
@@ -546,6 +546,17 @@
</para>
<para>
+ On Linux and POSIX platforms <xref linkend="guc-checkpoint-flush-after">
+ allows to force the OS that pages written by the checkpoint should be
+ flushed to disk after a configurable number of bytes. Otherwise, these
+ pages may be kept in the OS's page cache, inducing a stall when
+ <literal>fsync</> is issued at the end of a checkpoint. This setting will
+ often help to reduce transaction latency, but it also can an adverse effect
+ on performance; particularly for workloads that are bigger than
+ <xref linkend="guc-shared-buffers">, but smaller than the OS's page cache.
+ </para>
+
+ <para>
The number of WAL segment files in <filename>pg_xlog</> directory depends on
<varname>min_wal_size</>, <varname>max_wal_size</> and
the amount of WAL generated in previous checkpoint cycles. When old log