Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Automated GC tweaking for OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-11-24 (17:03)
From: Christophe Raffalli <christophe.raffalli@u...>
Subject: Automated GC tweaking for OCaml


Here is a temptative of automated GC tweaking.

It mainly tries to guess a minor_heap_size that will both increase speed and reactivity !!!
It has a description in it ! It also move to a proportional increment of major_heap instead
of a constant one, but this is not very usefull in my tests.

To use it, adjust the parameter at the beginning of the file and just link with it !

The main questions are

- more testing : I am interested on the behavior on your programs especially
  * interactive ones !
  * seems not to do oscillation very much ... do you have a program where
    minor heap size oscillates
  * does it reaches the maximum minor_heap_size for you (with not a too low
    reactivity parameter)

- measuring the value of the "gamma" constant uses in the program on real OCaml program:

let gamma = 3.0 (* time in major slice attached to a minor GC  / time for minor GC
                : should use a real estimation, here just a guess !!! *)

Is this a universal constant that does not depend too much on the program and architecture ?
Probably not, because of the grey_val for instance ...


Christophe Raffalli
Universite de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex

tel: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42
IMPORTANT: this mail is signed using PGP/MIME
At least Enigmail/Mozilla, mutt or evolution
can check this signature. The public key is
stored on