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
2 answers

Postgres LISTEN/NOTIFY - low latency, realtime?

I am planning to use postgres LISTEN/NOTIFY aproach to get insert time(actual transaction commit time) of records in a table. To achieve this, I plan to do the following. I issue a notification during insert time as shown below. BEGIN; INSERT INTO…
Chandra
  • 1,577
  • 3
  • 21
  • 28
3
votes
5 answers

How can I quickly compare a list and a set?

Say I have a list l = [1, 1 , 1, 2, 3, 4, 5, 5] and two disjoint sets of equal length a = (1, 3) and b = (2, 5) and I want to get the elements in l that is in a and b separately like [1, 1, 1, 3] and [2, 5, 5] I tried list comprehension like [x for…
johnjullies
  • 745
  • 1
  • 8
  • 22
3
votes
2 answers

InfiniBand network performance

I am measuring the performance of InfiniBand using iperf. It's a one-to-one connection between a server and a client. I measured the bandwidth changing number of threads which request Network I/Os. ( The cluster server has: "Mellanox ConnectX-3 FDR…
syko
  • 3,477
  • 5
  • 28
  • 51
3
votes
1 answer

Why Netty uses reference counting instead of just one ByteBuffer per connection when NIO is single-threaded?

I am confused why Netty 5.0 makes you use reference counting for ByteBuffers. Isn't Java NIO supposed to be single-threaded, in other words, one selector thread for many connections? Each client needs its own ByteBuffer and that's it, no pooling…
Peter Mel
  • 367
  • 2
  • 11
3
votes
1 answer

Low CPU usage polling architecture between 2 JVMs

Server Environment Linux/RedHat 6 cores Java 7/8 About application : We are working on developing a low latency (7-8 ms) high speed trading platform using Java There are 2 modules A & B each running on its own JVM B gets data from…
Neha Sharma
  • 153
  • 1
  • 5
3
votes
1 answer

USB: low latency (< 1ms) with interrupt transfer and raw HID

I have a project that requires reading an external IMU gyroscope data at regular interval and sending the data over to an Android phone. I am using a teensy 2.0 board to query the IMU via I2C and send it over USB using raw HID. I am using RawHID…
Jary316
  • 291
  • 1
  • 4
  • 15
3
votes
2 answers

Sources of latency in sending-receiving tcp/udp packets in linux

What are sources of latency in process of sending/receiving TCP/UDP packets in linux 2.6 ? I want to know a latency sources in "ping-pong" latency tests. There are some rather good papers of ethernet latency, but they cover only latency sources in…
osgx
  • 90,338
  • 53
  • 357
  • 513
3
votes
3 answers

ZeroMQ dealer--to-dealer high latency compared to winsock

My company is looking into using ZeroMQ as the transport mechanism. First I benchmarked the performance just to get a hunch of what I´m playing with. So I created an application comparing zmq dealer-to-dealer setup against winsock. I meassured the…
rhedin
  • 71
  • 1
  • 3
  • 20
3
votes
0 answers

Sending simple text data live from Android client to server

I've seen other posts on streaming live audio and video from an android application to a desktop server, but not yet for simple textual data. Basically, I'm trying to send key values from the android keyboard directly to a desktop server (which is…
3
votes
1 answer

What is the difference between "Interrupt coalescing" and the "Nagle algorithm"?

Is the main difference that? Interrupt coalescing (ethtool -C eth1 rx-usecs 0) - coalesce the received packets from different connections, i.e. increase bandwitdh, but increase the latency of the receive Nagle algorithm (socket options =…
Alex
  • 12,578
  • 15
  • 99
  • 195
3
votes
1 answer

very interesting result from latency test of IPC on Linux 2.6.18

I am doing a performance (latency) test on unix socket under linux 2.6.18, a process A writes 1024 bytes to process B on each 10 ms, and the result shows average latency is 20 us with small standard deviation(2~3 us). The test becomes interesting…
stepinto
  • 45
  • 4
3
votes
1 answer

How does one avoid reallocation in a low-latency environment?

In an order-book in a trading platform (low-latency environment) you need to store every order ID, at the very least to verify every order is unique. The number of order IDs you can receive in a trading day is unbounded. Apart from using historical…
user1332148
  • 1,256
  • 2
  • 11
  • 24
3
votes
1 answer

Threaded low latency audio on Android

The short version: I'm developing a synth app and using Opensl with low latency. I was doing all the audio calculation in the Opensl callback funktion (I know I should not but I did anyway). Now the calculations take about 75% cpu time on my nexus…
Floaf
  • 145
  • 7
3
votes
2 answers

Refactoring code with a lot of "locks" to more lock-free code

Upd thanks to Matthew Watson for noticing and note that I plan to port my code to c++-linux so I prefer "platform-independent" code My trading application is almost lock-free. The code below is the only place where I do use locks. Let me start with…
Oleg Vazhnev
  • 23,239
  • 54
  • 171
  • 305
3
votes
3 answers

should i try to avoid "new" keyword in ultra-low-latency software?

I'm writing HFT trading software. I do care about every single microsecond. Now it written on C# but i will migrate to C++ soon. Let's consider such code // Original class Foo { .... // method is called from one thread only so no need to be…
Oleg Vazhnev
  • 23,239
  • 54
  • 171
  • 305