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
4
votes
1 answer

How to use ZeroMQ for multiple Server-Client pairs?

I'm implementing a performance heavy two-party protocol in C++14 utilising multithreading and am currently using ZeroMQ as a network layer. The application has the following simple architecture: One main server-role, One main client-role, Both…
Fulnir
  • 45
  • 3
4
votes
2 answers

NetMq sockets are thread safe?

I use private field (PushSocket - zmq_push socket for netmq) private PushSocket _pushSocket; And two methods which use this socket in different threads public void Method1() { //.....// _pushSocket.SendFrame(....); //.....// } public…
Evgeniy Mironov
  • 777
  • 6
  • 22
4
votes
1 answer

What are the performance and architectural differences between PCIe and QPI?

PCIe 3.0 x16 and QPI 1.1 (20 lanes) have identical effective bandwidth (16 GB/s). So, I wanted to get a rough picture about the differences between the two. What are the differences between the two in terms of latency and message rate (number of…
Anuj Kalia
  • 803
  • 8
  • 16
4
votes
3 answers

How to buffer and write to disk a low latency input with C

I need to write C code (not C# or C++) to get data from hardware analyzer (through 100Mb TCP/IP network) and write it to disk. Why I say "Low latency", well, Hardware analyser have a 9KB internal buffer, this is 2ms of data storing, after that it…
hiroru
  • 129
  • 2
  • 10
4
votes
1 answer

some hashtable / unordered_map questions

I am working on a low latency application which needs to be highly efficient all the time. I need to lookup some index based on string, so I am using c++ unordered_map. Constraints: -Only insertions and lookups, no removals -key is string, value is…
Medicine
  • 1,923
  • 2
  • 23
  • 33
4
votes
4 answers

Persistence strategy for low latency reads and writes

I am building an application that includes a feature to bulk tag millions of records, more or less interactively. The user interaction is very similar to Gmail where users can tag individual emails, or bulk tag large amounts of emails. I also need…
bajafresh4life
  • 12,491
  • 5
  • 37
  • 46
4
votes
2 answers

How can I prefetch infrequently used code?

I want to prefetch some code into the instruction cache. The code path is used infrequently but I need it to be in the instruction cache or at least in L2 for the rare cases that it is used. I have some advance notice of these rare cases. Does…
4
votes
3 answers

should I use thread affinity for "latency-critical" threads?

In my HFT trading application I have several places where I receive data from network. In most cases this is just a thread that only receives and process data. Below is part of such processing: public Reciver(IPAddress mcastGroup, int mcastPort,…
Oleg Vazhnev
  • 23,239
  • 54
  • 171
  • 305
4
votes
3 answers

Is compaction really inevitable for all JVM GC implementations?

On this link it is said that: These pauses are the result of an inevitable requirement to compact the heap to free up space. Collectors use different strategies to delay these events, but compaction is inevitable for all commercial available…
TraderJoeChicago
  • 6,205
  • 8
  • 50
  • 54
4
votes
1 answer

sub-millisecond latency in Core Audio

Is it possible to play sounds with sub-millisecond latency using Core Audio? I've tried using AudioQueues with different sizes and numbers of buffers, and I've tried using AudioUnits, but I have been unable to get below 30 ms of latency. I am using…
flutillie
  • 554
  • 1
  • 7
  • 19
3
votes
1 answer

PyAudiere alternatives for Mac OSX?

I am working on a music application in Python. I am using PyAudiere for low-latency audio playback, but I found that it is not very easy to get working on Mac OSX (I haven't managed to compile it given the instructions, I get the message…
Skyler
  • 909
  • 1
  • 10
  • 24
3
votes
1 answer

Java Netty load testing issues

I wrote the server that accepts connection and bombards messages ( ~100 bytes ) using text protocol and my implementation is able to send about loopback 400K/sec messages with the 3rt party client. I picked Netty for this task, SUSE 11 RealTime,…
Egor Lakomkin
  • 1,374
  • 14
  • 26
3
votes
3 answers

Prevent Thread From Sleeping When Calling Socket.Receive

I'm working on a low latency financial application that receives tcp data over sockets. This is how I'm making a socket connection and receiving bytes: public class IncomingData { Socket _Socket; byte[] buffer = new byte[4096]; public static…
FuzzyLogic
  • 31
  • 3
3
votes
0 answers

AMD Epyc Zen 2 slowed down by spin-loop

I wrote a multi-threaded SIMD matrix-vector multiplication that performs better than Intel MKL at my sizes of interest (Multi-threaded fixed-size matrix-vector multiplication optimized for many-core CPUs with non-uniform caches). I'm mostly using…
3
votes
1 answer

Java COM bridge

I have an ultra-low latency program and need to interface with a Windows COM component. What would be the fastest way to do this? Using a COM bridge like JACOB or write a native COM library and send out messages using a messaging bus like ZeroMQ?
DD.
  • 21,498
  • 52
  • 157
  • 246