Commit d790cb9d authored by Simon Marlow's avatar Simon Marlow Committed by Ben Gamari

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
parent 3005fa53
......@@ -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.
......
......@@ -267,7 +267,7 @@ performance.
.. rts-flag:: -A ⟨size⟩
:default: 512k
:default: 1MB
.. index::
single: allocation area, size
......
......@@ -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;
......
......@@ -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)
......
......@@ -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'])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment