On Fri, Feb 4, 2011 at 8:18 PM, John B Thiel <jbthiel@...> wrote:
> It takes 5 minutes and 300MB of core to compile a helloworld.sml with one
> print "Hello, world!\n";
The 300MB memory sounds ok, the 5 minutes not so much. My netbook with 2GB
of memory and windows 7 gets the job done in 10 seconds.
Was your system perhaps loaded up with a lot of memory hungry applications
and/or do you have very little RAM?
Another possibility is a virus scanner. There are several very poorly
designed virus scanners on windows which slow down file access insanely. Try
turning off your virus scanner and see if that helps.
The output of a '-verbose 3' compile could also be helpful.
On Mon, Feb 7, 2011 at 3:59 AM, John B Thiel <jbthiel@...> wrote:
> on a 1.66GHz/1GB ram/mswin7 notebook (well loaded, 12+ apps open)
This sounds like the root of the problem. With 1GB of physical RAM, MLton
decides to use up to 512MB of it. Given you have 12+ apps open, it seems
quite likely that the other apps have a combined working set + pinned pages
exceeding the 512MB. Hence the thrashing.
The policy of "half of physical RAM" is just a rule of thumb. The more
heavily loaded your machine (as a percentage of physical RAM) the less
appropriate it becomes.
It seems there is some runaway allocation with the default options on
> Windows, that unnecessarily overdrives into swap/thrashing.
I don't think it's runaway allocation.
If I recall correctly, MLton will use copying collection with a heap size of
twice the live set up until this would exceed the 50% mark. Since we've
established that your hello-world program needs ~100MB, MLton will allocate
400MB. That leaves 600MB for everything else during a garbage collection. I
believe Windows 7 takes somewhere in the ballpark of 200-300MB on its own,
so that leaves just 300MB for your 12+ applications.
So, my suggestions:
1. buy another 1GB of memory which should solve your problem outright (MLton
will leave 1GB to the other 12+ apps, which must be enough since you have
that much memory at the moment)
2. close all the applications you can while working on your MLton-compiled
Keep in mind that for larger projects 100MB will not be enough to compile
Get latest updates about Open Source Projects, Conferences and News.