… | |
… | |
317 | For few fds, this backend is a bit little slower than poll and select, |
317 | For few fds, this backend is a bit little slower than poll and select, |
318 | but it scales phenomenally better. While poll and select usually scale |
318 | but it scales phenomenally better. While poll and select usually scale |
319 | like O(total_fds) where n is the total number of fds (or the highest fd), |
319 | like O(total_fds) where n is the total number of fds (or the highest fd), |
320 | epoll scales either O(1) or O(active_fds). The epoll design has a number |
320 | epoll scales either O(1) or O(active_fds). The epoll design has a number |
321 | of shortcomings, such as silently dropping events in some hard-to-detect |
321 | of shortcomings, such as silently dropping events in some hard-to-detect |
322 | cases and rewuiring a syscall per fd change, no fork support and bad |
322 | cases and rewiring a syscall per fd change, no fork support and bad |
323 | support for dup: |
323 | support for dup: |
324 | |
324 | |
325 | While stopping, setting and starting an I/O watcher in the same iteration |
325 | While stopping, setting and starting an I/O watcher in the same iteration |
326 | will result in some caching, there is still a syscall per such incident |
326 | will result in some caching, there is still a syscall per such incident |
327 | (because the fd could point to a different file description now), so its |
327 | (because the fd could point to a different file description now), so its |