Reputation: 41
I have used upto 1000 sockets in epoll. Is it possible to use million sockets in single epoll ? Is it efficient ?.
Upvotes: 2
Views: 3642
Reputation:
Unlike with select()
, there is no intrinsic limit on the number of sockets managed by epoll()
. So long as you don't hit any extrinsic limits on the number of sockets in general, like the maximum number of file descriptors in the system, or kernel memory, you can use as many sockets as you want with epoll()
.
Upvotes: 3
Reputation: 8144
500,000 TCP connections from a single server is the gold standard these days. The record is over a million. It does require kernel tuning. See, for example, Linux Kernel Tuning for C500k. (https://news.ycombinator.com/item?id=1740823)
Upvotes: 4