Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb910d7e

Browse files
committed
Increase the default value of effective_cache_size to 4GB.
Per discussion, the old value of 128MB is ridiculously small on modernmachines; in fact, it's not even any larger than the default value ofshared_buffers, which it certainly should be. Increase to 4GB, whichis unlikely to be any worse than the old default for anyone, and shouldbe noticeably better for most. Eventually we might have an autotuningscheme for this setting, but the recent attempt crashed and burned,so for now just do this.
1 parenta16d421 commitb910d7e

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

‎doc/src/sgml/config.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3194,8 +3194,8 @@ include 'filename'
31943194
memory allocated by <productname>PostgreSQL</productname>, nor
31953195
does it reserve kernel disk cache; it is used only for estimation
31963196
purposes. The system also does not assume data remains in
3197-
the disk cache between queries. The default is128 megabytes
3198-
(<literal>128MB</>).
3197+
the disk cache between queries. The default is4 gigabytes
3198+
(<literal>4GB</>).
31993199
</para>
32003200
</listitem>
32013201
</varlistentry>

‎doc/src/sgml/release-9.4.sgml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -720,27 +720,27 @@
720720
</para>
721721
</listitem>
722722

723-
<listitem>
724-
<para>
725-
Auto-tune <link
726-
linkend="guc-effective-cache-size"><varname>effective_cache_size</></link>
727-
to be four-times shared buffers (Bruce Momjian, Tom Lane)
728-
</para>
729-
</listitem>
730-
731723
<listitem>
732724
<para>
733725
Increase <link
734726
linkend="guc-work-mem"><varname>work_mem</></link> and <link
735727
linkend="guc-maintenance-work-mem"><varname>maintenance_work_mem</></link>
736-
defaults by four-times (Bruce Momjian)
728+
defaults by fourtimes (Bruce Momjian)
737729
</para>
738730

739731
<para>
740732
The new defaults are 4MB and 64MB respectively.
741733
</para>
742734
</listitem>
743735

736+
<listitem>
737+
<para>
738+
Increase the default setting of <link
739+
linkend="guc-effective-cache-size"><varname>effective_cache_size</></link>
740+
to 4GB (Bruce Momjian, Tom Lane)
741+
</para>
742+
</listitem>
743+
744744
<listitem>
745745
<para>
746746
Allow terabyte units to be specified for configuration variable

‎src/backend/utils/misc/postgresql.conf.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@
283283
#cpu_tuple_cost = 0.01# same scale as above
284284
#cpu_index_tuple_cost = 0.005# same scale as above
285285
#cpu_operator_cost = 0.0025# same scale as above
286-
#effective_cache_size =128MB
286+
#effective_cache_size =4GB
287287

288288
# - Genetic Query Optimizer -
289289

‎src/include/optimizer/cost.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#defineDEFAULT_CPU_INDEX_TUPLE_COST 0.005
2828
#defineDEFAULT_CPU_OPERATOR_COST 0.0025
2929

30-
#defineDEFAULT_EFFECTIVE_CACHE_SIZE16384/* measured in pages */
30+
#defineDEFAULT_EFFECTIVE_CACHE_SIZE524288/* measured in pages */
3131

3232
typedefenum
3333
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp