[Twisted-Python] Max number of simultaneous TCP connection

Is there a maximum number of simultaneous connection for the TCPServer? I already set the ulimit -n 10000. But it fails to accept connection once it reaches about 1024. Any way to increase it ? Thanks. ========================================================================================== 進修英語, 機會處處! 兼享政府進修資助 - http://adimages.sina.com.hk/WSI_0704.html 七.一 遊行最新發展 - http://news.sina.com.hk/focus/20040628/ 歐洲國家盃 最後決戰! - http://euro04.sina.com.hk/

On Mon, 2004-07-05 at 02:49, klcheung0829@sinaman.com wrote:
ulimit may still be 1024, if you're not root. Check again after setting it. Also there may be kernel limitations (changeable somewhre in /proc) etc.. -- Itamar Shtull-Trauring http://itamarst.org

Has there been any work into seeing how many simultaneous connections twisted can handle? Python gets a lot of flack for being slow, and as far as I know twisted is completely, if not mostly written in python, so does that put limitations on what one can handle? Could a twisted app possibly handle 10k connections easily? Itamar Shtull-Trauring wrote:

On Jul 5, 2004, at 2:49 AM, klcheung0829@sinaman.com wrote:
This is a limit on the select() system call, which twisted uses in its default reactor. The maximum is changable via a #define (for C code), but you'd have to recompile python to do that. Fortunately, twisted includes a poll-based reactor, which doesn't have this limit. Use "twistd --reactor=poll". BTW, the python poll API is such that epoll support could be added with no python-level API change. The python poll() object already uses add and remove methods with no way to read back the current list, so changing it to maintain the state in the kernel instead of in userspace should be pretty easy. James

On Mon, 2004-07-05 at 02:49, klcheung0829@sinaman.com wrote:
ulimit may still be 1024, if you're not root. Check again after setting it. Also there may be kernel limitations (changeable somewhre in /proc) etc.. -- Itamar Shtull-Trauring http://itamarst.org

Has there been any work into seeing how many simultaneous connections twisted can handle? Python gets a lot of flack for being slow, and as far as I know twisted is completely, if not mostly written in python, so does that put limitations on what one can handle? Could a twisted app possibly handle 10k connections easily? Itamar Shtull-Trauring wrote:

On Jul 5, 2004, at 2:49 AM, klcheung0829@sinaman.com wrote:
This is a limit on the select() system call, which twisted uses in its default reactor. The maximum is changable via a #define (for C code), but you'd have to recompile python to do that. Fortunately, twisted includes a poll-based reactor, which doesn't have this limit. Use "twistd --reactor=poll". BTW, the python poll API is such that epoll support could be added with no python-level API change. The python poll() object already uses add and remove methods with no way to read back the current list, so changing it to maintain the state in the kernel instead of in userspace should be pretty easy. James
participants (4)
-
Itamar Shtull-Trauring
-
James Y Knight
-
klcheung0829@sinaman.com
-
orbitz