Re: KQueue vs Select (NetMap)

From: Jan Bramkamp <crest_at_rlwinm.de>
Date: Thu, 29 May 2014 05:30:00 +0200
On 29.05.2014 03:04, Fred Pedrisa wrote:
> Hey Guys,
>
>  
>
> How does kQueue performs over select with netmap ?
You are asking for a comparison between apples and oranges. Netmap is an
API for high performance access to the low-level features of modern
NICs. It works on batches of frames in hardware queues.

The kqueue() and kevent() system calls are an event notification API. It
is mostly used by application dealing with a large amount of
non-blocking sockets (or other file descriptors). It reduces overhead
inherent in select() and poll() by preserving state between calls. It
also supports multiple types of events (read ready, write ready, timer
expired, async i/o, etc.).

Afaik the netmap pseudo-device supports only select() and poll(). This
is no performance problem because every thread will only deal with a
small number of file descriptors to netmap devices.

Netmap is designed to bypass the FreeBSD IP stack (for most frames).
Kqueue is designed to scale to many sockets per process within the
FreeBSD IP stack.
Received on Thu May 29 2014 - 01:30:11 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:49 UTC