SIPP: open file limit > FD_SETSIZE

chuhx picture chuhx · Nov 20, 2013 · Viewed 9.1k times · Source

actually I try to start SIPP 3.3 on opensuse 11 with a bash console with java. When I start SIPP with

proc = Runtime.getRuntime().exec("/bin/bash", null, wd);

... 

printWriter.println("./sipp -i "+Config.IP+" -sf uac.xml "+Config.IP+":5060");

the error stream gives the following output

Warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE = 1024 Resolving remote host '137.58.120.17'... Done.

What does the warning means? And is it possible that the bash terminal freezes because of this warning? How can i remove this warning?

Answer

rkday picture rkday · Feb 2, 2014

I'm the maintainer of SIPp and I've been looking into the FD_SETSIZE issues recently.

As is mentioned at Increasing limit of FD_SETSIZE and select, FD_SETSIZE is the maximum file descriptor that can be passed to the select() call, as it uses a bit-field internally to keep track of file descriptors. SIPp had code in it to check its own maximum open file limit (i.e. the one shown by ulimit -n), and if it was larger than FD_SETSIZE, to reduce it to FD_SETSIZE in order to avoid issues with select().

However, this has actually been unnecessary for a while - SIPp has used poll() rather than select() (which doesn't have the FD_SETSIZE limit, and has been POSIX-standardised and portable since 2001) since before I became maintainer in 2012. SIPp now also uses epoll where available for even better performance, as of the v3.4 release.

I've now removed this FD_SETSIZE check in the development code at https://github.com/SIPp/sipp, and replaced it with a more sensible check - making sure that the maximum number of open sockets (plus the maximum number of open calls, each of which may open its own media socket) is below the maximum number of file descriptors.