Increase the default value of effective_cache_size to 4GB.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 9 May 2014 01:11:47 +0000 (21:11 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 9 May 2014 01:11:47 +0000 (21:11 -0400)
Per discussion, the old value of 128MB is ridiculously small on modern
machines; in fact, it's not even any larger than the default value of
shared_buffers, which it certainly should be.  Increase to 4GB, which
is unlikely to be any worse than the old default for anyone, and should
be noticeably better for most.  Eventually we might have an autotuning
scheme for this setting, but the recent attempt crashed and burned,
so for now just do this.

doc/src/sgml/config.sgml
doc/src/sgml/release-9.4.sgml
src/backend/utils/misc/postgresql.conf.sample
src/include/optimizer/cost.h

index bc5a8870444497e45609d9ff155a2f32177f49ef..d9e5985a16a3ad9757f1bcacb4645396e28d2471 100644 (file)
@@ -3194,8 +3194,8 @@ include 'filename'
         memory allocated by <productname>PostgreSQL</productname>, nor
         does it reserve kernel disk cache; it is used only for estimation
         purposes.  The system also does not assume data remains in
-        the disk cache between queries.  The default is 128 megabytes
-        (<literal>128MB</>).
+        the disk cache between queries.  The default is 4 gigabytes
+        (<literal>4GB</>).
        </para>
       </listitem>
      </varlistentry>
index 4e4f017e43c5506e78c859c8160abb2f7093b1aa..21c6fc77f79405c0bbda19b872f7be9ac1f3bac1 100644 (file)
        </para>
       </listitem>
 
-      <listitem>
-       <para>
-        Auto-tune <link
-        linkend="guc-effective-cache-size"><varname>effective_cache_size</></link>
-        to be four-times shared buffers (Bruce Momjian, Tom Lane)
-       </para>
-      </listitem>
-
       <listitem>
        <para>
         Increase <link
         linkend="guc-work-mem"><varname>work_mem</></link> and <link
         linkend="guc-maintenance-work-mem"><varname>maintenance_work_mem</></link>
-        defaults by four-times (Bruce Momjian)
+        defaults by four times (Bruce Momjian)
        </para>
 
        <para>
        </para>
       </listitem>
 
+      <listitem>
+       <para>
+        Increase the default setting of <link
+        linkend="guc-effective-cache-size"><varname>effective_cache_size</></link>
+        to 4GB (Bruce Momjian, Tom Lane)
+       </para>
+      </listitem>
+
       <listitem>
        <para>
         Allow terabyte units to be specified for configuration variable
index 61685f7c13f019ecd7791cf09a72df04be8814a6..6dc0698efeb0dade952133f0c44b860e4393af2d 100644 (file)
 #cpu_tuple_cost = 0.01         # same scale as above
 #cpu_index_tuple_cost = 0.005      # same scale as above
 #cpu_operator_cost = 0.0025        # same scale as above
-#effective_cache_size = 128MB
+#effective_cache_size = 4GB
 
 # - Genetic Query Optimizer -
 
index 3c3c63ae100424d68402591aa951c2ff31481c59..75e2afb1e2c2c440a7bf9f2a641eb013fea6a83b 100644 (file)
@@ -27,7 +27,7 @@
 #define DEFAULT_CPU_INDEX_TUPLE_COST 0.005
 #define DEFAULT_CPU_OPERATOR_COST  0.0025
 
-#define DEFAULT_EFFECTIVE_CACHE_SIZE  16384        /* measured in pages */
+#define DEFAULT_EFFECTIVE_CACHE_SIZE  524288   /* measured in pages */
 
 typedef enum
 {