[MLton-user] Mostly MLton performance.

Johan Grönqvist johan.gronqvist@matfys.lth.se
Wed, 12 Apr 2006 18:50:26 +0200


Stephen Weeks wrote:
>>If I run the MLton compiled program several times, running times
>>increase significantly
>>    
>...
>  
>>My first guess was that the GC may behaves differently in different
>>runs, but fixed-heap did not eliminate the difference, and using
>>gc-summary I can see that the GC only takes slightly more time in
>>the longer runs (the differences in "total GC time" are less than
>>one second). When the program is run on a computer that has "rested"
>>(low load average last minute or so) it seems to always take roughly
>>the same time.
>>    
>
>I am curious to hear if you have made any progress on this.  I am
>sceptical that MLton's GC is responsible.  The difference from one run
>to the next (almost a factor of two in running time) seems too large
>-- I have never seen this kind of behavior.
>
>Are you using anywhere near the amount of available RAM on the
>machine?  Is anything else running?
>
>In the worst case, if you can make the source code available, we can
>try to duplicate what you see on other machines.
>  
I am sorry for the late response, and for the fact that this response
will not help you understand what I saw.

I have now tried running the same executable (compiled with "MLton
20051202 (built Tue Feb 14 01:05:36 2006 on vernadsky)") on 4 different
machines. Two of them have > 1GB ram, one has 256MB ram, and the one I
originally used has 512 MB. Only my (512MB, ubuntulinux, 2.6 kernel)
machine shows this, and none of the other (Suse 8.2 2.4 kernel, Suse 9.0
2.4 kernel, Suse 9.2 2.6 kernel).

Unfortunately I had to reinstall windows on my laptop due to warranty
rules (it started behaving strangely, and I do not want to loose
warranty). Presently I have installer cooperative linux (modified linux
kernel running under windows) running debian sarge with the
corresponding mlton package (MLton 20041109 (built Tue Nov 09 23:59:39
2004 on debian30) and a 2.6 kernel. I do not see the effect of
increasing time now.

There was nothing else running, except the normal services/daemons,
X/gnome/KDE and, in the case of the suse machines, ssh. No program was
very active during the tests.

As I had to reformat and remove my linux installation, I can not
reproduce the behaviour anymore, but also do not suffer from this. I
believe, however, that top showed as little free memory on the suse
256MB machine as on my laptop and I therefore guess that it was not
solely due to lack of free memory, but I can no longer test it again
with more/less free memory in my previous ubuntu installation.

I could certainly make the source code available  (is at
http://www.matfys.lth.se/Johan.Gronqvist/source.tar.bz2) but random
testing may not help.
If my computer gets fixed, and I reinstall ubuntu I will certainly try
again, but until then I do not expect to solve this, especially since
you say you have never seen this before.

For completeness: I had ubuntu breezy installed, and used apt-pinning to
get the mlton package from ubuntu dapper.


 Thanks.

/ johan