Discussion:
[polyml] Run out of store - interrupting threads
David Matthews
2014-05-15 11:15:37 UTC
Permalink
This question arose from something on the isabelle-dev list but I think
it's really of general interest.

Currently Poly/ML only gives the "Run out of store - interrupting
threads" message if it really cannot allocate the required memory after
a full GC. This is actually rather unlikely for small cells. Instead
as the amount of free space left in the heap gets smaller the GC runs
more and more often. The ML code is still making progress but only very
slowly. I wonder if there is a case for actually giving up at that
point. Is it better to plough on in the hope that the program will
complete or is it more helpful to produce a message and allow the user
to try with more memory? This situation is most likely to happen if the
heap space is restricted either because the address space limit has been
reached in 32-bit mode or if the maximum heap has been set too low with
--maxheap.

David
mmoel
2014-05-15 16:17:36 UTC
Permalink
Hi,

some Prologs have predicates to inform the user of
gc, memory usage and timings at runtime. Embedded
in ones code this is also helpful to write more efficient
code.


Michael
This question arose from something on the isabelle-dev list but I think it's
really of general interest.
Currently Poly/ML only gives the "Run out of store - interrupting threads"
message if it really cannot allocate the required memory after a full GC.
This is actually rather unlikely for small cells. Instead as the amount of
free space left in the heap gets smaller the GC runs more and more often.
The ML code is still making progress but only very slowly. I wonder if there
is a case for actually giving up at that point. Is it better to plough on in
the hope that the program will complete or is it more helpful to produce a
message and allow the user to try with more memory? This situation is most
likely to happen if the heap space is restricted either because the address
space limit has been reached in 32-bit mode or if the maximum heap has been
set too low with --maxheap.
David
_______________________________________________
polyml mailing list
polyml at inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
David Matthews
2014-05-17 15:51:41 UTC
Permalink
Poly/ML has the Statistics structure that provides this information but
it requires the user program to actively poll it.

David
Post by mmoel
Hi,
some Prologs have predicates to inform the user of
gc, memory usage and timings at runtime. Embedded
in ones code this is also helpful to write more efficient
code.
Michael
Post by David Matthews
This question arose from something on the isabelle-dev list but I
think it's really of general interest.
Currently Poly/ML only gives the "Run out of store - interrupting
threads" message if it really cannot allocate the required memory
after a full GC. This is actually rather unlikely for small cells.
Instead as the amount of free space left in the heap gets smaller the
GC runs more and more often. The ML code is still making progress but
only very slowly. I wonder if there is a case for actually giving up
at that point. Is it better to plough on in the hope that the program
will complete or is it more helpful to produce a message and allow the
user to try with more memory? This situation is most likely to happen
if the heap space is restricted either because the address space limit
has been reached in 32-bit mode or if the maximum heap has been set
too low with --maxheap.
David
_______________________________________________
polyml mailing list
polyml at inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
_______________________________________________
polyml mailing list
polyml at inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
mmoel
2014-05-17 23:07:14 UTC
Permalink
I didn't miss 'Statistics' as yet since I rarely max out
the machines. Good to know it's there. I just gave it a try
in a program which runs quite some time building some large
binary trees. The resulting record leaves nothing to be
desired.
However, if it's only about whether to continue a process
or not while running out of memory the PolyML engine will do
better than some home-made exception handling.


Michael
Poly/ML has the Statistics structure that provides this information but it
requires the user program to actively poll it.
David
Post by mmoel
Hi,
some Prologs have predicates to inform the user of
gc, memory usage and timings at runtime. Embedded
in ones code this is also helpful to write more efficient
code.
Michael
Post by David Matthews
This question arose from something on the isabelle-dev list but I
think it's really of general interest.
Currently Poly/ML only gives the "Run out of store - interrupting
threads" message if it really cannot allocate the required memory
after a full GC. This is actually rather unlikely for small cells.
Instead as the amount of free space left in the heap gets smaller the
GC runs more and more often. The ML code is still making progress but
only very slowly. I wonder if there is a case for actually giving up
at that point. Is it better to plough on in the hope that the program
will complete or is it more helpful to produce a message and allow the
user to try with more memory? This situation is most likely to happen
if the heap space is restricted either because the address space limit
has been reached in 32-bit mode or if the maximum heap has been set
too low with --maxheap.
David
_______________________________________________
polyml mailing list
polyml at inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
_______________________________________________
polyml mailing list
polyml at inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
_______________________________________________
polyml mailing list
polyml at inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
Loading...