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
3
votes
4 answers

How to return sum of two highest value in List in most efficient way? C#

I'm trying to pass a pre-written test with focus on performance. What is the most efficient way to return the sum of the two highest numbers in a List of int? I have tried the following and according to the test it wasn't fast enough when it comes…
3
votes
0 answers

Why does a function run faster when I call it continuously?

I am deveoping a low latency service use c++ on linux. I do two group performance tests: send 1 request per second, it's average latency is 3.5 microseconds. send 10 request per second, it's average latency is 2.7 microseconds. I cannot understand…
Frank Liu
  • 31
  • 2
3
votes
0 answers

How to get a UDP socket to drop the oldest-queued packet rather than the new incoming packet?

Here's the scenario: I've got a real-time(ish) GUI display that shows the current state of some sensors on a server across the network, and I need the display to be as low-latency as possible, so my server is sending high-frequency updates to the…
Jeremy Friesner
  • 70,199
  • 15
  • 131
  • 234
3
votes
2 answers

Why does joblib parallel execution make runtime much slower?

I want to shuffle values in a 3D numpy-array, but only when they are > 0. When I run my function with a single core, it is much faster than with even 2 cores. It is way beyond the overhead of creating new python processes. What am I missing? The…
3
votes
1 answer

ZeroMQ is dropping messages

I am using ZeroMQ to communicate between multiple services. I ran into an issue where I was sending responses but they were never getting to the caller. I did a lot of debugging and couldn't figure out what was happening. I eventually reduced the…
devo
  • 1,290
  • 1
  • 15
  • 28
3
votes
1 answer

What causes cases with high ZeroMQ latency and how to avoid them?

I try to use ZeroMQ for fast message passing. Messages need to be delivered in less than 1 [ms]. I did some testing (inproc, single process on Linux, no TCP) and see that usually there is no problem with that. The latency is about 10 - 100 [us],…
grzegorz
  • 331
  • 3
  • 16
3
votes
1 answer

Compilation warning OpenCL Matrix Multplication

Why is this not vectorizing? __attribute__((num_simd_work_items(4))) __attribute__((num_compute_units(2))) __attribute__((reqd_work_group_size(16,16,1))) __kernel void matrix_multiplication(const int fDIM,const int gDIM, const int hDIM, __global…
3
votes
1 answer

Problem With Packet Delays on TCP/IP Windows 7 loopback adapter (or bug in software?)

We have a client and server application currently testing on the same Windows 7 64 bit machine. They're both written in C# and using P/Invoke to call out to the Winsock2 libraries. The application works fine overall w/o any errors. And the latency…
Wayne
  • 2,959
  • 3
  • 30
  • 48
3
votes
1 answer

Why would we go for micro-services if there is requirement for lower latency code?

In a monolith, we just need to either make a function call or method invocation as opposed to inter process communication. Can someone familiar with micro-services architecture help to understand reasons how you can use micro services for developing…
The Roy
  • 2,178
  • 1
  • 17
  • 33
3
votes
0 answers

Java server < 50 microseconds TCP latency possible?

Is it possible to create a Java TCP server with latency lower then 50 microseconds? I tried both vanilla Java and Netty. The best I achieved is ~300 microseconds measuring by both Java System.nanoTime() and Wrk tool. I want this without inter…
Artem Novikov
  • 4,087
  • 1
  • 27
  • 33
3
votes
2 answers

Alternative to mktime in C++

uint64_t timestamp_nanoseconds = 634019142119225390; time_t result = timestamp_nanoseconds / 1000000000; struct tm * timeinfo = gmtime(&result); struct tm dateInfo ; dateInfo.tm_mday = timeinfo->tm_mday ; dateInfo.tm_mon = timeinfo->tm_mon…
Balan K
  • 356
  • 2
  • 11
3
votes
1 answer

low-latency html5 video on a LAN

I'm looking for some suggestions on how to use the tag to stream a live-video stream with relatively low latency (~2s). I've seen some other questions similar to this posted such as this and this but neither really adequately answered my question.…
3
votes
0 answers

Azure Blob Storage - High Server Latency (3sec where SLA says ms)

I'm trying the performance of a mobile app storing images in Azure Blob Storage. When profiling my app I noticed a storage query with a near 3s Time to First Byte. I downloaded the related Azure Storage log file and noticed that both the End to End…
François
  • 3,164
  • 25
  • 58
3
votes
0 answers

AUDIO_OUTPUT_FLAG_FAST denied by client using external bluetooth speaker

I am aiming for low latency audio in Android M and using Superpowered sdk. Simply routing internal microphone to internal speaker works flawlessly - By using the general guidelines to enable high performance audio…
3
votes
2 answers

Reducing FFMPEG h264 video stream latency

I'm using FFMPEG(h264) and I want to reduce latency as much as possible. Now it's about 700 ms and I can't really make it lower. I tried almost all, so maybe anyone has idea how to help me? ffmpeg -f dshow -i video="screen-capture-recorder"…
KKKk
  • 93
  • 2
  • 15