Latency question / survey

Discussion in 'Software Defined Radio (SDR)' started by DK7OB, Nov 7, 2018.

ad: L-HROutlet
ad: l-rl
ad: L-MFJ
ad: Subscribe
ad: Left-2
ad: abrind-2
ad: Left-3
  1. DK7OB

    DK7OB Ham Member QRZ Page


    Now, when all the SDR folks are gathering in this forum, I hope I am at the right place to ask...

    I am running an SDRPlay RSP1A on Linux with GQRX as my second receiver. This is working very well except one thing:

    The latency is very high. With my setup, I measured a delay of 150 to 300 ms from antenna input to audio output. Other software is even worse (tested CubicSdr on Linux, SDRUno and HDSDR on Windows).

    I would like to get an impression whether my setup is unusually bad or is it what can be expected?

    So here my question:

    What latency do you have in your SDR systems? Please also give a short information about your hardware / software.

    N3AWS likes this.
  2. KK4NSF

    KK4NSF Ham Member QRZ Page

    I'm running SDRplay with SDRuno.... and at the moment, I don't know the latency. BUT I'll check it today.

    About the GQRX.... how do you like it? I tend to lean toward linux, and would like to find a good SDR software to use with it.
    N3AWS likes this.
  3. DK7OB

    DK7OB Ham Member QRZ Page

    There is not much choice in Linux, gqrx and cubicsdr are the only stand alone SDR applications I am aware of. I tested both. Cubicsdr had a better support for sdrplay than gqrx, at least at the time I tested. AFAIK, cubicsdr is the software used in the "official" SDRPlay Linux path.

    I went with gqrx because cubicsdr had no real CW mode when I was testing, and since I am a CW guy, this was a show stopper.

    Meanwhile I run a heavily modified version of gqrx (the joy of open source!) and it does exactly what I want, and not more. It is very well integrated with my station, I think it works better and smoother than anything I've seen in Windows (but this is not too much, see below).

    I did set up an RSP1 at our club station, which is Windows based. I tested SDRUno, it's a nice software but IMO overloaded with features and not optimized for amateur radio. I also tested HDSDR which has lots of features too, but a simpler GUI, a bit similar to gqrx, and transceiver integration worked better, so I use HDSDR at the club station and not SDRUno. Compared to these, gqrx is a very bare bone application.

    SDR with Linux is a tough experience. It clearly helps if you have a good general Linux knowledge, are not afraid of building applications from source and see the process of setting up a Linux SDR solution as part of the fun.
  4. AC7CW

    AC7CW Ham Member QRZ Page

    According to Leo Laporte Linux is less than ideal for sound for exactly the reason stated; latency. Windows is next in line and Apple OS's are best.
  5. DK7OB

    DK7OB Ham Member QRZ Page

    I found that SDRUno and HDSDR on Windows 10 with the RSP1A are even worse than gqrx on my Linux system. I am not sure what causes that latency - but it's not the audio system alone.

    I still would like to know what latencies other SDR users see with their HW/SW setups.
  6. KK4NSF

    KK4NSF Ham Member QRZ Page

    OK.... I did some testing on my own SDRPlay SDR2pro... and yes there is some latency, when comparing to the audio output of my Kenwood. I don't know the actual numbers since I did the comparison bye ear, but it is somewhere between .25 and .5 seconds with my normal set-up, which is a WIN7 / Intel I-5 machine with LOTS of memory.

    Using that as a basis, I started shutting down WIN services one at a time.... you know, all of those mostly useless programs that eat memory and processing time. As expected, as services were stopped, the latency went down proportionate to the processor percentage each process was using. That worked until the unloaded processor was at 98% idle, with most everything shut down. I'd say the latency was reduced by maybe 50%, as estimated by my hearing.

    I also tried plugging the radio into a USB-3 port instead of it's usual USB-2 port.... no change in latency. That makes sense to me since the SDPlay specs say the radio uses USB-2.

    So... I'd guess there are two reasons / variables that control the latency: 1- the processor / cache / bus speed of the computer which you can control to a small amount. and 2- the USB input / output speed, which you cannot change. My own view is that it is not actually a problem unless you need to sync your audio output with an external signal... maybe with FT-8. Even then, it's probably not a big issue.
  7. DK7OB

    DK7OB Ham Member QRZ Page

    That's interesting. I didn't expect that other processes/services would play a significant role, but I don't know Windows and what services take CPU load. On my Linux system I see no services that consume a significant amount of CPU.

    I also do not see a difference between USB-2 and USB-3 ports. The USB is my main suspect regarding the latency, but could not find a method to proof it.

    Usually it is not a big issue, even FT-8 decoding is not a problem. But it is impossible to monitor my own signal. In CW it's obvious, but also on phone it is unusable, at least for me. If I hear me back with delay, I immediately stop talking because I think somebody interrupts me. That's a major nuisance in bad VoIP links too BTW.
    K4AGO likes this.
  8. WA4SIX

    WA4SIX Ham Member QRZ Page

    If the SDR has a USB2,X chip, connecting to a USB3.X port should show very minimal improvement.
    This weekend, I will check latencies with my LimeSDR USB, which is USB3.0. I will run the gamut with different bandwidths & USB ports.
    8 Xeon physical/16 logical cores 3.7 Ghz, 72G RAM & a 950 GTX vid card...
    I will try a few cheap dongles, too.

  9. KA8NCR

    KA8NCR Ham Member QRZ Page

    Is your audio handled by Pulseaudio? If so, that is likely a large contributor to the latency.
  10. DK7OB

    DK7OB Ham Member QRZ Page

    Yes, it is handled by pulseaudio and it contributes to the latency. It is about 50ms, which is a lot but still not the major contributor (total delay is 150 ms best case, usually about 200-300 ms).

    "pactl list sinks" shows for the sound card that is used for gqrx:

    Latency: 35936 usec, configured 30000 usec

    I don't know if this latency is an indication for the real latency or just some calculated value.

Share This Page