Home > OS >  About the poll IO reuse great god for help
About the poll IO reuse great god for help

Time:10-12

A lot of information about poll compared to select, break through a limit on the number of file descriptors, but I don't know is that a process can open file descriptors is limited, total number of system can open file descriptors are capped, why didn't they said poll the file descriptor limit?

CodePudding user response:

1. The process is the number of open file descriptors (ulimit -n), total number of system can open file descriptors (/proc/sys/fs/file - Max) can be set manually.
Support 2. Select one of the biggest by macro FD_SETSIZE limit to the number file description, this value defaults to 1024, so the select a file descriptor limit.
This macro definition is the kernel, modify the macro to reweave the kernel, more than the default value may cause the select poor performance.
3. The poll improved the implementation of the select, not the file descriptor limit, maximum limit is the system to total number of open file descriptors (/proc/sys/fs/file - Max)
But its essence is the same, and the select are traversing scan the entire file descriptor set, when the file descriptor is too much, nature also have performance bottlenecks, hence the epoll is introduced.

CodePudding user response:

Be suddenly enlightened, thanks huh??

CodePudding user response:

With epoll!
  • Related