epoll poll select
时间: 2023-10-13 20:03:51 浏览: 124
在Linux中,epoll、poll和select是实现IO多路复用机制的三种方式。其中,epoll在连接数少且连接活跃的情况下性能最好,因为它采用了回调机制,避免了轮询的开销,而且不会受到文件描述符数量增加的影响。相比之下,select和poll都采用了轮询的方式来检查文件描述符是否处于就绪态,随着文件描述符数量的增加,它们的效率会线性降低。所以,在连接数量较少且连接活跃的情况下,select和poll的性能可能会比epoll好。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [select,poll和epoll详解](https://blog.csdn.net/u010306832/article/details/119942290)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* [select、poll、epoll详解](https://blog.csdn.net/fengyuyeguirenenen/article/details/124234675)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文