[commit: ghc] master: Bump the default allocation area size to 1MB (d790cb9)

git at git.haskell.org git at git.haskell.org
Wed Aug 31 17:19:24 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/d790cb9db71693baed70e3de8e9100d5b7d7404b/ghc

>---------------------------------------------------------------

commit d790cb9db71693baed70e3de8e9100d5b7d7404b
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Tue Aug 30 17:07:36 2016 -0400

    Bump the default allocation area size to 1MB
    
    This is long overdue.
    
    Perhaps 1MB is a little on the skinny size, but this is based on
    * A lot of commodity dual-core desktop processors have 3MB L3 cache
    * We're traditionally quite frugal with memory by default
    
    Test Plan: validate
    
    Reviewers: erikd, bgamari, hvr, austin, rwbarton, ezyang
    
    Reviewed By: ezyang
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2496


>---------------------------------------------------------------

d790cb9db71693baed70e3de8e9100d5b7d7404b
 docs/users_guide/profiling.rst         |  2 +-
 docs/users_guide/runtime_control.rst   |  2 +-
 rts/RtsFlags.c                         |  2 +-
 testsuite/tests/perf/should_run/all.T  | 10 ++++++----
 testsuite/tests/perf/space_leaks/all.T |  3 ++-
 5 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/docs/users_guide/profiling.rst b/docs/users_guide/profiling.rst
index 20f2a83..d3fdd62 100644
--- a/docs/users_guide/profiling.rst
+++ b/docs/users_guide/profiling.rst
@@ -754,7 +754,7 @@ reasons for this:
    data into. When using compacting collection (see the :rts-flag:`-c`
    option), this is reduced to 2L, and can further be reduced by
    tweaking the :rts-flag:`-F` option. Also add the size of the allocation area
-   (currently a fixed 512Kb).
+   (see :rts-flag:`-A`).
 
 -  The stack isn't counted in the heap profile by default. See the
    RTS :rts-flag:`-xt` option.
diff --git a/docs/users_guide/runtime_control.rst b/docs/users_guide/runtime_control.rst
index 3968065..5226d6d 100644
--- a/docs/users_guide/runtime_control.rst
+++ b/docs/users_guide/runtime_control.rst
@@ -267,7 +267,7 @@ performance.
 
 .. rts-flag:: -A ⟨size⟩
 
-    :default: 512k
+    :default: 1MB
 
     .. index::
        single: allocation area, size
diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c
index 7e06d84..92b7e87 100644
--- a/rts/RtsFlags.c
+++ b/rts/RtsFlags.c
@@ -136,7 +136,7 @@ void initRtsFlagsDefaults(void)
     RtsFlags.GcFlags.stkChunkSize       = (32 * 1024) / sizeof(W_);
     RtsFlags.GcFlags.stkChunkBufferSize = (1 * 1024) / sizeof(W_);
 
-    RtsFlags.GcFlags.minAllocAreaSize   = (512 * 1024)        / BLOCK_SIZE;
+    RtsFlags.GcFlags.minAllocAreaSize   = (1024 * 1024)       / BLOCK_SIZE;
     RtsFlags.GcFlags.largeAllocLim      = 0; /* defaults to minAllocAreasize */
     RtsFlags.GcFlags.nurseryChunkSize   = 0;
     RtsFlags.GcFlags.minOldGenSize      = (1024 * 1024)       / BLOCK_SIZE;
diff --git a/testsuite/tests/perf/should_run/all.T b/testsuite/tests/perf/should_run/all.T
index 282bb1a..c20807e 100644
--- a/testsuite/tests/perf/should_run/all.T
+++ b/testsuite/tests/perf/should_run/all.T
@@ -116,8 +116,9 @@ test('T3736',
      ['$MAKE -s --no-print-directory T3736'])
 test('T3738',
      [extra_clean(['T3738a.hi', 'T3738a.o']),
-      stats_num_field('peak_megabytes_allocated', (1, 0)),
-                                 # expected value: 1 (amd64/Linux)
+      stats_num_field('peak_megabytes_allocated', (2, 0)),
+                    # expected value: 1 (amd64/Linux)
+                    # 2016-08-31:     2 (allocation area size bumped to 1MB)
       stats_num_field('bytes allocated',
                       [(wordsize(32), 45648, 5),
                     # expected value: 50520 (x86/Linux)
@@ -132,8 +133,9 @@ test('T3738',
      ['-O'])
 
 test('MethSharing',
-     [stats_num_field('peak_megabytes_allocated', (1, 0)),
-                                 # expected value: 1 (amd64/Linux)
+     [stats_num_field('peak_megabytes_allocated', (2, 0)),
+                    # expected value: 1 (amd64/Linux)
+                    # 2016-08-31:     2 (allocation area size bumped to 1MB)
       stats_num_field('bytes allocated',
                       [(wordsize(32), 360940756, 5),
                     # expected value: 2685858140 (x86/OS X)
diff --git a/testsuite/tests/perf/space_leaks/all.T b/testsuite/tests/perf/space_leaks/all.T
index 9d0661f..c6b1d92 100644
--- a/testsuite/tests/perf/space_leaks/all.T
+++ b/testsuite/tests/perf/space_leaks/all.T
@@ -46,7 +46,8 @@ test('T4334',
 test('T2762',
      [# peak_megabytes_allocated is 2 with 7.0.2.
       # Was 57 with 6.12.3.
-      stats_num_field('peak_megabytes_allocated', (2, 0)),
+      # 2016-08-31:     3 (allocation area size bumped to 1MB)
+      stats_num_field('peak_megabytes_allocated', (3, 0)),
       only_ways(['normal']),
       extra_clean(['T2762A.hi', 'T2762A.o'])],
      compile_and_run, ['-O'])



More information about the ghc-commits mailing list