Mohanraj V
Mohanraj V

Reputation: 41

What is the maximum number of sockets that epoll can handle?

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

Answers (2)

user149341
user149341

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

backtrack
backtrack

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

Related Questions