[erlang-questions] stress test with tcp_server

Per Hedeland per@REDACTED
Tue Jun 26 13:14:30 CEST 2007

Gaspar Chilingarov <nm@REDACTED> 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.

No, it's per-process (and, separately, system-wide):

>  kern.maxfilesperproc: 20000

>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

Strange, I had no problem (on FreeBSD) making "almost" ('ulimit -n')/2
connections (with client and server in same Erlang node). E.g. with your
sysctl settings above and a fresh login, 9997 connections. (Besides
stdin/out/err the VM uses a few descriptors internally.)

--Per Hedeland

More information about the erlang-questions mailing list