low-latency

Why does TCP/IP on Windows7 take 500 sends to warm-up? ( w10,w8 proved not to suffer )

情到浓时终转凉″ 提交于 2020-01-02 02:19:07
问题 We are seeing a bizarre and unexplained phenomenon with ZeroMQ on Windows 7 , sending messages over TCP. ( Or over inproc , as ZeroMQ uses TCP internally for signalling, on Windows ). The phenomenon is that the first 500 messages arrive slower and slower, with latency rising steadily. Then latency drops and messages arrive consistently rapidly, except for spikes caused by CPU/network contention. The issue is described here: https://github.com/zeromq/libzmq/issues/1608 It is consistently 500

Realtime streaming with QAudioOutput (qt)

一曲冷凌霜 提交于 2020-01-01 10:50:50
问题 I want to play real-time sounds responding with no appreciable lag to user interaction. To have low latency I have to send small chunks of pcm data. What I am doing: QAudioFormat format; format.setSampleRate(22050); format.setChannelCount(1); format.setSampleSize(16); format.setCodec("audio/pcm"); format.setByteOrder(QAudioFormat::LittleEndian); format.setSampleType(QAudioFormat::SignedInt); QAudioDeviceInfo info(QAudioDeviceInfo::defaultOutputDevice()); if (!info.isFormatSupported(format)) {

Why does the JVM show more latency for the same block of code after a busy spin pause?

久未见 提交于 2020-01-01 02:38:45
问题 The code below demonstrates the problem unequivocally , which is: The exact same block of code becomes slower after a busy spin pause. Note that of course I'm not using Thread.sleep . Also note that there are no conditionals leading to a HotSpot/JIT de-optimization as I'm changing the pause using a math operation, not an IF . There is a block of math operations that I want to time. First I time the block pausing 1 nanosecond before I start my measurement. I do that 20,000 times. Then I change

Low latency serial communication on Linux

早过忘川 提交于 2019-12-29 03:15:08
问题 I'm implementing a protocol over serial ports on Linux. The protocol is based on a request answer scheme so the throughput is limited by the time it takes to send a packet to a device and get an answer. The devices are mostly arm based and run Linux >= 3.0. I'm having troubles reducing the round trip time below 10ms (115200 baud, 8 data bit, no parity, 7 byte per message). What IO interfaces will give me the lowest latency: select, poll, epoll or polling by hand with ioctl? Does blocking or

Java COM bridge

谁说胖子不能爱 提交于 2019-12-23 17:36:06
问题 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? 回答1: If you use ZeroMQ, you'll be dealing with two processes. And passing a message from one process to another is more expensive than doing the same within the same process. So using a Java COM bridge will certainly result in a lower latency. Having

Is compaction really inevitable for all JVM GC implementations?

痞子三分冷 提交于 2019-12-23 15:27:10
问题 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 collectors. I was under the impression that if you keep the memory footprint of your application constant then there is no need for GC compaction to occur, in other words, it will only happen if you keep adding and collecting objects. If you have a big

CyclicDist goes slower on multiple locales

孤者浪人 提交于 2019-12-22 14:48:06
问题 I tried doing an implementation of Matrix multiplication using CyclicDist module. When I test with one locale vs two locales, the one locale is much faster. Is it because the time to communicate between the two Jetson nano boards is really big or is my implementation not taking advantage of the way CyclicDist works? Here is my code: use Random, Time, CyclicDist; var t : Timer; t.start(); config const size = 10; const Space = {1..size, 1..size}; const gridSpace = Space dmapped Cyclic(startIdx

IoT request response protocol

丶灬走出姿态 提交于 2019-12-20 09:59:57
问题 We need to build a server that can communicate with some embedded devices running a variant of Android. We need to be able to send commands to the device, and receive a response. A simple command might be asking the device for it's status. We won't have HTTP, so we need to have the client/device establish a connection with the server. We were considering using MQTT as it has a lot of nice properties (QoS, lightweight, built for IoT), but it doesn't natively support a request response workflow

What is low latency access of data?

落花浮王杯 提交于 2019-12-20 08:18:40
问题 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". 回答1: Latency - The time it takes to access data. Bandwidth - How much data you can get. The classic example: A wagon full of backup tapes is high latency, high bandwidth. There's a lot of information in those backup tapes, but it takes a long time for a wagon to get anywhere. Low latency networks are important for streaming

How can I prefetch infrequently used code?

痴心易碎 提交于 2019-12-19 04:01:29
问题 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 _mm_prefetch work for code? Is there a way to get this infrequently used code in cache? For this problem I don't care about portability so even asm would do. 回答1: The answer depends on your CPU architecture. That said, if you are using gcc or clang, you