Grokking Operating Systems and Networking for Backend Engineers
Vote

0% completed

​

Select, Poll and Epoll

Checkout's event loop holds 10,000 open connections, and at any moment only one of them has a new order waiting. A test program on a cloud server built the same situation with 10,000 descriptors, one of them ready. One poll call that asked about all 10,000 took 99.6 microseconds. One epoll_wait call that asked the same question took 0.18 microseconds, which is more than 500 times less.

Both calls returned the same answer: one descriptor is ready. The difference is in how much work the kernel did to find it, and that work is repeated every time the loop wakes up.

This page explains why

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content