[erlang-questions] stress test with tcp_server
Oscar Hellström
oscar@REDACTED
Mon Jul 2 13:03:30 CEST 2007
Hi
Gaspar Chilingarov wrote:
> Jeremy Chow wrote:
>> I've tried use command ulimit to increase the file descriptors number to
>> 10240.
>> but the connections number was no more than 1024, sometimes is 1017,
>> sometimes is 1018.
>
> it depends how much files descriptors already allocated by this user at
> the moment -- because file descriptor limit is set for users and not for
> 1 process.
>
> Anyway, after some experiments with FreeBSD I was able to push max
> connection count to 4999 open connections
>
> You should tune sysctl's to increase a hard limits
> kern.maxfiles: 25000
> kern.maxfilesperproc: 20000
>
> I've also tried to increase kern.ipc.nmbclusters=64000 but without success.
>
> Are there any limit in 5000 FD's hard coded in erlang???
No, but if I remember correctly FreeBSD also has a setting for max
sockets per process, not only FD's (this could be another BSD though).
Also, depending on the application the maximum number of processes (+P)
can affect the situation.
$ sysctl -a | grep max might give hints :)
I've had over 20000 connections without problems using FreeBSD.
> Setting ERL_MAX_PORTS also does not change the situation.
>
> /Gaspar
>
Best Regards
--
Oscar Hellström, oscar@REDACTED
Erlang Training and Consulting
http://www.erlang-consulting.com/
More information about the erlang-questions
mailing list