mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Implement prefetching via posix_fadvise() for bitmap index scans. A new
GUC variable effective_io_concurrency controls how many concurrent block prefetch requests will be issued. (The best way to handle this for plain index scans is still under debate, so that part is not applied yet --- tgl) Greg Stark
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.204 2009/01/09 10:13:18 mha Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.205 2009/01/12 05:10:44 tgl Exp $ -->
|
||||
|
||||
<chapter Id="runtime-config">
|
||||
<title>Server Configuration</title>
|
||||
@ -1203,6 +1203,55 @@ SET ENABLE_SEQSCAN TO OFF;
|
||||
queries.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="runtime-config-resource-async-behavior">
|
||||
<title>Asynchronous Behavior</title>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry id="guc-effective-io-concurrency" xreflabel="effective_io_concurrency">
|
||||
<term><varname>effective_io_concurrency</varname> (<type>integer</type>)</term>
|
||||
<indexterm>
|
||||
<primary><varname>effective_io_concurrency</> configuration parameter</primary>
|
||||
</indexterm>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the number of concurrent disk I/O operations that
|
||||
<productname>PostgreSQL</> expects can be executed
|
||||
simultaneously. Raising this value will increase the number of I/O
|
||||
operations that any individual <productname>PostgreSQL</> session
|
||||
attempts to initiate in parallel. The allowed range is 1 to 1000,
|
||||
or zero to disable issuance of asynchronous I/O requests.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A good starting point for this setting is the number of separate
|
||||
drives comprising a RAID 0 stripe or RAID 1 mirror being used for the
|
||||
database. (For RAID 5 the parity drive should not be counted.)
|
||||
However, if the database is often busy with multiple queries issued in
|
||||
concurrent sessions, lower values may be sufficient to keep the disk
|
||||
array busy. A value higher than needed to keep the disks busy will
|
||||
only result in extra CPU overhead.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For more exotic systems, such as memory-based storage or a RAID array
|
||||
that is limited by bus bandwidth, the correct value might be the
|
||||
number of I/O paths available. Some experimentation may be needed
|
||||
to find the best value.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Asynchronous I/O depends on an effective <function>posix_fadvise</>
|
||||
function, which some operating systems lack. If the function is not
|
||||
present then setting this parameter to anything but zero will result
|
||||
in an error. On some operating systems the function is present but
|
||||
does not actually do anything. On such systems setting a nonzero
|
||||
value will add CPU overhead without improving performance.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="runtime-config-wal">
|
||||
|
Reference in New Issue
Block a user