diff options
author | Simon Riggs <simon@2ndQuadrant.com> | 2010-12-08 18:48:03 +0000 |
---|---|---|
committer | Simon Riggs <simon@2ndQuadrant.com> | 2010-12-08 18:48:03 +0000 |
commit | e620ee35b249b0af255ef788003d1c9edb815a35 (patch) | |
tree | e8b04c9426be8a7abdb95c69b97b6b9f17513bf1 /doc/src | |
parent | 5a031a5556ff83b8a9646892715d7fef415b83c3 (diff) | |
download | postgresql-e620ee35b249b0af255ef788003d1c9edb815a35.tar.gz postgresql-e620ee35b249b0af255ef788003d1c9edb815a35.zip |
Optimize commit_siblings in two ways to improve group commit.
First, avoid scanning the whole ProcArray once we know there
are at least commit_siblings active; second, skip the check
altogether if commit_siblings = 0.
Greg Smith
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/config.sgml | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 1ca51ef69d6..f1d3ca2f099 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -1683,17 +1683,24 @@ SET ENABLE_SEQSCAN TO OFF; </indexterm> <listitem> <para> - Time delay between writing a commit record to the WAL buffer - and flushing the buffer out to disk, in microseconds. A - nonzero delay can allow multiple transactions to be committed - with only one <function>fsync()</function> system call, if + When the commit data for a transaction is flushed to disk, any + additional commits ready at that time are also flushed out. + <varname>commit_delay</varname> adds a time delay, set in + microseconds, before writing some commit records to the WAL + buffer and flushing the buffer out to disks. A nonzero delay + can allow more transactions to be committed with only one call + to the active <varname>wal_sync_method</varname>, if system load is high enough that additional transactions become ready to commit within the given interval. But the delay is just wasted if no other transactions become ready to commit. Therefore, the delay is only performed if at least <varname>commit_siblings</varname> other transactions are active at the instant that a server process has written its - commit record. The default is zero (no delay). + commit record. The default is zero (no delay). Since + all pending commit data flushes are written at every flush + regardless of this setting, it is rare that adding delay to + that by increasing this parameter will actually improve commit + performance. </para> </listitem> </varlistentry> |