[MLton] Paging under RedHat 9.0 although largely fitting in core (resend)
Stephen Weeks
MLton@mlton.org
Wed, 10 Mar 2004 14:54:24 -0800
> We have noticed the following performance problem under RedHat 9.0:
> there are situations where paging seemingly occurs under RedHat 9.0
> although the MLton-generated executable completely resides in core.
I tried with a couple of simple test programs to recreate the behavior
you saw, but didn't have any success. So, here's some tests I'd like
you to run.
First, I'd like to confirm that this is with MLton 20040227. If not
please try with that version.
Second, could you try this on a RedHat 7 or 8 system as well as a
Fedora 1 system. That might help isolate when the change got
introduced into the OS. Or, as Jesper suggested, running on another
Linux distro might tell us something.
Third, could you run with @MLton gc-messages and send (a fragment of)
the output. I'd like to try to figure out what mode the GC is in:
copying or mark-compact for its major GCs. Is it using generational
gc's? Is the heap growing and shrinking?
Fourth, could you run with @MLton fixed-heap 750m. This will rule out
some possible modes.
You might also experiment with forcing certain modes through either
recompiling the runtime with FORCE_MARK_COMPACT or by judicious
setting of ratios via @MLton args (copy-ratio, mark-compact-ratio,
etc).
> I was wondering:
...
> 2. if so, whether the use of madvise() calls from the gc could ease
> up the situation (perhaps by using WONTNEED on old from spaces ?)
Using MADV_DONTNEED is certainly a possiblity. This could be done in
the resizeHeap2 function in gc.c, when we determine to hold onto old
from space because everything fits in RAM.
> 3. if there may be RedHat 9.0 kernel and/or swapd setting to avoid
> this behavior.
I don't know about this. Hopefully Henry is following along and has
some ideas. Henry?