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
216
votes
5 answers

Approximate cost to access various caches and main memory?

Can anyone give me the approximate time (in nanoseconds) to access L1, L2 and L3 caches, as well as main memory on Intel i7 processors? While this isn't specifically a programming question, knowing these kinds of speed details is neccessary for some…
Ted Graham
  • 3,511
  • 4
  • 24
  • 25
76
votes
2 answers

Why is returning a Java object reference so much slower than returning a primitive

We are working on a latency sensitive application and have been microbenchmarking all kinds of methods (using jmh). After microbenchmarking a lookup method and being satisfied with the results, I implemented the final version, only to find that the…
Sam Goldberg
  • 6,711
  • 8
  • 52
  • 85
68
votes
1 answer

Node.js, Socket.io, Redis pub/sub high volume, low latency difficulties

When conjoining socket.io/node.js and redis pub/sub in an attempt to create a real-time web broadcast system driven by server events that can handle multiple transports, there seems to be three approaches: 'createClient' a redis connection and…
lebear
  • 689
  • 1
  • 6
  • 3
55
votes
7 answers

Why does the JVM require warmup?

I understand that in the Java virtual machine (JVM), warmup is potentially required as Java loads classes using a lazy loading process and as such you want to ensure that the objects are initialized before you start the main transactions. I am a C++…
Suparna
  • 1,132
  • 1
  • 8
  • 20
51
votes
9 answers

How fast is state of the art HFT trading systems today?

All the time you hear about high frequency trading (HFT) and how damn fast the algorithms are. But I'm wondering - what is fast these days? Update I'm not thinking about the latency caused by the physical distance between an exchange and the server…
Nicholas
  • 2,147
  • 3
  • 23
  • 31
40
votes
1 answer

Why to use websocket and what is the advantage of using it?

I tried reading some articles, but not so clear on this topic. Would someone like to explain me below points: Why use websocket over http what is full duplex communication what do you mean by lower latency interaction
JR Sahoo.'JS'
  • 1,338
  • 2
  • 10
  • 11
38
votes
12 answers

What is your development checklist for Java low-latency application?

I would like to create comprehensive checklist for Java low latency application. Can you add your checklist here? Here is my list 1. Make your objects immutable 2. Try to reduce synchronized method 3. Locking order should be well documented, and…
Mohan Narayanaswamy
  • 2,149
  • 6
  • 33
  • 40
34
votes
6 answers

What is the difference between latency and response time?

I started to read famous Martin Fowler book (Patterns of Enterprise Application Architecture) I have to mention that I am reading the book translated into my native language so it might be a reason of my misunderstanding. I found their definitions…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
31
votes
10 answers

Set Windows command-line terminal title in Python

I'm running several instances of a certain Python script on a Windows machine, each from a different directory and using a separate shell windows. Unfortunately Windows gives each of these shell windows the same name: :…
Jonathan Livni
  • 101,334
  • 104
  • 266
  • 359
31
votes
2 answers

Why is hibernate batching / order_inserts / order_updates disabled by default?

Are there any reasons why hibernate batching / hibernate.order_updates / hibernate.order_inserts are disabled by default? Is there any disadvantage when you enable a batch size of 50? Same for the order_updates / order_inserts parameters. Is there a…
fbe
  • 313
  • 1
  • 3
  • 5
27
votes
2 answers

What is low latency access of data?

What do you mean by low latency access of data? I am actually confused about the definition of the term "LATENCY". Can anyone please elaborate the term "Latency".
Debashisenator
  • 1,621
  • 4
  • 17
  • 16
25
votes
2 answers

Tracking down mysterious high-priority thread suspend inside the kernel

Description I'm working on an embedded Linux system (using kernel 3.4 and bionic, Android-like) that is running on a multi-core ARMv7a SoC. We have a user-space thread that is basically servicing events coming out of the kernel. The events are…
23
votes
2 answers

Can Boost ASIO be used to build low-latency applications?

Can Boost ASIO be used to build low-latency applications, such as HFT (High Frequency Trading)? So Boost.ASIO uses platform-specific optimal demultiplexing mechanism: IOCP, epoll, kqueue, poll_set, /dev/poll Also can be used Ethernet-Adapter with…
Alex
  • 12,578
  • 15
  • 99
  • 195
21
votes
4 answers

High Frequency Trading in the JVM with Scala/Akka

Let's imagine an hypothetical HFT system in Java, requiring (very) low-latency, with lots of short-lived small objects somewhat due to immutability (Scala?), thousands of connections per second, and an obscene number of messages passing around in an…
Hugo Sereno Ferreira
  • 8,600
  • 7
  • 46
  • 92
20
votes
1 answer

When busy-spining Java thread is bound to physical core, can context switch happen by the reason that new branch in code is reached?

I am interested in low-latency code and that`s why I tried to configure thread affinity. In particular, it was supposed to help to avoid context switches. I have configured thread affinity using https://github.com/OpenHFT/Java-Thread-Affinity. I run…
stepan2271
  • 205
  • 1
  • 4
1
2 3
27 28