<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.gmail-m7801981871054340895msolistparagraph, li.gmail-m7801981871054340895msolistparagraph, div.gmail-m7801981871054340895msolistparagraph
        {mso-style-name:gmail-m_7801981871054340895msolistparagraph;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1539313285;
        mso-list-template-ids:2082400184;}
@list l1
        {mso-list-id:1706448540;
        mso-list-template-ids:-1328890500;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Phil-<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Yes, I’m sure that would work. That would be the technique used to implement my last suggestion (i.e., to write 4 channels to each of 2 separate HDDs), to overcome the speed limitation in the drive(s).   I can also code up a test to try
 writing in 2 write streams (by grouping 4 channels into each) to a single drive (will try tomorrow); on that, my previous experience working with hard drives suggests that this is likely to generate quite a bit of head movement, which detracts from speed –
 however, some drives are smart enough and quick enough to sort the writes in their buffer and write them in the lowest latency order… so your mileage may differ… I’ll publish the results of that test when I complete it.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">-thanks & 73- Bill<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>From:</b> Phil Erickson <phil.erickson@gmail.com> <br>
<b>Sent:</b> Monday, July 8, 2019 11:57 AM<br>
<b>To:</b> TAPR TangerineSDR Modular Software Defined Radio <tangerinesdr@lists.tapr.org><br>
<b>Cc:</b> Engelke, Bill <bill.engelke@ua.edu><br>
<b>Subject:</b> Re: [TangerineSDR] Benchmarking the Odroid N2 with Digital RF<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Hi Bill,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">  There is an additional point regarding Digital RF that Ryan mentioned to me, and I believe to you as well in some earlier discussions.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">  The single-threading requirement only holds for each channel (==directory) of Digital RF data. So if you're dealing with multiple channels, those could each be written in separate threads with (as required anyway) separate Digital_rf_write_object
 instances. So I suggest trying that as a way to further optimize the writing process, if you haven't already done so.  Perhaps you could comment?<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">73<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Phil W1PJE<o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Mon, Jul 8, 2019 at 11:56 AM Engelke, Bill via TangerineSDR <<a href="mailto:tangerinesdr@lists.tapr.org">tangerinesdr@lists.tapr.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I received an Odroid N2 4GB model, shipped direct to me from Korea for $94 (including shipping).  I installed the following:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<ol start="1" type="1">
<li class="gmail-m7801981871054340895msolistparagraph" style="mso-list:l1 level1 lfo1">
Image of Odroid Ubuntu from <a href="https://wiki.odroid.com/odroid-n2/os_images/ubuntu" target="_blank">
https://wiki.odroid.com/odroid-n2/os_images/ubuntu</a><o:p></o:p></li><li class="gmail-m7801981871054340895msolistparagraph" style="mso-list:l1 level1 lfo1">
HDF5 development package: libhdf5- serial dev<o:p></o:p></li><li class="gmail-m7801981871054340895msolistparagraph" style="mso-list:l1 level1 lfo1">
Digital RF from github<o:p></o:p></li><li class="gmail-m7801981871054340895msolistparagraph" style="mso-list:l1 level1 lfo1">
A few other packages necessary to run the above<o:p></o:p></li></ol>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">BENCHMARKS<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Digital rf comes with some examples; the interesting one for this is the c benchmark, which writes out about 1500 M of data using raw binary (to check write speed independent of
 Digital rf); then writes data using Digital RF simple, with checksum, and finally with compression.  I tried writing to a Western Digital Elements spinning hard drive, and also writing to a ramdisk (the 4 GB Odroid has enough RAM than you can create a 2 GB
 ram disk and still have RAM left).<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Values below are all in MB/sec. I tried 3 runs; each gave different results, so the values are the average of the 3 runs.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Courier New"">                      Raw binary write  Digital RF simple  Digital RF with checksum    Digital RF with checksum/compression</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Courier New"">Western Digital HDD     198.53            187.03                  116.63                        11.14</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Courier New"">Ramdisk                1320.95           1020.58                  270.72                        11.76</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Courier New""> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Courier New""> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">TESTING WITH RED PITAYA<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I compiled the John Melton (not to be confused with the 17<sup>th</sup> century poet
<a href="https://en.wikipedia.org/wiki/John_Milton" target="_blank">John Milton</a>) program pihpsdr which works nicely with the Red Pitaya when it is in HPSDR emulation mode. The Red Pitaya runs at 48 ksps, one channel of I & Q, so I duplicate the I & Q data
 across 16 subchannels (8 channels each with 2 antennas), and write it out 4 times (4 X 48 = 197) to simulate the planned speed of Tangerine, writing out Digital RF. 
<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">The Odroid N2 provides much better results than the Odroid XU4.  It is no problem to achieve this data rate writing to ramdisk.  Writing to the Western Digital Elements HDD occasionally
 does miss 6 to 10 buffers, so it appears that the HDD writing speed is slightly lower than needed for error-free operation. I have discussed this with the MIT Digital RF team; the software does not do internal threading (which makes sense because formatting
 and storing this data is a serial operation). My previous tests with forking off threads for the writes led to crashes due to Digital RF trying to access the same memory in multiple threads (I interpret this to mean the Digital RF is not designed as a thread-safe
 system).  However, there are a couple of ways to deal with this:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<ol start="1" type="1">
<li class="gmail-m7801981871054340895msolistparagraph" style="mso-list:l0 level1 lfo2">
Use a solid state drive.  While technically possible, I have found that SDD in the size we need (~ 4 TB) is very expensive (>$800).<o:p></o:p></li><li class="gmail-m7801981871054340895msolistparagraph" style="mso-list:l0 level1 lfo2">
Set up 2 HDDs and write 4 channels to each.  A pair of 2 TB spinning HDs can be had for less than $150. This might be a very practical solution, which I plan to test. Since the N2 has 4 USB-3 ports, you can put 2 HDDs on and still have mouse & keyboard connected.<o:p></o:p></li></ol>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Another open question is:  how will a cheap spinning HD do, after running it in ~ 100% duty cycle for a while?  Probably not well; but remember that SSDs are not able to handle
 an infinite number of read/write cycles either; they also have a lifetime.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">-73- AB4EJ<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">W. D. Engelke (Bill), Asst. Research Engr.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Center for Advanced Public Safety<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Cyber Hall<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">The University of Alabama<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Tuscaloosa, AL 35487<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Desk: (205) 348-7244<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Mobile: (205) 764-3099<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">-- <br>
TangerineSDR mailing list<br>
<a href="mailto:TangerineSDR@lists.tapr.org" target="_blank">TangerineSDR@lists.tapr.org</a><br>
<a href="http://lists.tapr.org/mailman/listinfo/tangerinesdr_lists.tapr.org" target="_blank">http://lists.tapr.org/mailman/listinfo/tangerinesdr_lists.tapr.org</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<p class="MsoNormal">----<br>
Phil Erickson<br>
<a href="mailto:phil.erickson@gmail.com" target="_blank">phil.erickson@gmail.com</a><o:p></o:p></p>
</div>
</div>
</body>
</html>