[MLton-user] Performances: mlton 20030716p1 V.S. 20051202

Stephen Weeks sweeks@sweeks.com
Fri, 4 Aug 2006 00:58:56 -0700


> we are now swapping a lot when compiling with mlton-2005 when we
> were not swapping at all with mlton-2003. This can explain our
> performances regression.
>
> So, does it exist compiling options for tuning memory management to
> return at least to the same performances as with mlton-2003 ?

I took a quick look through the commit log and the diffs for
runtime/gc.c, which is the most likely cause of the change.  The only
thing that jumped out at me is the change in ramSlop, which was 0.8
for 20030716 and 0.5 for 20051202.  So, you might try running your
20051202 executable with

  @MLton ram-slop 0.8 --

to see if it makes a difference.  

You could also run the various executables with

  @MLton gc-messages --

which will show where virtual memory usage is deviating.  Being at the
borderline of RAM size means that very small changes can have very big
effects.  Also, if you are near 2G in terms of memory usage, address
space fragmentation begins to cause problems.