3 ms·
I've never been able to get Linux to give me this many file descriptors. If you can convince your OS to give you enough fds, handling 100,000 idle connections
by jrockway 17y ago
I've never been able to get Linux to give me this many file descriptors. If you can convince your OS to give you enough fds, handling 100,000 idle connections is no more difficult than handling one idle connection. The OS feature that polls for activity is O(1) over the number of fds to poll. The memory your app needs to keep each connection alive is minimal, and of course scales linearly.
People like throwing around the number 100,000... but this is really nothing to be excited about. Having 100,000 users is much more exciting than having 100,000 sockets connected from 127.0.0.1...
- ytinas 17y agoWhen you say "The OS feature that polls for activity" do you mean epoll/kevent? Because otherwise (and even then I think) it isn't O(1). http://www.kegel.com/c10k.html http://www.kegel.com/c10k.html
- ig1 17y agohttp://www.metabrew.com/article/a-million-user-comet-application-with-mochiweb-part-3 http://www.metabrew.com/article/a-million-user-comet-applica...
- z8000 17y ago"I've never been able to get Linux to give me this many file descriptors." What do you mean precisely? Do you mean that even with proper ulimit, sysctl, etc setup Linux fails to give you this many descriptors?