> Yes I've been mulling a solution, but perhaps you could suggest.
> 
> GCL is in the process of enabling full use of today's common >2Gb
> memories.  We probe brk at startup to get an effective maximum heap and
> manage accordingly.  We need to allow some fraction for subprocess gcc,
> and perhaps some consideration for other running processes, while still
> allowing the full minimal-gc power to those (e.g. ACL2) who demand it.
> I need to come up with a sane default and then provide an escape setting
> for the power user.
> 
> Each of the failures you reported were ENOMEM failures on fork for gcc
> (invoked via compile), i.e. the heap proper was handled well within the
> runtime determined limits.  I have no idea how to bound or estimate
> subprocess gcc memory usage.

I'm not a programmer myself, but if GCL_MEM_MULTIPLE is the fraction
of memory which is available for GCL, and 1.0 is the default, then GCL
may in fact consume all memory, leaving no memory at all for other
processes. I think this is definitely bad.

Maybe 0.5 would be a better default. Those who need more memory will
know how to fiddle with the variable anyway (i.e. those who need *less*
that the other half for the *other* processes will know how to
fiddle with the variable).


What I do to estimate the amount of memory a given package needs to be
built is to take this value once per second:

awk '/Committed_AS:/ { print $2 }' /proc/meminfo

I take an initial measure before building the package which I then
substract to all other values (that way the memory used by system
processes is not included).

By doing that on the maxima package I get that it needs more than
5.6 GB of RAM. I think this is definitely too much considering that I
was able to built maxima with only 2GB of RAM and 2 GB of swap in the
past.

Thanks.

Reply via email to