Update documentation to mention huge pages on other OSes
authorPeter Eisentraut
Thu, 25 Jan 2018 16:14:24 +0000 (11:14 -0500)
committerPeter Eisentraut
Thu, 25 Jan 2018 16:15:03 +0000 (11:15 -0500)
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

doc/src/sgml/config.sgml

index 45b2af14eb97a017080932acf01d6c23b4217ecc..f951ddb41e71b7a3c45de017c898737cd66b78fb 100644 (file)
@@ -1372,14 +1372,20 @@ include_dir 'conf.d'
       
       
        
-        Enables/disables the use of huge memory pages. Valid values are
-        try (the default), on,
-        and off.
+        Controls whether huge pages are requested for the main shared memory
+        area. Valid values are try (the default),
+        on, and off.  With
+        huge_pages set to try, the
+        server will try to request huge pages, but fall back to the default if
+        that fails. With on, failure to request huge pages
+        will prevent the server from starting up. With off,
+        huge pages will not be requested.
        
 
        
-        At present, this feature is supported only on Linux and Windows. The
-        setting is ignored on other systems when set to try.
+        At present, this setting is supported only on Linux and Windows. The
+        setting is ignored on other systems when set to
+        try.
        
 
        
@@ -1401,11 +1407,18 @@ include_dir 'conf.d'
        
 
        
-        With huge_pages set to try,
-        the server will try to use huge pages, but fall back to using
-        normal allocation if that fails. With on, failure
-        to use huge pages will prevent the server from starting up. With
-        off, 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 super pages or
+        large pages) automatically for normal memory
+        allocation, without an explicit request from
+        PostgreSQL. On Linux, this is called
+        transparent huge pagestransparent
+        huge pages (THP). That feature has been known to
+        cause performance degradation with
+        PostgreSQL for some users on some Linux
+        versions, so its use is currently discouraged (unlike explicit use of
+        huge_pages).