[erlang-questions] how to break the problem. the erlang way?
Sun Aug 2 16:24:38 CEST 2009
On Jul 31, 2009, at 10:55 PM, Ovidiu Deac wrote:
> So basically allocating the memory for a new process should be very
> fast (like stack allocation?) and then growing/cleaning it's heap
> will be performed only when the process runs out of heap space. Since
> every process has it's own non-shared data then it will have a
> per-process gc which is guaranteed that it won't run as long as the
> process' heap needs fit in the min_heap_size provided by spawn_opt.
That's the basic idea, although I'm sure people more familiar with the
inner workings of the VM can provide more details.
> So if I determined a min_heap_size (after proper measurement of
> course) can I rely on the fact gc won't run on any platform? Or maybe
> this size depends on the erlang vm implementation? I'm thinking about
> 32 vs 64 bit platforms. If this is the case I should use the maximum
> detected for the intended deployment platforms.
Yes, 32 vs. 64 bit platforms will have different size requirements,
It would probably be a good idea profile on any platform you plan on
> For this tuning phase how can I detect that gc was called for a
Not sure, I would look at erlang:process_info() or some similar function
More information about the erlang-questions