max nodes on one server

Erwan MAS <>
Fri Mar 26 19:01:14 CET 2010


Hello ,

I tried to start many nodes on one server .

Currently i can not  have more than 1017 nodes .

My system is rhel 5.4 .

On the shell , before i start the command , i set the max open file limit with ulimit -n 4096 .

my erl command is :

erl -hidden -connect_all false  -rsh ssh +K true -env ERL_MAX_PORTS 4096  +P 134217727

I think i reach a limit but i dont know which ?



ps :
My code is  :

startnodes(NumberOfNodes, NodeNamePrefix) ->
        startnodes1(NumberOfNodes, NodeNamePrefix, []).
startnodes1(0, _NodeNamePrefix, Acc) ->
        Acc;
startnodes1(NumberOfNodes, NodeNamePrefix, Acc) ->
        NodeName =  "benchnode"++ atom_to_list(NodeNamePrefix)  ++ integer_to_list(NumberOfNodes),
        Args = "-setcookie " ++ atom_to_list(erlang:get_cookie()),
        Pas = case init:get_argument(pa) of
                          error ->
                                  "";
                          {ok, Palist} ->
                                  lists:foldl(
                                        fun(X, Str) ->
                                                Str ++ " -pa " ++ filename:absname(X) end,
                                        "",
                                        lists:append(Palist))
                  end,
        Res=slave:start_link("localhost", NodeName, Args ++ Pas),
        case Res of
                {ok, Node} ->
                        startnodes1(NumberOfNodes - 1, NodeNamePrefix, Acc ++ [Node]) ;
                Error ->
                        io:format("Error ~p OK~n", [Error]),
                        io:format("~p processes was not started.~n", [NumberOfNodes]),
                        Acc
        end.

-- 
Erwan MAS  


More information about the erlang-questions mailing list