diff options
author | Josh Blum <josh@joshknows.com> | 2011-07-17 20:12:56 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-07-17 20:12:56 -0700 |
commit | 60edbd7f59c873ce69ddb5b337e640f479a28321 (patch) | |
tree | 6f48bc0bbbd3abeb55043d38d12d3230b848d222 /host/docs/transport.rst | |
parent | 88f3da8fff01c505d4d2d5524f34c12d2a09030f (diff) | |
download | uhd-60edbd7f59c873ce69ddb5b337e640f479a28321.tar.gz uhd-60edbd7f59c873ce69ddb5b337e640f479a28321.tar.bz2 uhd-60edbd7f59c873ce69ddb5b337e640f479a28321.zip |
udp: squashed the wsa work and added documentation work
Diffstat (limited to 'host/docs/transport.rst')
-rw-r--r-- | host/docs/transport.rst | 42 |
1 files changed, 30 insertions, 12 deletions
diff --git a/host/docs/transport.rst b/host/docs/transport.rst index f28d1efcb..b601cd8ff 100644 --- a/host/docs/transport.rst +++ b/host/docs/transport.rst @@ -19,7 +19,10 @@ The transport parameters are defined below for the various transports in the UHD ------------------------------------------------------------------------ UDP transport (sockets) ------------------------------------------------------------------------ -The UDP transport is implemented with standard user-space/Berkeley sockets. +The UDP transport is implemented with user-space sockets: + +* **UNIX:** standard Berkeley sockets API using send()/recv() +* **Windows:** Windows Sockets API (WSA) using overlapped IO ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Transport parameters @@ -31,21 +34,18 @@ The following parameters can be used to alter the transport's default behavior: * **send_frame_size:** The size of a single send buffer in bytes * **num_send_frames:** The number of send buffers to allocate -**Note1:** num_recv_frames and num_send_frames do not affect performance. +**Note1:** +num_recv_frames does not affect performance (all platforms). + +**Note2:** +num_send_frames does not affect performance (UNIX only). -**Note2:** recv_frame_size and send_frame_size can be used to +**Note3:** +recv_frame_size and send_frame_size can be used to increase or decrease the maximum number of samples per packet. The frame sizes default to an MTU of 1472 bytes per IP/UDP packet, and may be increased if permitted by your network hardware. -**Note3:** For lower latency at low sample rates, use smaller buffers - -**Note4:** For overall lower latency, look for Interrupt Coalescing settings -for your OS and ethernet chipset. It seems the Intel ethernet chipsets offer -fine-grained control in Linux. Also, consult: - -* http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.prftungd/doc/prftungd/interrupt_coal.htm - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Flow control parameters ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -73,6 +73,25 @@ The following parameters can be used to alter socket's buffer sizes: **Note:** Large send buffers tend to decrease transmit performance. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Latency Optimization +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Latency is a measurement of the time it takes a sample to travel between the host and device. +Most computer hardware and software is bandwidth optimized which may negatively affect latency. +If your application has strict latency requirements, please consider the following notes: + +**Note1:** +The time taken by the device to populate a packet is proportional to the sample rate. +Therefore, to improve receive latency, configure the transport for a smaller frame size. + +**Note2:** +For overall latency improvements, +look for "Interrupt Coalescing" settings for your OS and ethernet chipset. +It seems the Intel ethernet chipsets offer fine-grained control in Linux. +Also, consult: + +* http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.prftungd/doc/prftungd/interrupt_coal.htm + +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Linux specific notes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ On linux, the maximum buffer sizes are capped by the sysctl values @@ -90,7 +109,6 @@ Windows specific notes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ On Windows, it is important to change the default UDP behavior such that 1500 byte packets still travel through the fast path of the sockets stack. - FastSendDatagramThreshold registry key to change documented here: * http://www.microsoft.com/windows/windowsmedia/howto/articles/optimize_web.aspx#appendix_e |