|
Udipe 1.0
Solving the riddle of high-throughput UDP
|
#include <buffer.h>
Data Fields | |
| size_t | buffer_size |
| size_t | buffer_count |
Tunable buffering parameters for one worker thread
This is the value returned by the udipe_buffer_config_callback_t for each worker thread, used to tune each thread's memory management policy.
| size_t udipe_buffer_config_s::buffer_count |
Number of I/O buffers that a worker thread manages
This indirectly controls the number of concurrent I/O requests that a worker thread can start before being forced to wait for pending requests to complete. It cannot be larger than UDIPE_MAX_BUFFERS.
A value of 0 requests the default buffer count, which is adjusted such that there is at least one buffer and the buffers collectively fit...
| size_t udipe_buffer_config_s::buffer_size |
Size of an individual I/O buffer in bytes
This controls the size of the buffers within which a worker thread will hold incoming or outgoing UDP datagrams, or batches thereof when the GRO/GSO optimization is enabled.
A value of 0 requests the default buffer size, which is adjusted such that each buffer fits within the L1 cache of any CPU on which the worker thread may execute.
A nonzero value requests a specific buffer size. This buffer size must be greater than the UDP MTU for any UDP socket that the worker thread is destined to interact with (9216 bytes being the upper MTU limit for typical Ethernet equipment if you want a safe default).
The actual buffer size will be rounded up to the next multiple of the host system's smallest page size.