Forked from
Knot projects / Knot DNS
Source project has a limited visibility.
-
Marek Vavrusa authored
- Simplified and decoupled I/O from processing code. - Single reader with multiple workers. - Reader is bound to specific CPU for lowest possible latency. - Reverted to select() instead of fdset wrapper as epoll/kqueue could be quite slower for a single or handful of sockets. - Reader I/O calls are non-blocking. General idea is: - Reader takes free request from a rx_queue - Receives data and pushes it to the tx_queue - Worker processes the packets, sends answers and returns the request to the rx_queue Semi lock-free queue is used for communication. This is measured to be slightly better than singlethreading, as socket contention could be better predicted - the reader cannot check sockets for new events when tx_queue is full. Change-Id: Ifc40889b355404a9e78e10d77c26cb3fc4c58386
Marek Vavrusa authored- Simplified and decoupled I/O from processing code. - Single reader with multiple workers. - Reader is bound to specific CPU for lowest possible latency. - Reverted to select() instead of fdset wrapper as epoll/kqueue could be quite slower for a single or handful of sockets. - Reader I/O calls are non-blocking. General idea is: - Reader takes free request from a rx_queue - Receives data and pushes it to the tx_queue - Worker processes the packets, sends answers and returns the request to the rx_queue Semi lock-free queue is used for communication. This is measured to be slightly better than singlethreading, as socket contention could be better predicted - the reader cannot check sockets for new events when tx_queue is full. Change-Id: Ifc40889b355404a9e78e10d77c26cb3fc4c58386