Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

epoll VS select

Tags:

select

epoll

I have read a couple of networking books to get some idea of differences between epoll and select but they only covered this concepts slightly. I will be appreciated if you guys can provide me the key differences in details.

Thanks in advance

like image 660
codereviewanskquestions Avatar asked Jun 10 '11 07:06

codereviewanskquestions


1 Answers

select is the standard Unix facility for doing asynchronous IO. Its programming interface is quirky, and its implementation in most Unixes is mediocre at best. It also imposes a limit on the maximum number of descriptors a process can watch, which is inconvenient in an application. Regarding efficiency, the performance of select usually degrades linearly with the number of descriptors.

epoll is a huge improvement over select in terms of programming interface and efficiency, but is only provided in Linux starting from version 2.6. Other Unixes have their specialised calls, too.

like image 156
Blagovest Buyukliev Avatar answered Sep 20 '22 14:09

Blagovest Buyukliev