… | |
… | |
358 | For few fds, this backend is a bit little slower than poll and select, |
358 | For few fds, this backend is a bit little slower than poll and select, |
359 | but it scales phenomenally better. While poll and select usually scale |
359 | but it scales phenomenally better. While poll and select usually scale |
360 | like O(total_fds) where n is the total number of fds (or the highest fd), |
360 | like O(total_fds) where n is the total number of fds (or the highest fd), |
361 | epoll scales either O(1) or O(active_fds). The epoll design has a number |
361 | epoll scales either O(1) or O(active_fds). The epoll design has a number |
362 | of shortcomings, such as silently dropping events in some hard-to-detect |
362 | of shortcomings, such as silently dropping events in some hard-to-detect |
363 | cases and rewiring a syscall per fd change, no fork support and bad |
363 | cases and requiring a syscall per fd change, no fork support and bad |
364 | support for dup. |
364 | support for dup. |
365 | |
365 | |
366 | While stopping, setting and starting an I/O watcher in the same iteration |
366 | While stopping, setting and starting an I/O watcher in the same iteration |
367 | will result in some caching, there is still a syscall per such incident |
367 | will result in some caching, there is still a syscall per such incident |
368 | (because the fd could point to a different file description now), so its |
368 | (because the fd could point to a different file description now), so its |