aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2020-07-31 17:27:09 +1200
committerThomas Munro <tmunro@postgresql.org>2020-07-31 17:49:58 +1200
commit84b1c63ad41872792d47e523363fce1f0e230022 (patch)
treecc9ecdfd4f66edbcc5a1382598de5ba502023be9 /doc/src
parent7b1110d2fd3da3d7536530d14952d4f4d9c25438 (diff)
downloadpostgresql-84b1c63ad41872792d47e523363fce1f0e230022.tar.gz
postgresql-84b1c63ad41872792d47e523363fce1f0e230022.zip
Preallocate some DSM space at startup.
Create an optional region in the main shared memory segment that can be used to acquire and release "fast" DSM segments, and can benefit from huge pages allocated at cluster startup time, if configured. Fall back to the existing mechanisms when that space is full. The size is controlled by a new GUC min_dynamic_shared_memory, defaulting to 0. Main region DSM segments initially contain whatever garbage the memory held last time they were used, rather than zeroes. That change revealed that DSA areas failed to initialize themselves correctly in memory that wasn't zeroed first, so fix that problem. Discussion: https://postgr.es/m/CA%2BhUKGLAE2QBv-WgGp%2BD9P_J-%3Dyne3zof9nfMaqq1h3EGHFXYQ%40mail.gmail.com
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/config.sgml24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 427947cf496..994155ca00e 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -1906,6 +1906,30 @@ include_dir 'conf.d'
</listitem>
</varlistentry>
+ <varlistentry id="guc-min-dynamic-shared-memory" xreflabel="min_dynamic_shared_memory">
+ <term><varname>min_dynamic_shared_memory</varname> (<type>integer</type>)
+ <indexterm>
+ <primary><varname>min_dynamic_shared_memory</varname> configuration parameter</primary>
+ </indexterm>
+ </term>
+ <listitem>
+ <para>
+ Specifies the amount of memory that should be allocated at server
+ startup time for use by parallel queries. When this memory region is
+ insufficient or exhausted by concurrent queries, new parallel queries
+ try to allocate extra shared memory temporarily from the operating
+ system using the method configured with
+ <varname>dynamic_shared_memory_type</varname>, which may be slower due
+ to memory management overheads. Memory that is allocated at startup
+ time with <varname>min_dynamic_shared_memory</varname> is affected by
+ the <varname>huge_pages</varname> setting on operating systems where
+ that is supported, and may be more likely to benefit from larger pages
+ on operating systems where that is managed automatically.
+ The default value is <literal>0</literal> (none).
+ </para>
+ </listitem>
+ </varlistentry>
+
</variablelist>
</sect2>