optimize the use of erlang processes ????

Sanjaya Vitharana sanjaya@REDACTED
Wed Apr 5 08:29:39 CEST 2006


Hi ... !!!

Environment Summary:
4GB HP Server
Running Mnesia Fragmented Table (Exactly the Same Copy) on 2 nodes. They are working independently to each other.
    Node 1: Running the actual db with 375459 records (started with +A255)
    Node 2: Using for load testing etc. (started with +A255)


Problem:
Node2 Crashed when started to add records (Very Small amount of records ~100000 ... mmmm not sure but Very Less). There are plenty of memory available in the system when node 2 crashed (Note the total used memory as crash_dump 512Mb)

crash_dump:

Slogan: eheap_alloc: Cannot allocate 1271244 bytes of memory (of type "old_heap").
System version: Erlang (BEAM) emulator version 5.4.12 [source] [hipe] [threads:255]
Compiled: Mon Jan 16 14:59:19 2006
Atoms: 10435
=memory
total: 512729384
processes: 15884970
processes_used: 15868210
system: 496844414
atom: 464421
atom_used: 459809
binary: 351077627
code: 3989398
ets: 140681800

My Solution:
When I  restarted the Node 2 with +A64 it adds up to 2220000 records

Questions:
Q1.) Are there any dependencies with 2 nodes started with +A255 ? Why it works when the second node started with +A64 ?
Q2.) What is the best way to optimize the processes used by each node? I mean putting +A32 will work, but reduce the performance OR putting +A192 will also work but it uses more processes than it needs. So how to tune up the applications to get the resources as there need?
Q3.) What is the "old_heap" ??? And When & Why it uses??
Q4.) What is the eheap and when & how it used ?
Q5.) Are there any relation between c malloc and erlang eheap_alloc ?
Q6.) How to get the details of available/used number of processes in erlang?
Q7.) How the total number of erlang processes depends with the OS ??
Q8.) How to get the details of Linux resources which erlang depends on?? (Ex System Processes, Threads .. etc)
Q9.) What is the maximum number of processes can be used in a single erlang system.
Q10.) If we started several erlang nodes/systems are there any shared resources among them. If yes, how to get the details of them?

Thanks in advance.

Sanjaya Vitharana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20060405/84735441/attachment.htm>


More information about the erlang-questions mailing list