Questions tagged [low-latency]

For questions pertaining to the measurement or improvement of latency in a system.

In computing terms, describe the time it takes to perform an action. Low latency implies this should be particularly short. It is usually in the range of timings which cannot be seen, only measured.

Low Latency implies that there is a measure for the latency of critical portions of the system and that it should meet this latency requirement a high percentage of the time e.g. 99%, 99.9%, 99.99% or worst case.

This could be any where from 10 nano-second to 100 milli-seconds depending on the context.

Questions which tag low latency should give measurable timings and percentage to reach that as the solution to follow is very dependant on these measures.

Without a latency measure to go by often the simplicity of the solution should be the target which will produce quick application with minimal complexity/effort.

416 questions
18
votes
7 answers

Low latency serial communication on Linux

I'm implementing a protocol over serial ports on Linux. The protocol is based on a request answer scheme so the throughput is limited by the time it takes to send a packet to a device and get an answer. The devices are mostly arm based and run Linux…
JustMaximumPower
  • 1,257
  • 3
  • 11
  • 22
15
votes
3 answers

AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by client due to mismatching sample rate

Does anybody know how to fix this warning message? 07-14 10:38:55.411 V/tracker-audiotest(22426): Recording Thread::run(): start audioRecord recording. 07-14 10:45:51.490 "W/AudioTrack( 607): AUDIO_OUTPUT_FLAG_FAST denied by client due to…
gary
  • 1,569
  • 3
  • 20
  • 30
15
votes
9 answers

how to declare and use "one writer, many readers, one process, simple type" variable?

I have really simple question. I have simple type variable (like int). I have one process, one writer thread, several "readonly" threads. How should I declare variable? volatile int std::atomic int I expect that when "writer" thread modifies…
Oleg Vazhnev
  • 23,239
  • 54
  • 171
  • 305
14
votes
2 answers

High throughput vs low latency in HDFS

I tried to define what the high throughput vs low latency means in HDFS in my own words, and came up with the following definition: HDFS is optimized to access batches of data set quicker (high throughput), rather then particular records in that…
spacemonkey
  • 19,664
  • 14
  • 42
  • 62
13
votes
2 answers

Low Latency (50ms) Video Streaming with NODE.JS and html5

OBJECTIVE: I'm building a FPV robot, I want to control it with a with a webbrowser over a local wi-fi connection. I'm using a raspberry pi 3B+ with Raspbian Stretch. I built my own motor control and power regulator hat. After lots of research…
12
votes
2 answers

How to enable LHLS in FFMPEG 4.1?

I am trying to create a low latency CMAF video stream using FFMPEG. To do so, I would like to enable the lhls option in FFMPEG in order to have the #EXT-X-PREFETCH tag written in the HLS manifest. From the FFMPEG doc…
mehdi.r
  • 386
  • 1
  • 4
  • 20
12
votes
1 answer

Why are these matrix transposition times so counter-intuitive?

The following example code generates a matrix of size N, and transposes it SAMPLES number of times. When N = 512 the average execution time of the transposition operation is 2144 μs (coliru link). At first look there is nothing special, right?...…
Narek Atayan
  • 1,479
  • 13
  • 27
12
votes
8 answers

IoT request response protocol

We need to build a server that can communicate with some embedded devices running a variant of Android. We need to be able to send commands to the device, and receive a response. A simple command might be asking the device for it's status. We won't…
Dominic Bou-Samra
  • 14,799
  • 26
  • 100
  • 156
12
votes
1 answer

High audio latency with Icecast and Darkice

I have successfully installed icecast and darkice on my ubuntu machine and was able to stream live on my lan. but to my disappointment it has a 15sec to 20sec delay.This is very poor performance. I don't think it is because of my lan connection…
tekesteg
  • 194
  • 1
  • 3
  • 11
11
votes
3 answers

In-process communication between wars in the same container

What options are there to achieve low-latency communication between two wars running in the same jetty-container? I basically need to call a service in one war from the other, but can't afford the overhead of calling it as a web service. Since they…
ebaxt
  • 8,287
  • 1
  • 34
  • 36
11
votes
2 answers

Why does the JVM show more latency for the same block of code after a busy spin pause?

The code below demonstrates the problem unequivocally, which is: The exact same block of code becomes slower after a busy spin pause. Note that of course I'm not using Thread.sleep. Also note that there are no conditionals leading to a HotSpot/JIT…
LatencyFighter
  • 351
  • 2
  • 11
11
votes
5 answers

should I "bind" "spinning" thread to the certain core?

My application contains several latency-critical threads that "spin", i.e. never blocks. Such thread expected to take 100% of one CPU core. However it seems modern operation systems often transfer threads from one core to another. So, for example,…
Oleg Vazhnev
  • 23,239
  • 54
  • 171
  • 305
10
votes
5 answers

High Frequency Trading - TCP > UDP?

I was told that for a High Frequency Trading (HFT) system that requires low-latency, TCP is used over UDP. I was told that with TCP you can make point to point connections, whereas you cannot with UDP, however from my understanding you can send UDP…
n00b
  • 5,843
  • 11
  • 52
  • 82
10
votes
5 answers

Java TCP/IP Socket Latency - stuck at 50 μs (microseconds)? (used for Java IPC)

We have been profiling and profiling our application to get reduce latency as much as possible. Our application consists of 3 separate Java processes, all running on the same server, which are passing messages to each other over TCP/IP sockets. We…
Sam Goldberg
  • 6,711
  • 8
  • 52
  • 85
10
votes
4 answers

Java TCP/IP Socket Performance Problem

Our application is reading data very fast over TCP/IP sockets in Java. We are using the NIO library with a non-blocking Sockets and a Selector to indicate readiness to read. On average, the overall processing times for reading and handling the read…
Sam Goldberg
  • 6,711
  • 8
  • 52
  • 85
1
2
3
27 28