Re: [MLton] tuning up mlton gc
Bernard Berthomieu <[email protected]> Fri, 25 Jul 2014 19:03:33 +0200
| Newsgroups | gmane.comp.lang.ml.mlton.devel |
|---|---|
| Message-ID | <[email protected]> |
On 07/25/14 16:51, Matthew Fluet wrote: > I assume that you have tried using a larger value for 'ram-slop' > (which defaults to 0.5). That's the obvious place where the runtime > system has a 50% RAM limitation, Yes. > The motivation for that comment was that using 'fixed-heap X' often > results in creating two 'X / 2' heaps (due to the initial copying GC > strategy). Once one of those 'X / 2' sized heaps is filled with live > data, the runtime tries to switch over to mark-compact GC and resize > the 'X / 2' sized heap to an 'X' sized heap. On a 32-bit system, > though, with 'fixed-heap 3.5G', it is often the case that the virtual > memory system cannot remap a 1.25G heap to a 3.5G heap. I don't think > this is as much of an issue on a 64-bit system, since the 40-bit > virtual address space is usually significantly larger than RAM (and > therefore significantly larger than any reasonably 'fixed-heap X') and > there is usually no difficulty remapping. Yes. And I realize that I should have been more specific, sorry. I have no gripe at all on linux actually. But it happens that I more often use mac or solaris, that do not provide mremap. From heap.c, the treatment in that case explains the behavior I was referring to. To explain my reference to your old comment: if the two half heaps were initially created contiguous, then the gc could switch to markCompact without remapping or allocating any area, I guess. > The reason that 'may-page-heap true' is able to help is that it allows > the runtime system to write the 'X / 2' sized heap to disk, thereby > making things easier for the virtual memory system to satisfy a larger > mmap request. > Yes, though writing a large heap to the disk and reading it back takes a lot of time. Many thanks for your help. Bernard. ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds