[m-dev.] Tuning BoehmGC
Paul Bone
pbone at csse.unimelb.edu.au
Wed Oct 13 12:17:26 AEDT 2010
To tune the initial heap size that boehm uses (which affects the number of
collections that occur at run time). Use the environment variable
GC_INITIAL_HEAP_SIZE. See doc/README.environment in the boehm_gc directory.
To tune the HBLKSIZE parameter that is used to size the thread local cache
amoung other things the C macros need to be defined:
HBLKSIZE - measured in bytes.
CPP_LOG_HBLKSIZE - log2(HBLKSIZE)
These need to be set together. The default is 4K, I've tested 4, 8, 16 and 32
in a asm_fast.gc.par grade. Larger values are better. This is easy to
configure by adding it to the BOEHM_CFLAGS_FOR_THREADS variable in
Mmake.common.in in the Mercury distribution. For example:
BOEHM_CFLAGS_FOR_THREADS = @ENABLE_BOEHM_THREAD_LOCAL_ALLOC@ \
@ENABLE_BOEHM_PARALLEL_MARK@ \
-DHBLKSIZE=8192 -DCPP_LOG_HBLKSIZE=13
I havn't tried this on a non-parallel grade yet.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.mercurylang.org/archives/developers/attachments/20101013/ffb08d29/attachment.sig>
More information about the developers
mailing list