<div dir="ltr"><div dir="ltr">Hi Bill,<div><br></div><div>  There is an additional point regarding Digital RF that Ryan mentioned to me, and I believe to you as well in some earlier discussions.</div><div><br></div><div><div>  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?</div></div><div><br></div><div>73</div><div>Phil W1PJE</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">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:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">





<div lang="EN-US">
<div class="gmail-m_7801981871054340895WordSection1">
<p class="MsoNormal">I received an Odroid N2 4GB model, shipped direct to me from Korea for $94 (including shipping).  I installed the following:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<ol style="margin-top:0in" start="1" type="1">
<li class="gmail-m_7801981871054340895MsoListParagraph" style="margin-left:0in">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><u></u><u></u></li><li class="gmail-m_7801981871054340895MsoListParagraph" style="margin-left:0in">HDF5 development package: libhdf5- serial dev<u></u><u></u></li><li class="gmail-m_7801981871054340895MsoListParagraph" style="margin-left:0in">Digital RF from github<u></u><u></u></li><li class="gmail-m_7801981871054340895MsoListParagraph" style="margin-left:0in">A few other packages necessary to run the above<u></u><u></u></li></ol>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">BENCHMARKS<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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).<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">                      Raw binary write  Digital RF simple  Digital RF with checksum    Digital RF with checksum/compression<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Western Digital HDD     198.53            187.03                  116.63                        11.14<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Ramdisk                1320.95           1020.58                  270.72                        11.76<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal">TESTING WITH RED PITAYA<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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. 
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<ol style="margin-top:0in" start="1" type="1">
<li class="gmail-m_7801981871054340895MsoListParagraph" style="margin-left:0in">Use a solid state drive.  While technically possible, I have found that SDD in the size we need (~ 4 TB) is very expensive (>$800).<u></u><u></u></li><li class="gmail-m_7801981871054340895MsoListParagraph" style="margin-left:0in">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.<u></u><u></u></li></ol>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">-73- AB4EJ<u></u><u></u></p>
<p class="MsoNormal">W. D. Engelke (Bill), Asst. Research Engr.<u></u><u></u></p>
<p class="MsoNormal">Center for Advanced Public Safety<u></u><u></u></p>
<p class="MsoNormal">Cyber Hall<u></u><u></u></p>
<p class="MsoNormal">The University of Alabama<u></u><u></u></p>
<p class="MsoNormal">Tuscaloosa, AL 35487<u></u><u></u></p>
<p class="MsoNormal">Desk: (205) 348-7244<u></u><u></u></p>
<p class="MsoNormal">Mobile: (205) 764-3099<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>

-- <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" rel="noreferrer" target="_blank">http://lists.tapr.org/mailman/listinfo/tangerinesdr_lists.tapr.org</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">----<br>Phil Erickson<br><a href="mailto:phil.erickson@gmail.com" target="_blank">phil.erickson@gmail.com</a><br></div>