aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2018-01-25 11:14:24 -0500
committerPeter Eisentraut <peter_e@gmx.net>2018-01-25 11:15:03 -0500
commit2a5ecb56d22340a00393fa60e7b910c472071875 (patch)
treeb90dea3be7c09312ecdad040ba2025ade255ef4d
parent0b5e33f667a2042d7022da8bef31a8be5937aad1 (diff)
downloadpostgresql-2a5ecb56d22340a00393fa60e7b910c472071875.tar.gz
postgresql-2a5ecb56d22340a00393fa60e7b910c472071875.zip
Update documentation to mention huge pages on other OSes
Previously, the docs implied that only Linux and Windows could use huge pages. That's not quite true: it's just that we only know how to request them explicitly on those OSes. Be more explicit about what huge_pages really does and mention that some OSes may use huge pages automatically. Author: Thomas Munro and Catalin Iacob Reviewed-By: Justin Pryzby, Peter Eisentraut Discussion: https://postgr.es/m/CAEepm=3qzR-hfjepymohuC4XO5phxoSoipOjm6BEhnJHjNR+jg@mail.gmail.com
-rw-r--r--doc/src/sgml/config.sgml33
1 files changed, 23 insertions, 10 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 45b2af14eb9..f951ddb41e7 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -1372,14 +1372,20 @@ include_dir 'conf.d'
</term>
<listitem>
<para>
- Enables/disables the use of huge memory pages. Valid values are
- <literal>try</literal> (the default), <literal>on</literal>,
- and <literal>off</literal>.
+ Controls whether huge pages are requested for the main shared memory
+ area. Valid values are <literal>try</literal> (the default),
+ <literal>on</literal>, and <literal>off</literal>. With
+ <varname>huge_pages</varname> set to <literal>try</literal>, the
+ server will try to request huge pages, but fall back to the default if
+ that fails. With <literal>on</literal>, failure to request huge pages
+ will prevent the server from starting up. With <literal>off</literal>,
+ huge pages will not be requested.
</para>
<para>
- At present, this feature is supported only on Linux and Windows. The
- setting is ignored on other systems when set to <literal>try</literal>.
+ At present, this setting is supported only on Linux and Windows. The
+ setting is ignored on other systems when set to
+ <literal>try</literal>.
</para>
<para>
@@ -1401,11 +1407,18 @@ include_dir 'conf.d'
</para>
<para>
- With <varname>huge_pages</varname> set to <literal>try</literal>,
- the server will try to use huge pages, but fall back to using
- normal allocation if that fails. With <literal>on</literal>, failure
- to use huge pages will prevent the server from starting up. With
- <literal>off</literal>, huge pages will not be used.
+ Note that this setting only affects the main shared memory area.
+ Operating systems such as Linux, FreeBSD, and Illumos can also use
+ huge pages (also known as <quote>super</quote> pages or
+ <quote>large</quote> pages) automatically for normal memory
+ allocation, without an explicit request from
+ <productname>PostgreSQL</productname>. On Linux, this is called
+ <quote>transparent huge pages</quote><indexterm><primary>transparent
+ huge pages</primary></indexterm> (THP). That feature has been known to
+ cause performance degradation with
+ <productname>PostgreSQL</productname> for some users on some Linux
+ versions, so its use is currently discouraged (unlike explicit use of
+ <varname>huge_pages</varname>).
</para>
</listitem>
</varlistentry>