Optimization of latency

211 views
Skip to first unread message

Andreas

unread,
Feb 12, 2021, 3:11:19 PM2/12/21
to SonoBus Users
I'm trying SonoBus since several weeks with multiple users for rehearsals with good results. However, there is always room for optimization. In order to do so, I like to understand how the total transmission latency from sender to receiver sums up.
My current understanding for upstream latency is:
  • Latency for A/D conversion (maybe negligable)
  • Are there any input buffer latencies??? Currently I assume there is no (significant) input buffer latency
  • Eventually added latency (2.5ms) when using Opus codec for compression
  • network latency (Ping/2)
  • Eventually added latency for decompression (2.5ms) ???
  • (de-) jitter buffer
  • Output buffer latency
  • Latency of D/A conversion (maybe negligable)
Can anyone confirm or correct my understanding, please? Especially the points with the question marks?

So far I figured out that 
  • Using lowest possbile Audio buffer size while system is still stable (CPU load)
  • Setting sample rate to 48kHz
  • Using uncompressed formats like e.g. PCM16
  • Using smallest possible (de-)jitter buffer
  • Along with wired LAN, turning off WLAN, Bluetooth other background applications
all contribute to reduced latency and stability. Am I missing anything?

Additionally, I found a problem in the calculation of latency (see attached screen shot), which sometimes shows negative latencies.
2021-02-12 21_03_59-.png

Although this is just a cosmetic problem it makes optimization harder when dealing with small latencies.

Thank you for your feedback.

Cheers, 
Andreas 

Jesse Chappell

unread,
Feb 12, 2021, 3:18:46 PM2/12/21
to SonoBus Users
On Fri, Feb 12, 2021 at 3:11 PM 'Andreas' via SonoBus Users <sonobu...@googlegroups.com> wrote:
I'm trying SonoBus since several weeks with multiple users for rehearsals with good results. However, there is always room for optimization. In order to do so, I like to understand how the total transmission latency from sender to receiver sums up.
My current understanding for upstream latency is:
  • Latency for A/D conversion (maybe negligable)
  • Are there any input buffer latencies??? Currently I assume there is no (significant) input buffer latency
The input buffer latency is usually 1 audio buffer size block. The OS may add a fraction more.
  • Eventually added latency (2.5ms) when using Opus codec for compression
  • network latency (Ping/2)
 
  • Eventually added latency for decompression (2.5ms) ???
This one doesn't apply... the 2.5ms at the encoder is where the opus delay in one direction occurs.

  • (de-) jitter buffer
  • Output buffer latency
  • Latency of D/A conversion (maybe negligable)
Can anyone confirm or correct my understanding, please? Especially the points with the question marks?

With my corrections, this is about right. Unless there are bugs, which I'm not ruling out!

 
 
So far I figured out that 
  • Using lowest possbile Audio buffer size while system is still stable (CPU load)
  • Setting sample rate to 48kHz
  • Using uncompressed formats like e.g. PCM16
  • Using smallest possible (de-)jitter buffer
  • Along with wired LAN, turning off WLAN, Bluetooth other background applications
all contribute to reduced latency and stability. Am I missing anything?


That pretty much covers it!


 
Additionally, I found a problem in the calculation of latency (see attached screen shot), which sometimes shows negative latencies.
2021-02-12 21_03_59-.png

Although this is just a cosmetic problem it makes optimization harder when dealing with small latencies.

Yeah, this is a known bug (along with the actual latency test failing entirely sometimes). Hoping to get rid of this measurement technique entirely in the future.

 
Jesse


Randy Petty

unread,
Feb 12, 2021, 3:47:01 PM2/12/21
to Jesse Chappell, SonoBus Users
Doesn't the 48khz sampling rate mentioned above, kind of depend on....things?
Randy


--
You received this message because you are subscribed to the Google Groups "SonoBus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonobus-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonobus-users/CAKtSYAUZhCAZ5Xajipt9w0rUymzQoyVSV3y8f64j8%2BmSZ6tB-g%40mail.gmail.com.

Jesse Chappell

unread,
Feb 12, 2021, 3:53:01 PM2/12/21
to SonoBus Users
You are already aware of that one Randy :)  48kHz is the recommended if your device supports it. For those whose don't, no problem.

Jesse


Randy Petty

unread,
Feb 12, 2021, 4:11:33 PM2/12/21
to SonoBus Users
Ok, so regardless of what your interface or mixer is capable of, there are internal application reasons to use 48khz if at all possible.

A friend who already owns the Mackie mixer ( I just ordered) sent me results both from the Oblique RTL utility and a "Centrance" ASIO latency test utility ( doesn't seem to available or supported any longer).    

Mackie RTL test results.png

Mats Andersson

unread,
Feb 16, 2021, 4:20:06 AM2/16/21
to SonoBus Users
Somewhat related: I recently had a very deep dive into reducing sound card latency for my Windows 10 setup, and finally got some great results (~8.4 ms --> 3.5 ms). However, there were for instance some unfixable hardware bugs in my modern CPU that I needed to work around. Feel free to ask questions, and also share the attached guide with anyone.

//Mats
Windows 10 audio latency optimization 2021-02-16-Final.pdf

Randy Petty

unread,
Feb 16, 2021, 9:25:58 AM2/16/21
to Mats Andersson, SonoBus Users
Nice analysis.  I always do a double-take when I see the words "sound card"
because for decades that always meant something on or adjacent to the motherboard.
Now I call it "audio interface," but enough nit-picking.  :-)
I used the RTL utility on my previous interface but just set up a
Mackie ProFxv3 mixer as interface.  On one of the forums a knowledgeable user 
did a number of RTL tests on his identical mackie and got good numbers.
I'm always a bit leery of running cables from output to input.  
I took a quick look at this tool. Parent web site has some interesting stuff.
https://forum.vb-audio.com/viewtopic.php?t=1204
Randy


You received this message because you are subscribed to a topic in the Google Groups "SonoBus Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonobus-users/Xi3tqvt9fEs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonobus-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonobus-users/cd412dec-ad13-44f9-89e4-b54933eff5c0n%40googlegroups.com.

Daniel Zimmermann

unread,
Apr 8, 2021, 7:12:20 PM4/8/21
to Randy Petty, Mats Andersson, SonoBus Users
Hi,
although very late to this thread I wanted to chime in with my device measurements with Jack: https://forum.digital-stage.org/t/measure-device-latency-in-linux/263
Cheers,
Daniel
Reply all
Reply to author
Forward
0 new messages