With a single file descriptor, Is there any performance difference between select, poll and epoll and …?

后端 未结 3 1909
花落未央
花落未央 2021-02-01 08:28

The title really says it all.

The and ... means also include pselect and ppoll..

The server project I\'m working on basically structured with multiple threads.

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-01 08:49

    According to the link: http://www.intelliproject.net/articles/showArticle/index/io_multiplexing.

    If you use only one descriptor:

    • select: 201 micro seconds.
    • poll: 159 micro seconds.
    • epoll: 176 micro seconds.

    Seems poll will be a better solution in such situation.

提交回复
热议问题