erlang VM memory utilization

Jani Launonen launoja@REDACTED
Sun Jul 30 17:29:47 CEST 2006

Only OpenSource kirjoitti 30.7.2006 kello 16.46:

> Hello
> Let's say there are two independent erlang processes
> started on the same machine from two different terminals
> under the same user (uid) context.
> Given the scenario, here are my queries -
> 1. how many VM instances are running ?

Two. But you could use the second VM's terminal to just spawn another  
process in the first one, assuming named (distributed) nodes. See  
below. Or (still assuming named nodes) you could make remote  
connection to the first one with erlang shell and spawn things there  
and quit the second VM. Others propably fill you in in the erlang  
shell trickery.

> 2. does the second VM try to connect to the first instance
>   and share the memory structures that load the base library ?

No. They are indepedent and unaware of each other. You could of  
course make them named nodes (-sname a_node   and the other vm  
started with -sname b_node for example. See 

> 3. assuming one VM consumes x Mb of memory to load the base library
>   then does running two VM instance consume 2x Mb of memory ?

Yes. VM propably have read only pages shared, but the erlang (byte) 
code itself is propably non shared as they might have different  
versions loaded.

> Would be thankful if experienced members could share some insight
> on the memory utilization issue.

I hope I helped a bit.

> Thanks in advance

No problem.

> -- 
> oo@@oo

More information about the erlang-questions mailing list