diff options
author | Simon Marlow <marlowsd@gmail.com> | 2016-08-30 17:07:36 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-08-31 13:15:33 -0400 |
commit | d790cb9db71693baed70e3de8e9100d5b7d7404b (patch) | |
tree | f76edc103b57e6dad45536ad082d30a5347d5ce9 | |
parent | 3005fa5313b6d5fd9d4f47192c84e96e94ee7f17 (diff) | |
download | haskell-d790cb9db71693baed70e3de8e9100d5b7d7404b.tar.gz |
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
-rw-r--r-- | docs/users_guide/profiling.rst | 2 | ||||
-rw-r--r-- | docs/users_guide/runtime_control.rst | 2 | ||||
-rw-r--r-- | rts/RtsFlags.c | 2 | ||||
-rw-r--r-- | testsuite/tests/perf/should_run/all.T | 10 | ||||
-rw-r--r-- | 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 20f2a83824..d3fdd6233e 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 3968065865..5226d6dc14 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 7e06d84d93..92b7e871df 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 282bb1a4fc..c20807e7b4 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 9d0661f817..c6b1d925a6 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']) |