430 questions
1
vote
0
answers
97
views
How can I efficiently share high-frequency tick data between two local C++ processes using shared memory?
I'm building a high-performance tick simulator in C++ that generates market-like ticks (up to 65,536 per second). Now, I want to send these ticks to another local process on the same Linux machine in ...
0
votes
0
answers
68
views
High Latency with m3u8 Live Stream in ExoPlayer Compared to TheOPlayer
I'm working with live HLS streaming using an .m3u8 URL. I'm observing a significant difference in latency between two players:
My Setup:
TheOPlayer (Web): Achieves a live latency of around 2.5 to 3 ...
2
votes
1
answer
108
views
Understanding the reasoning behind periodic latency spikes on EC2 instance ( 50 ms )
While debugging a latency issue in our software, I stumbled into a behaviour which is quite puzzling to me. Here's the code
#include <iostream>
#include <thread>
#include <atomic>
#...
0
votes
1
answer
82
views
How to profile/monitor a KDB tickerplant to trace causes of a slow tickerplant?
I'm trying to use KDB as a low-latency pub/sub message broker that persists all messages in a queryable format.
However, I'm noticing the latency from when the tickerplant receives a message (i.e. ...
1
vote
1
answer
48
views
Why buffer size of boost::asio::serial_port::async_read_some affects function speed?
I have a USB device that replies {0x00 0xFF 0x01 0x03} when you send him {0x00,0xFF,0x01,0x02}. I'd like to implement a ping test, sending commands and computing an average response time.
Here is my ...
3
votes
0
answers
84
views
How to optimize audio playback for lowest latency using the Waveform API?
I'm working with a 2-channel, 32-bit float, 44100 Hz audio format and using float chunks[2][2048*8] for smooth playback. Currently, this chunk size is the smallest that can play without distortion, ...
2
votes
1
answer
297
views
Is it possible to copy from native memory to a ByteBuffer using the new FFM API without producing temp objects?
We have an open-source project on GitHub called CoralRing using sun.misc.Unsafe that we are migrating to the new Foreign Function & Memory (FFM) API. For our particular use-case (low-latency ...
0
votes
0
answers
42
views
Why doesn't VMA_INTERNAL_THREAD_AFFINITY set the VMA internal thread on the specified core?
You can find more details about the issue in this Github issue https://github.com/Mellanox/libvma/issues/1080 .
I'm using Mellanox's libvma to optimize my application's networking performance. However,...
0
votes
1
answer
139
views
Fast Communication between Python Threads
I am working on an audio application, where all functions execution times in the "audio loop" need to be << 1ms. I am aware that Python is not the right programming language for this ...
0
votes
0
answers
68
views
Linux real-time kernel frequently kills my app
I'm developing a near real-time application, that forwards messages in a endless loop(no yield, no sleep, no wait).
The messages come from shared memory, go to another blocks of shared memory, so my ...
0
votes
2
answers
190
views
When is virtual dispatch faster than function templates in C++ runtime?
Most knows that template meta programming is in general faster than virtual dispatch in C++ due to types of templates were decided in compile time while virtual functions required runtime lookup on ...
-3
votes
1
answer
73
views
MySQL Performance Issue: Initial Query Slow After Period of Inactivity but Fast on Subsequent Queries
I'm experiencing a performance issue with MySQL when deploying my application to a live server. The problem occurs when creating a short link for the first time after a period of inactivity. ...
1
vote
2
answers
161
views
Numba njit making function call involving long expressions extremely slow
I am writing a finite volume code to solve the inviscid, compressible Euler equations. As a part of this, I am performing what is known as the Cauchy-Kovalevskaya process. A code snippet is given ...
0
votes
1
answer
335
views
Why is my performance so low with Aeron, 90th percentile less than 5ms throughput is only 2k
I wrote a simple test for Aeron
one client, one server, the client sends data to the server, then the server sends it back and counts the elapsed time.
The final result is much lower than I expected, ...
1
vote
0
answers
116
views
Stock tick-data over Web sockets from Broker to browser with a middle node.js server
We are creating a trading web app with a node.js backend and react front end.
This app will be able to view tick data and place trades using broker's APIs.
Broker's APIs give stock quotes over ...
3
votes
1
answer
208
views
Does Aeron support io_uring?
I'm using the Aeron open source for some POCs, and using C version of media driver, does it support the io_uring?
Also we are using java version of Aeron cluster and archive, what about them?
0
votes
0
answers
279
views
How do I reduce latency for Flutter Geolocator on iOS?
I've built an app using Flutter that allows users to track how far they have travelled from a starting point, a bit like any map-based or sports tracking app. With the app, a high accuracy is ...
3
votes
0
answers
436
views
Does std::steady_clock::now() make a syscall in Linux?
My project is a long time daemon service and need to busy check some conditions and take actions as soon as possible.
I want to use std::steady_clock to account the responsing time of my service and ...
0
votes
1
answer
148
views
Read multiple sockets from single thread [low-latency]
As a network client I would like to follow the input from two TCP connections. Both servers send a few packets per second. Each packet is small in size when compared to the available bandwidth.
...
0
votes
1
answer
254
views
Spring Boot spanner latency problems
I found our service has problems with latency and every single read statements is taking more than 40ms.
I tried to use native/derived queries and it always takes more than 40ms.
Reading data is ...
0
votes
1
answer
151
views
How to detect which client pressed a button first on a webpage?
Context
I'm trying to create a trivia website that can detect which user pressed a button first; my idea is that the first user who clicks the button gets to answer the trivia question. I don't really ...
0
votes
1
answer
892
views
What's the impact of hyperthreading on low-latency development
I've read a post regarding low-latency development as below.
"We always avoid (relatively) slow language features like exceptions, memory allocation and virtual function calls on the critical ...
0
votes
0
answers
96
views
accurate measurement and reduce jitter
I am trying to understand how to measure a block of code to maximize performance.
On doing some tests I found there to be quite a few outliers that have large differences from the average. The ...
2
votes
1
answer
548
views
Long delay on reading from Kafka Spark
There is a Spark streaming application which reads messages from Kafka, processes them and then stores them to some DB.
During its latency optimization constant delay of ~2s on reading from Kafka was ...
2
votes
1
answer
624
views
How to achieve Spring boot p99 under 500 milliseconds for 1000 requests per second
Our spring boot application verion 2.5.10 has just a single api which reads from redis 6 times and does some calculations and there are no other IO operations such as database operations and is ...
0
votes
0
answers
1k
views
High Latency and Thread Starvation Issues in Spring Boot App
I have a Spring Boot application with an API endpoint that pushes data to a Kafka topic. However, when the application experiences high load, it leads to significant latency issues, and many requests ...
3
votes
0
answers
1k
views
How to get rid of interrupts on isolated cores (caused by simple Go app) during low-latency work?
Summary
LOC, IWI, RES and CAL interrupts are observed on isolated cores on which low-latency benchmark is performed. Interrupts are caused by simple Go application (printing "Hello world" ...
1
vote
0
answers
27
views
How to make a thread handle environment with very high machine count
We have an array consisting of 1000 elements each of which signifies a machine count of 1000 environments and there are 5 threads that need to be given environments from this array such that each ...
0
votes
0
answers
76
views
Why is my OpenMP code experiencing high latency in production despite performing well in development environment?
Below is a parallel task model using omp.
The proc1, ..., proc4 each costs below 1ms to finish. And in develop environment(2 physical CPU, 16 core in total) the job finishes perfectly.
But in ...
2
votes
1
answer
1k
views
Call openai-node in the backend or call https in the frontend?
I have a web application by ReactJS and Nodejs. This application calls OpenAI APIs.
Previously, when a user launches a request in the frontend, we send a request to the endpoint in our backend, call ...
-1
votes
1
answer
238
views
ultra low latency live video cam streaming using azure
I want to use azure for my video cam live stream. And I want to use that for a realtime object detection process.
Problem :
I used azure media services but it has approx 4 sec delay which is not ...
1
vote
0
answers
900
views
If I want to play Low-Latency HLS streaming on safari native player, must #EXT-X-TARGETDURATION and #EXTINF be equal?
I make two low-latency hls streams to play on safari native player. The only difference is EXT-X-TARGETDURATION:
"First fine stream" with EXT-X-TARGETDURATION = EXTINF = 6sec;
"Second ...
0
votes
0
answers
1k
views
Rust Tokio Async performance
I'm looking to create a high throughput, low-latency marketplace using Rust. I was doing some performance testing on the serialization and found that it was pretty slow (0.05ms). After some ...
0
votes
1
answer
196
views
How Chronicle Wire allows you to serialize and deserialize objects with higher performance
We would be developing a low-latency market data solution for which we are exploring Chronicle products.
Quoting from article
Chronicle Wire allows you to serialize and deserialize objects to and
...
3
votes
1
answer
306
views
How can I serve ML models quickly and with a low latency
Assume a user connects via a Websocket connection to a server, which serves a personalized typescript function based on a personalized JSON file
So when a user connects,
the personalized JSON file is ...
0
votes
0
answers
118
views
Strange increase in latency of ZeroMQ between c# and python
I'm trying to send images from C# running on win 11 to a python server running on WSL2.
I'm using ZeroMQ to send byte arrays, but as soon as the byte arrays cross a threshold (~8kb) the latency spikes ...
4
votes
0
answers
266
views
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 ...
1
vote
0
answers
109
views
Streaming 1080p 30FPS from i.MX to X86 Laptop with Minimum Latency
UVC Camera is used supporting MJPG: 1080p@30 / 720p@30 or YUV:1080p@6 / 720p@6.
HW Setup-i.MX6 Board [HS-O]:
Video Source (VS-O): UVC Camera connected with i.MX6 Board USB 2.0 port.
Video Receive (VR):...
2
votes
0
answers
50
views
Why is my interval of consecutive rdtsc calls periodic?
I am profiling interval of consecutive rdtsc calls as suggested by this talk by David Gross.
My system is aws c5a.8xlarge instance, ubuntu 22.04 LTS server, no other user packages installed and there ...
-5
votes
1
answer
90
views
Which one performs better in Java? Creating object or getting from cache twice? [closed]
The object has 6,7 fields.
cache.get() is a map read.
Which one is faster?
obj temp = cache.get(key); // temporary object creation
Int id = temp != null ? temp.getId() : ...
1
vote
0
answers
114
views
Camera to computer high latency
I am connecting a Fujifilm x-t3 to my computer (usb-c to usb-c) and getting the video stream using OpenCV and C++ in Visual Studio. The issue is I am getting a latency of 116 milliseconds from the ...
0
votes
0
answers
611
views
Cloud run cold start spring boot issue
I have login API developed in spring boot and deployed on cloud run with min instance 1. But for some request it is taking 20s to process which is not desirable. When I checked logs, I found that ...
0
votes
1
answer
450
views
iOS Swift live streaming: Warning: PART-HOLD-BACK SHOULD be at least three times the Part Target Duration
We use AVPlayer in order to play live stream in our iOS app. We've recently added low-latency feature.
Only when low-latency is enabled: Sometimes player stalls / is frozen.
The following waring is ...
0
votes
1
answer
244
views
How can we provide low latency transmission of messages using jGroups?
We have implemented message broadcasting between instances of the same API using jGroups to synchronize application state.
We use jGroups5.2.4.Final on JDK 11.0.17 on Linux 5.4.0.
Currently we observe ...
0
votes
1
answer
341
views
x86 rep instructions, lock prefix, atomics and real-time
Consider the following case:
Thread A (evil code I do not control):
# Repeat some string operation for an arbitrarily long time
lock rep stosq ...
Thread 2 (my code, should have lock-free behaviour):
...
0
votes
1
answer
580
views
Ultra low-latency in ubuntu 22.04
I should run a visual experimental project with Matlab or Python in which the time resolution is dramatically important! that's why I shift to Linux and use the low-latency kernel in ubuntu. but I ...
2
votes
1
answer
968
views
crypto HFT architecture
This architecture is designed to minimize latency with the help of busy-spinning and CPU affinity locks(meaning each producer/consumer thread running in only one core), preventing a thread from ...
0
votes
0
answers
241
views
How to reduce latency in a PyQT Display?
I am working on a program that takes in high-speed CanBus Data and displays it to a speedometer-style display using PYQT (A digital Dash Board Display). I have run into the common problem of the ...
3
votes
4
answers
927
views
How to return sum of two highest value in List<int> 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 ...
0
votes
1
answer
1k
views
How should I approach parsing the network packet using C++ template?
Let's say I have an application that keeps receiving the byte stream from the socket. I have the documentation that describes what the packet looks like. For example, the total header size, and total ...