Hello all, I've had trouble making a 4 channel USRP samples at 1Ms/s write to file at 500 kS/s with ubuntu 12.04 and libuhd. I am getting several overruns and I had tried adjusting some of the parameters using usrd_probe_devices but with no success. I have a laptop with a duo core centrino processor which should be enough. I've made this 4 channel work successfully with the same exact laptop and with ubuntu 10.04 and the older version of gnuradio that uses libusrp. I get no underruns at all even for an entire hour of writing to file. Has anyone else experienced performance differences between libusrp and libuhd? I just want to make sure it isn't a configuration problem or something I'm doing wrong causing the overruns. If its likely an issue with libuhd, I guess I will just keep a backup of ubuntu 10.04 and gnuradio libusrp version installation files and leave my dual boot setup intact. Thank you very much, - Tom
on 2013-03-01 23:52
on 2013-03-01 23:56
On 03/01/2013 04:51 PM, Tom Hendrick wrote: > > You might try setting a very large output buffer on the usrp source block. I heard this helps (you should be able to call this in python after the block constructs): /*! * \brief Sets max buffer size on all output ports. */ void set_max_output_buffer(long max_output_buffer) -josh
on 2013-03-02 00:17
Josh, Thank you so much for the suggestion. I will try this. I have 4GB of ram and a 4GB swapfile size. Do you recommend any particular setting for set_max_output_buffer(long max_output_buffer)? Should I leave tb.run() as is, or modify the number of n_output_items in conjunction with the void set_max_output_buffer(long max_output_buffer)? Also, do you recommend any particular settings using uhd_usrp_probe --args="serial=123456, recv_frame_size=XXXX,num_recv_frames=XXXX", send_frame_size=XXXX,send_recv_frames=XXX" or should I leave it default? The custom 4 channel usrp block in the older gnuradio version had the fusb_block and fusb_nblocks both set to 512*32 Thanks, -Tom ________________________________ From: Josh Blum <josh@ettus.com> To: discuss-gnuradio@gnu.org Sent: Friday, March 1, 2013 2:55 PM Subject: Re: [Discuss-gnuradio] LibUSRP vs LibUHD Performance on older machines On 03/01/2013 04:51 PM, Tom Hendrick wrote: > > You might try setting a very large output buffer on the usrp source block. I heard this helps (you should be able to call this in python after the block constructs): /*! * \brief Sets max buffer size on all output ports. */ void set_max_output_buffer(long max_output_buffer) -josh
on 2013-03-02 18:19
On 03/01/2013 05:16 PM, Tom Hendrick wrote: > Josh, > > Thank you so much for the suggestion. I will try this. I have 4GB of > ram and a 4GB swapfile size. Do you recommend any particular setting > for set_max_output_buffer(long max_output_buffer)? > > Make it 10s of megabytes, see if it helps. > Should I leave tb.run() as is, or modify the number of n_output_items > in conjunction with the I think that part of the API is deprecated (the argument to run). There is a similar call on top block, but Im recommending just the usrp source block. > older gnuradio version had the fusb_block and fusb_nblocks both set > to 512*32 > Go with the default while trying the above. -josh
on 2013-03-03 00:24
Josh thanks so much for the suggestion. I left the tb.run() alone, and used the default settings for the uhd_usrp_probe --args call for setting the frame size and number of frames. I also just changed the buffer size for the usrp_source block by setting the following before the tb.run(): tb.uhd_usrp_source_0.set_max_output_buffer(50000000) and I was getting overruns still. I also tried setting it higher to 500000000 and still got overruns within about 10-20 seconds. Do you have any other quick suggestions? I just went back to testing on the older gnuradio libusrp 4 channel version and ubuntu 10.04 for longer durations. It gives no overruns up until about 30 minutes of running. This is at least usable. I wonder if the buffer settings on the older setup is higher then newer one. I'm not sure how to determine this. Thanks, -Tom ________________________________ From: Josh Blum <josh@ettus.com> To: Tom Hendrick <sdtom182@yahoo.com> Cc: "discuss-gnuradio@gnu.org" <discuss-gnuradio@gnu.org> Sent: Saturday, March 2, 2013 9:18 AM Subject: Re: [Discuss-gnuradio] LibUSRP vs LibUHD Performance on older machines On 03/01/2013 05:16 PM, Tom Hendrick wrote: > Josh, > > Thank you so much for the suggestion. I will try this. I have 4GB of > ram and a 4GB swapfile size. Do you recommend any particular setting > for set_max_output_buffer(long max_output_buffer)? > > Make it 10s of megabytes, see if it helps. > Should I leave tb.run() as is, or modify the number of n_output_items > in conjunction with the I think that part of the API is deprecated (the argument to run). There is a similar call on top block, but Im recommending just the usrp source block. > older gnuradio version had the fusb_block and fusb_nblocks both set > to 512*32 > Go with the default while trying the above. -josh
on 2013-03-03 00:26
> 500000000 and still got overruns within about 10-20 seconds. > > Do you have any other quick suggestions? I just went back to testing > on the older gnuradio libusrp 4 channel version and ubuntu 10.04 for > longer durations. It gives no overruns up until about 30 minutes of > running. This is at least usable. I wonder if the buffer settings on > the older setup is higher then newer one. I'm not sure how to > determine this. > > Thanks, -Tom > The frame size and number of frames settings are per-session, so setting them in uhd_usrp_probe will have no effect, as far as I know, on future sessions.
on 2013-03-03 00:33
Thanks Marcus, I also thought the same thing. Just to be safe I had run the uhd_usrp_probe call with the default settings before trying the suggestions from Josh. ________________________________ From: Marcus D. Leech <mleech@ripnet.com> To: discuss-gnuradio@gnu.org Sent: Saturday, March 2, 2013 3:25 PM Subject: Re: [Discuss-gnuradio] LibUSRP vs LibUHD Performance on older machines Josh thanks so much for the suggestion. >I left the tb.run() alone, and used the default settings for the uhd_usrp_probe --args call for setting the frame size and number of frames. > >I also just changed the buffer size for the usrp_source block by setting the following before the tb.run(): > >tb.uhd_usrp_source_0.set_max_output_buffer(50000000) and I was getting overruns still. I also tried setting it higher to >500000000 and still got overruns within about 10-20 seconds. > >Do you have any other quick suggestions? I just went back to testing on the older gnuradio libusrp 4 channel version and ubuntu 10.04 for longer durations. It gives no overruns up until about 30 minutes of running. This is at least usable. I wonder if the buffer settings on the older setup is higher then newer one. I'm not sure how to determine this. > >Thanks, -Tom > > The frame size and number of frames settings are per-session, so setting them in uhd_usrp_probe will have no effect, as far as I know, on future sessions. -- Marcus Leech Principal Investigator Shirleys Bay Radio Astronomy Consortium http://www.sbrac.org
on 2013-03-08 21:49
Hi Josh, Would you happen to suggest any more setting changes I could try before just deciding I need to depend on the older libusrp/gnuradio for recording 4 channels to disk from a USRP? Thanks, - Tom ________________________________ From: Josh Blum <josh@ettus.com> To: Tom Hendrick <sdtom182@yahoo.com> Cc: "discuss-gnuradio@gnu.org" <discuss-gnuradio@gnu.org> Sent: Saturday, March 2, 2013 9:18 AM Subject: Re: [Discuss-gnuradio] LibUSRP vs LibUHD Performance on older machines On 03/01/2013 05:16 PM, Tom Hendrick wrote: > Josh, > > Thank you so much for the suggestion. I will try this. I have 4GB of > ram and a 4GB swapfile size. Do you recommend any particular setting > for set_max_output_buffer(long max_output_buffer)? > > Make it 10s of megabytes, see if it helps. > Should I leave tb.run() as is, or modify the number of n_output_items > in conjunction with the I think that part of the API is deprecated (the argument to run). There is a similar call on top block, but Im recommending just the usrp source block. > older gnuradio version had the fusb_block and fusb_nblocks both set > to 512*32 > Go with the default while trying the above. -josh
on 2013-03-11 06:30
On 03/08/2013 02:44 PM, Tom Hendrick wrote: > Hi Josh, > > Would you happen to suggest any more setting changes I could try before just deciding I need to depend on the older libusrp/gnuradio for recording 4 channels to disk from a USRP? On this particular machine, are you able to sustain one channel at 8Msps but not 4 channels at 2Msps? That might indicate that there isnt enough headroom for the deinterleaving. The old driver just output interleaved data, and you would deinterleave samples in a separate block. -josh
on 2013-03-11 07:02
Hello Josh, Thanks for responding. I just tried your suggestion. With a single USRP channel at 4MS/s and writing to four files at 500 MS/s (each of these 4 files is writing the same thing), I occasionally still see some overruns though it takes a lot longer for them to show up than with 4 channels at 1MS/s and they don't always show up eachtime i run the script. The 4 channels at 1MS/s and writing to file at 500 MS/s causes overruns every time I run the script. Any suggestions? I'm thinking maybe with ubuntu 12.04 and the newer uhd, the system has much less processing overhead than with 10.04 and libuhd? I also spent nearly the entire day trying different values for the set_max_output_buffer in conjunction with the usrp_probe -args buffer settings. In some instances it delayed the overruns from showing but they still showed up. Thank you, -Tom ________________________________ From: Josh Blum <josh@ettus.com> To: Tom Hendrick <sdtom182@yahoo.com> Cc: "discuss-gnuradio@gnu.org" <discuss-gnuradio@gnu.org> Sent: Sunday, March 10, 2013 10:29 PM Subject: Re: [Discuss-gnuradio] LibUSRP vs LibUHD Performance on older machines On 03/08/2013 02:44 PM, Tom Hendrick wrote: > Hi Josh, > > Would you happen to suggest any more setting changes I could try before just deciding I need to depend on the older libusrp/gnuradio for recording 4 channels to disk from a USRP? On this particular machine, are you able to sustain one channel at 8Msps but not 4 channels at 2Msps? That might indicate that there isnt enough headroom for the deinterleaving. The old driver just output interleaved data, and you would deinterleave samples in a separate block. -josh
on 2013-03-11 07:23
Hello Josh, I ran the single USRP 4MS/s channel recorded to four files at 500MS/s script again for longer durations. I now saw more overruns just as I would with the four USRP 1MS/s channels recorded to four files at 500MS/s. I also looked at the GRC script for the older libusrp version. The USRP block is a custom written one that has four outputs. I'm not sure how the interleaver/de-interleaver is handled in that custom block istelf, but in the rest of the GRC script there is no additional interleave or de-interleave block used. The particular USRP block I'm using was written by a GNURadio user in 2009. Given all of the above it seems like maybe the combination of ubuntu 12.04 and libuhd requires more processing power than the older setup that has worked flawless? It would be nice to make the newer setup work with overruns but I'm out of ideas. Thanks, -Tom ________________________________ From: Josh Blum <josh@ettus.com> To: Tom Hendrick <sdtom182@yahoo.com> Cc: "discuss-gnuradio@gnu.org" <discuss-gnuradio@gnu.org> Sent: Sunday, March 10, 2013 10:29 PM Subject: Re: [Discuss-gnuradio] LibUSRP vs LibUHD Performance on older machines On 03/08/2013 02:44 PM, Tom Hendrick wrote: > Hi Josh, > > Would you happen to suggest any more setting changes I could try before just deciding I need to depend on the older libusrp/gnuradio for recording 4 channels to disk from a USRP? On this particular machine, are you able to sustain one channel at 8Msps but not 4 channels at 2Msps? That might indicate that there isnt enough headroom for the deinterleaving. The old driver just output interleaved data, and you would deinterleave samples in a separate block. -josh
on 2013-03-11 16:31
On 03/11/2013 02:00 AM, Tom Hendrick wrote: > Hello Josh, Thanks for responding. > I just tried your suggestion. > > With a single USRP channel at 4MS/s and writing to four files at 500 > MS/s (each of these 4 files is writing the same thing), I occasionally > still see some overruns though it takes a lot longer for them to show > up than with 4 channels at 1MS/s and they don't always show up > eachtime i run the script. The 4 channels at 1MS/s and writing to > file at 500 MS/s causes overruns every time I run the script. You presumably mean 500kSPS, rather than 500Msps here? How are you decimating the incoming sample stream down to the file-write rate?
on 2013-03-11 17:49
I'm sorry for the typo, yes after the USRP source block there is a complex to float followed by a rational resampler for each of the four channels so it decimates and records to file at 500 kS/s Thanks for catching that. -Tom ________________________________ From: Marcus D. Leech <mleech@ripnet.com> To: Tom Hendrick <sdtom182@yahoo.com>; "Discuss-gnuradio@gnu.org" <Discuss-gnuradio@gnu.org> Sent: Monday, March 11, 2013 8:29 AM Subject: Re: [Discuss-gnuradio] LibUSRP vs LibUHD Performance on older machines On 03/11/2013 02:00 AM, Tom Hendrick wrote: Hello Josh, Thanks for responding. >I just tried your suggestion. > >With a single USRP channel at 4MS/s and writing to four files at 500 MS/s (each of these 4 files is writing the same thing), I occasionally still see some overruns though it takes a lot longer for them to show up than with 4 channels at 1MS/s and they don't always show up eachtime i run the script. The 4 channels at 1MS/s and writing to file at 500 MS/s causes overruns every time I run the script. You presumably mean 500kSPS, rather than 500Msps here? How are you decimating the incoming sample stream down to the file-write rate?
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.