|
|
|
|
|
by zedshaw
5797 days ago
|
|
It's actually a really simple concept what's "active" in poll vs. epoll. Your call to poll and epoll basically looks like this: active_fds = poll(big_ass_array_of_fds, total_fds) epoll is slightly different but same concept. You have a total number of FDs you're want to know about, and each call returns a number that have had activity. And that's it. You then just do active_fds/total_fds and that gives the ATR. If this is < 0.6 after your call to poll, then that call to poll would have been better done with epoll. If the active_fd/total_fd is > 0.6 then it's better to stick with poll. Of course, it's more complicated than that, but this gives you a simple metric of the break point where one is better than another. |
|