From 04dae4bf6b11b5aad383f95be6a77863a7c2f6ec Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 27 Apr 2010 15:20:53 -0700 Subject: setting size of buffers from device args --- host/docs/usrp2.rst | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'host/docs') diff --git a/host/docs/usrp2.rst b/host/docs/usrp2.rst index 092332442..f4c36fb27 100644 --- a/host/docs/usrp2.rst +++ b/host/docs/usrp2.rst @@ -126,3 +126,38 @@ MAC addresses, control packets, and fast-path settings. **Monitor the host network traffic:** Use wireshark to monitor packets sent to and received from the USRP2. + +------------------------------------------------------------------------ +Resize the send and receive buffers +------------------------------------------------------------------------ +It may be useful increase the size of the socket buffers to +move the burden of buffering samples into the kernel, or to +buffer incoming samples faster than they can be processed. +However, if you application cannot process samples fast enough, +no amount of buffering can save you. + +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Device address params +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +To set the size of the buffers, +the usrp2 will accept two optional parameters in the device address. +Each parameter will accept a numeric value for the number of bytes. + +* recv_buff_size +* send_buff_size + +Example, set the args string to the following: +:: + + addr=192.168.10.2, recv_buff_size=100e6 + +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +OS specific notes +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +On linux, the maximum buffer sizes are capped by the sysctl values +**net.core.rmem_max** and **net.core.wmem_max**. +To change the maximum values, run the following commands: +:: + + sudo sysctl -w net.core.rmem_max= + sudo sysctl -w net.core.wmem_max= -- cgit v1.2.3