Select() latency spikes under high concurrent file descriptor load
0 reputation · 17 Nov 2021, 18:44 UTC
0 reputation · 17 Nov 2021, 18:44 UTC
The POSIX select() API is widely used for monitoring multiple file descriptors, but its performance under concurrent high‑load conditions is uncertain. The specification intentionally leaves the algorithm for evaluating readiness unspecified, allowing implementations to choose from linear scans, bitmap checks, or kernel‑level event notification. In practice, many modern Unix kernels iterate over the entire set of descriptors for each call, which can lead to O(n) latency spikes when hundreds or thousands of descriptors are monitored concurrently.
We need to understand how a given kernel behaves when select() is invoked on a large set of descriptors while many concurrent I/O operations are in flight. The goal is to determine whether the observed latency is due to the unspecified algorithm choice and how it scales with the number of descriptors.
Key constraints and uncertainties:
select().
Specific questions for investigation:
select() when monitoring thousands of file descriptors?select() scale with the number of monitored descriptors under concurrent I/O activity?select() in high‑concurrency environments?A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.