Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > eb4b034508697cc17e7c9cfffe7f772b > files > 851

uhd-doc-3.7.2-3.mga5.noarch.rpm

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.12: http://docutils.sourceforge.net/" />
<title>UHD - System Configuration for USRP X3x0 Series</title>
<style type="text/css">

body{
font-family:Arial, Helvetica, sans-serif;
font-size:11pt;
color:black;
background-color:white;
width:90%;
margin:0 auto 0 auto;
}

div.document div.contents{
border:1px solid #333333;
padding:10px 30px 10px 10px;
margin-left:50px;
color:inherit;
background-color:#FCFCFC;
display:inline-block;
}

div.document p.topic-title{
font-weight:bold;
}

div.document a:link, div.document a:visited{
color:#236B8E;
background-color:inherit;
text-decoration:none;
}

div.document a:hover{
color:#4985D6;
background-color:inherit;
text-decoration:none;
}

div.document h1.title{
font-size:150%;
border-left:1px solid #333333;
border-bottom:1px solid #333333;
text-align:left;
padding:10px 0px 10px 10px;
margin:10px 5px 20px 5px;
color:#333333;
background-color:inherit;
}

div.document h2.subtitle, div.section h1{
margin-top:50px;
border-bottom:1px solid #333333;
font-size:140%;
text-align:center;
padding:20px 0px 10px 0px;
color:#333333;
background-color:inherit;
}

div.section h2{
font-size:110%;
text-align:left;
padding:15px 0px 5px 0px;
text-decoration:underline;
color:#333333;
background-color:inherit;
}

div.document pre.literal-block{
border:1px inset #333333;
padding:5px;
margin:10px 5px 10px 5px;
color:inherit;
background-color:#FCFCFC;
font-size:90%;
}

div.document table{
padding:5px;
font-size:95%;
}

div.document th{
padding:3px 7px 3px 7px;
border:1px solid #333333;
text-align:center;
color:inherit;
background-color:#ECECEC;
}

div.document tr{
}

div.document td{
padding:3px 7px 3px 7px;
border:1px solid #333333;
text-align:center;
color:inherit;
background-color:#FCFCFC;
}

div.footer{
margin:50px auto 30px auto;
text-align:center;
font-size:85%;
}

</style>
</head>
<body>
<div class="document" id="uhd-system-configuration-for-usrp-x3x0-series">
<h1 class="title">UHD - System Configuration for USRP X3x0 Series</h1>

<div class="contents topic" id="table-of-contents">
<p class="topic-title first">Table of Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#configuring-your-host-pc" id="id1">Configuring your Host PC</a><ul>
<li><a class="reference internal" href="#kernel-version" id="id2">Kernel Version</a></li>
<li><a class="reference internal" href="#network-configuration" id="id3">Network Configuration</a><ul>
<li><a class="reference internal" href="#configuring-networkmanager" id="id4">Configuring NetworkManager</a></li>
<li><a class="reference internal" href="#changing-the-host-s-ip-address" id="id5">Changing the host's IP address</a></li>
<li><a class="reference internal" href="#configuring-the-socket-buffers" id="id6">Configuring the Socket Buffers</a></li>
<li><a class="reference internal" href="#configuring-the-mtu" id="id7">Configuring the MTU</a></li>
<li><a class="reference internal" href="#configuring-the-firewall" id="id8">Configuring the Firewall</a></li>
<li><a class="reference internal" href="#interface-configuration-file-fedora" id="id9">Interface Configuration File (Fedora)</a></li>
</ul>
</li>
<li><a class="reference internal" href="#power-management" id="id10">Power Management</a><ul>
<li><a class="reference internal" href="#setting-the-cpu-governors" id="id11">Setting the CPU Governors</a></li>
</ul>
</li>
<li><a class="reference internal" href="#real-time-priority-scheduling" id="id12">Real-Time &amp; Priority Scheduling</a><ul>
<li><a class="reference internal" href="#thread-priority-scheduling-with-uhd" id="id13">Thread Priority Scheduling with UHD</a></li>
<li><a class="reference internal" href="#real-time-scheduling-in-your-application" id="id14">Real-Time Scheduling in your Application</a></li>
</ul>
</li>
<li><a class="reference internal" href="#building-with-orc-volk" id="id15">Building with ORC &amp; Volk</a><ul>
<li><a class="reference internal" href="#compiling-uhd-with-orc" id="id16">Compiling UHD with ORC</a></li>
<li><a class="reference internal" href="#compiling-gnuradio-with-volk" id="id17">Compiling GNURadio with Volk</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#host-pc-hardware-selection" id="id18">Host PC Hardware Selection</a><ul>
<li><a class="reference internal" href="#motherboard" id="id19">Motherboard</a></li>
<li><a class="reference internal" href="#gbe-nic" id="id20">10GbE NIC</a></li>
</ul>
</li>
<li><a class="reference internal" href="#troubleshooting-performance-issues" id="id21">Troubleshooting Performance Issues</a><ul>
<li><a class="reference internal" href="#troubleshooting-ethernet-issues" id="id22">Troubleshooting Ethernet Issues</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="configuring-your-host-pc">
<h1>Configuring your Host PC</h1>
<p>The USRP X3x0 is capable of delivering very fast sample rates to the host PC,
and even high-powered desktops can have trouble keeping up at the higher rates.
You can improve the performance of your host by configuring a number of
settings that affect the performance of your computer.</p>
<p>These are:</p>
<blockquote>
<ul class="simple">
<li>Kernel Version</li>
<li>Network Configuration</li>
<li>Power Management Configuration</li>
<li>Real-Time &amp; Priority Scheduling</li>
<li>Building with ORC &amp; Volk</li>
</ul>
</blockquote>
<p>These items are covered in more detail, below.</p>
<div class="section" id="kernel-version">
<h2>Kernel Version</h2>
<p>Performance issues may be encountered with Linux kernels earlier than 3.11.
Ettus Research strongly recommends using kernel version 3.11 or higher for high
sample rates.</p>
</div>
<div class="section" id="network-configuration">
<h2>Network Configuration</h2>
<p>When using Ethernet interfaces to communicate with the device, it is necessary
to configure a number of facets regarding your network connection.</p>
<div class="section" id="configuring-networkmanager">
<h3>Configuring NetworkManager</h3>
<p>Fedora and Ubuntu both use NetworkManager to manage network connections.
Unfortunately, NetworkManager often tries to take control of a connection and
will disconnect the interface.</p>
<p>You should open your NetworkManager configuration and tell it to ignore the
network interface you are using. <strong>This is not the same as simply setting
a static IP address.</strong> You <em>must</em> tell NetworkManager to ignore the interface.</p>
</div>
<div class="section" id="changing-the-host-s-ip-address">
<h3>Changing the host's IP address</h3>
<p>On a Linux system, you can add a static IP address very easily by using the
'ip' command:</p>
<pre class="literal-block">
sudo ip addr add 192.168.10.1/24 dev &lt;interface&gt;
</pre>
<p>Note that <strong>&lt;interface&gt;</strong> is usually something like <strong>eth0</strong>.  You can discover the
names of the network interfaces in your computer by running:</p>
<pre class="literal-block">
ip addr show
</pre>
</div>
<div class="section" id="configuring-the-socket-buffers">
<h3>Configuring the Socket Buffers</h3>
<p>It is necessary to increase the maximum size of the socket buffers to avoid
potential overflows and underruns at high sample rates.  Add the following
entries into /etc/sysctl.conf (root privileges required):</p>
<pre class="literal-block">
net.core.rmem_max=33554432
net.core.wmem_max=33554432
</pre>
<p>Either restart the system or issue the following commands:</p>
<pre class="literal-block">
sudo sysctl -w net.core.rmem_max=33554432
sudo sysctl -w net.core.wmem_max=33554432
</pre>
</div>
<div class="section" id="configuring-the-mtu">
<h3>Configuring the MTU</h3>
<p>In order to achieve maximum performance, we recommend setting the MTU size to
9000 for 10 GigE and 1500 for 1 GigE. It is possible to use smaller MTUs, but this
can affect performance. With some NICs, setting the MTU too high can also cause issues.
To set the MTU to 9000, you can use the following command:</p>
<pre class="literal-block">
sudo ifconfig &lt;interface&gt; mtu 9000 # For 10 GigE
sudo ifconfig &lt;interface&gt; mtu 1500 # For 1 GigE
</pre>
<p>Using these MTUs will set the frame sizes for UHD communication to 8000 and 1472,
respectively.</p>
<p>In some cases, specifying the frame size manually by adding the argument
&quot;&lt;send/recv&gt;_frame_size=1472&quot; can solve issues. Note that a frame size of 1472 will limit
the available sampling rate, although this is not a problem on 1 GigE.</p>
</div>
<div class="section" id="configuring-the-firewall">
<h3>Configuring the Firewall</h3>
<p>Many Linux distributions come installed with a Firewall, by default. The
Firewall will often interfere with your ability to communicate with your USRP.
You should configure your firewall to &quot;trust&quot; the interface you are using.
Setting this properly depends on your OS and firewall configuration method.</p>
<p>When using UHD software, if an IP address for the USRP-X Series device is not specified,
the software will use UDP broadcast packets to locate the USRP-X Series device.
On some systems, the firewall will block UDP broadcast packets.
It is therefore recommended that you change or disable your firewall settings.</p>
</div>
<div class="section" id="interface-configuration-file-fedora">
<h3>Interface Configuration File (Fedora)</h3>
<p>On Fedora systems, you can configure the network interface mostly from one
place (with the exception of the socket buffers). Each interface on your system
should have a file in:</p>
<pre class="literal-block">
/etc/sysconfig/network-scripts/
</pre>
<p>As an example, if your 1GigE interface is &quot;em1&quot;, your &quot;ifcfg-em1&quot; configuration
file should look something like this, when configured for use with a USRP X3xx:</p>
<pre class="literal-block">
TYPE=&quot;Ethernet&quot;
BOOTPROTO=&quot;none&quot;
IPADDR0=&quot;192.168.10.1&quot;
DEFROUTE=&quot;yes&quot;
IPV4_FAILURE_FATAL=&quot;no&quot;
IPV6INIT=&quot;no&quot;
IPV6_FAILURE_FATAL=&quot;no&quot;
NAME=&quot;em1&quot;
UUID=&quot;&lt;specific to your device&gt;&quot;
ONBOOT=&quot;no&quot;
HWADDR&quot;&lt;specific to your device&gt;&quot;
PEERDNS=&quot;yes&quot;
PEERROUTES=&quot;yes&quot;
ZONE=&quot;trusted&quot;
MTU=&quot;9000&quot;
NM_MANAGED=&quot;no&quot;
</pre>
<p>The above file was generated and modified on a &quot;Fedora 20&quot; system.</p>
</div>
</div>
<div class="section" id="power-management">
<h2>Power Management</h2>
<p>Power management on the host system attempts to save power by reducing clock
frequencies or even powering off devices while not in use.  This can lead to
significant performance issues when trying to operate at high sample rates.
Ettus Research strongly recommends disabling all power management.</p>
<div class="section" id="setting-the-cpu-governors">
<h3>Setting the CPU Governors</h3>
<p>In Linux, the CPU governors dictate the frequency at which the CPU operates and
attempt to reduce the CPU frequencies at certain times to save power.  When
running at high sample rates, reduction of CPU frequencies can cause
significant performance issues.  To prevent those issues, set the governor to
&quot;performance&quot;.</p>
<p><strong>Ubuntu:</strong>
1. Install cpufrequtils:</p>
<pre class="literal-block">
sudo apt-get install cpufrequtils
</pre>
<ol class="arabic simple" start="2">
<li>Edit /etc/init.d/cpufrequtils and set GOVERNOR=&quot;performance&quot; on the appropriate line (run as root):</li>
</ol>
<pre class="literal-block">
sed s/^GOVERNOR=.*$/GOVERNOR=\&quot;performance\&quot;/g /etc/init.d/cpufrequtils &gt; /etc/init.d/cpufrequtils
</pre>
<ol class="arabic simple" start="3">
<li>Restart cpufrequtils:</li>
</ol>
<pre class="literal-block">
sudo /etc/init.d/cpufrequtils restart
</pre>
<p><strong>Fedora:</strong></p>
<pre class="literal-block">
sudo cpupower frequency-set -g performance
</pre>
</div>
</div>
<div class="section" id="real-time-priority-scheduling">
<h2>Real-Time &amp; Priority Scheduling</h2>
<p>Enabling real-time and priority scheduling can improve the total processing
throughput of your application. Priority scheduling should be enabled for UHD,
and real-time scheduling can be enabled by your application.</p>
<div class="section" id="thread-priority-scheduling-with-uhd">
<h3>Thread Priority Scheduling with UHD</h3>
<p>For information regarding how to enable priority scheduling for UHD on your
system, please see the <a class="reference external" href="./general.html#threading-notes">General UHD Notes</a>.</p>
</div>
<div class="section" id="real-time-scheduling-in-your-application">
<h3>Real-Time Scheduling in your Application</h3>
<p>Please note that turning on real-time scheduling in your application <strong>may lock
up your computer</strong> if the processor cannot keep up with the application. You
should generally avoid using real-time scheduling unless you need to.</p>
<p>Real-time scheduling is enabled via different methods depending on your
application and operating system. In GNU Radio Companion, it can be turned on in
each individual flowgraph.</p>
</div>
</div>
<div class="section" id="building-with-orc-volk">
<h2>Building with ORC &amp; Volk</h2>
<p>Especially when running high-performance applications, processing performance
can be dramatically improved by SIMD instructions. UHD uses ORC to provide SIMD
capability, and GNU Radio includes a SIMD library called &quot;Volk&quot;. These should
both be used to guarantee optimum performance.</p>
<div class="section" id="compiling-uhd-with-orc">
<h3>Compiling UHD with ORC</h3>
<p>ORC, the <a class="reference external" href="http://code.entropywave.com/orc/">Oil Runtime Compiler</a>, is
a third-party compiler that UHD uses to create efficient SIMD code for your
particular computer. ORC is generally easily installed from your OS's package
manager.</p>
<p>On Fedora:</p>
<pre class="literal-block">
$ sudo yum update; sudo yum install orc-compiler orc-devel
</pre>
<p>On Ubuntu:</p>
<pre class="literal-block">
$ sudo apt-get update; sudo apt-get install liborc-&lt;version&gt; liborc-&lt;version&gt;-dev
</pre>
<p>After installing ORC, when building UHD from source, you should see &quot;ORC&quot; as
one of the configured UHD components.</p>
<pre class="literal-block">
-- ######################################################
-- # UHD enabled components
-- ######################################################
--   * LibUHD
     &lt;cut for brevity&gt;
--   * ORC
</pre>
</div>
<div class="section" id="compiling-gnuradio-with-volk">
<h3>Compiling GNURadio with Volk</h3>
<p>If you are using GNURadio to build applications, you should compile GNURadio
with Volk. For instructions on how to do this, <a class="reference external" href="http://gnuradio.org/redmine/projects/gnuradio/wiki/Volk">refer to the GNURadio wiki</a>.</p>
</div>
</div>
</div>
<div class="section" id="host-pc-hardware-selection">
<h1>Host PC Hardware Selection</h1>
<div class="section" id="motherboard">
<h2>Motherboard</h2>
<p>Testing has shown that some motherboards do not provide enough PCIe bus
bandwidth to support higher sample rates.  Motherboards with PCIe 3.0 are
required and the PCIe architecture of the motherboard should be carefully
considered.  Slots with dedicated PCIe lanes should be used for PCIe or 10GbE
cards that will be connected to the X3x0 device.</p>
</div>
<div class="section" id="gbe-nic">
<h2>10GbE NIC</h2>
<p>Intel or Myricom 10GbE NICs are recommended.  Mellanox, SolarFlare, and Chelsio
10GbE NICs are not currently recommended.  The Ethernet card should be plugged
into the slot that has the most direct connection with the CPU (PCIe lanes are
not shared with another slot).  Refer to the motherboard manual for more
information on PCIe architecture.</p>
</div>
</div>
<div class="section" id="troubleshooting-performance-issues">
<h1>Troubleshooting Performance Issues</h1>
<p>The output on the host console provides indicators of performance issues in the
form of single upper-case letters.  The following table lists the letters,
their meanings, and possible causes:</p>
<table border="1" class="docutils">
<colgroup>
<col width="8%" />
<col width="20%" />
<col width="71%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Indicator</th>
<th class="head">Meaning</th>
<th class="head">Possible Causes</th>
</tr>
</thead>
<tbody valign="top">
<tr><td>O</td>
<td>Overflow on RX</td>
<td><ul class="first last simple">
<li>Data is not being consumed by user's application fast enough.</li>
<li>CPU governor or other power management not configured correctly.</li>
</ul>
</td>
</tr>
<tr><td>D</td>
<td>Dropped packet on RX</td>
<td><ul class="first last simple">
<li>Network hardware failure.  (Check host NIC, cable, switch, etc...)</li>
<li>PCIe bus on host cannot sustain throughput. (Check ethtool -S &lt;interface&gt;).</li>
<li>CPU governor or other power management not configured correctly.</li>
<li>Frame size might not work with the current NIC's MTU.</li>
</ul>
</td>
</tr>
<tr><td>U</td>
<td>Underflow on TX</td>
<td><ul class="first last simple">
<li>Samples are not being produced by user's application fast enough.</li>
<li>CPU governor or other power management not configured correctly.</li>
</ul>
</td>
</tr>
<tr><td>L</td>
<td>Late packet
(usually on MIMO TX)</td>
<td><ul class="first last simple">
<li>Samples are not being produced by user's application fast enough.</li>
<li>CPU governor or other power management not configured correctly.</li>
<li>Incorrect/invalid time_spec provided.</li>
</ul>
</td>
</tr>
<tr><td>S</td>
<td>Sequence error on TX</td>
<td><ul class="first last simple">
<li>Network hardware failure.  (Check host NIC, cable, switch, etc...)</li>
<li>Frame size might not work with the current NIC's MTU.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<div class="section" id="troubleshooting-ethernet-issues">
<h2>Troubleshooting Ethernet Issues</h2>
<ol class="arabic simple">
<li>First, check 'ifconfig &lt;interface&gt;' to see if there are any errors reported
on the interface.  If there are errors, it is most likely a network hardware
problem.</li>
<li>Next, check the output of 'ethtool -S &lt;interface&gt;'.  The output is
driver-specific, but may give important clues as to what may be happening.
For example, a high value on rx_missed_errors for an Intel NIC indicates
that the bus (i.e. PCIe) is not keeping up.</li>
<li>Finally, Wireshark can be used to validate the traffic between the host and
device and make sure there is no unwanted traffic on the interface.</li>
</ol>
</div>
</div>
</div>
<div class="footer">
<hr class="footer" />
Generated on: 2014-10-15 11:47 UTC.

</div>
</body>
</html>