|use of select() and file-descriptor limit [message #1837587]
||Tue, 02 February 2021 20:08
| Harald Welte
Registered: July 2017
Location: Berlin, Germany
At least in some situations, TITAN is using the venerable select() system call for handling non-blocking I/O to the various file descriptors. select() is well-understood, but also has several quite strong disadvantages:|
* it only supports 1024 file descriptors; specifically, it only supports file descriptor numbers less than 1024. So even if you have less than 1024 file descriptors open, as soon as one of them is > 1024 in numeric value, it won't work with select anymore
* it is extremely slow on the system call, as thre is a lot of clearing and scanning of that 1024-bit-array happening all the time
I've been seeing the warnings like this ever since I started to use TITAN for the first time some years ago:
Warning: The maximum number of open file descriptors (500000) is greater than FD_SETSIZE (1024). Ensure that Test Ports using Install_Handler do not try to wait for events of file descriptors with values greater than FD_SETSIZE (1024). (Current caller of Install_Handler is "SCTP_PORT")
On occasion, particularly in large setups with lots of components and ports, I believe I've been running into that limit.
Now I did a bit of grep'ing in the source, and it seems EPOLL is supported. Maybe not in all parts of the code For example core/Port.cc doesn't seem to cotnain EPOLL support, but mctr2 does? Maybe it's simply not enabled in the Debian builds?
Does anyone have more information about this? Thanks!
Also, is there some documentation on which parts of TITAN suffer from this limitation, and how/where does that manifest itself?
Powered by FUDForum
. Page generated in 0.02057 seconds