low-latency

High audio latency with Icecast and Darkice

雨燕双飞 提交于 2019-12-04 11:21:01
问题 I have successfully installed icecast and darkice on my ubuntu machine and was able to stream live on my lan. but to my disappointment it has a 15sec to 20sec delay.This is very poor performance. I don't think it is because of my lan connection because even when i tried to listen in that same ubuntu machine there was still a delay! I have tried to configure icecast to have no burst-size which means there will be no buffering,this helped me reduce the delay to around 6sec to 8sec. So please if

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

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 07:35:20
问题 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 final version was 3 times slower than what I had just benchmarked. The culprit was that the implemented method was returning an enum object instead of an int . Here is a simplified version of the benchmark code: @OutputTimeUnit(TimeUnit

C++ Low-Latency Threaded Asynchronous Buffered Stream (intended for logging) – Boost

泄露秘密 提交于 2019-12-04 07:27:13
Question : 3 while loops below contain code that has been commented out. I search for ("TAG1", "TAG2", and "TAG3") for easy identification. I simply want the while loops to wait on the condition tested to become true before proceeding while minimizing CPU resources as much as possible. I first tried using Boost condition variables, but there's a race condition. Putting the thread to sleep for 'x' microseconds is inefficient because there is no way to precisely time the wakeup. Finally, boost::this_thread::yield() does not seem to do anything. Probably because I only have 2 active threads on a

What is the fastest way to send data from one thread to another in C++?

蹲街弑〆低调 提交于 2019-12-04 06:43:48
I have tried an experiment where I built a simple Producer/Consumer program. They run in separate threads. The producer generates some data and the consumer picks it up in another thread. The messaging latency I achieved is approximately 100 nano seconds. Can anybody tell me if this is reasonable or are there significantly faster implementations out there? I'm not using locks ... just simple memory counters. My experiment is described here: http://tradexoft.wordpress.com/2012/10/22/how-to-move-data-between-threads-in-100-nanoseconds/ Basically the consumer waits on a counter to be incremented

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

喜欢而已 提交于 2019-12-03 12:39:01
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 the pause from 1 nanosecond to 5 seconds and proceed to measure the latency as usual. I do that 15

should I “bind” “spinning” thread to the certain core?

跟風遠走 提交于 2019-12-03 09:34:56
问题 My application contains several latency-critical threads that "spin", i.e. never blocks. Such thread expected to take 100% of one CPU core. However it seems modern operation systems often transfer threads from one core to another. So, for example, with this Windows code: void Processor::ConnectionThread() { while (work) { Iterate(); } } I do not see "100% occupied" core in Task manager, overall system load is 36-40%. But if I change it to this: void Processor::ConnectionThread() {

High audio latency with Icecast and Darkice

☆樱花仙子☆ 提交于 2019-12-03 06:13:09
I have successfully installed icecast and darkice on my ubuntu machine and was able to stream live on my lan. but to my disappointment it has a 15sec to 20sec delay.This is very poor performance. I don't think it is because of my lan connection because even when i tried to listen in that same ubuntu machine there was still a delay! I have tried to configure icecast to have no burst-size which means there will be no buffering,this helped me reduce the delay to around 6sec to 8sec. So please if you have any suggestions or very good configuration values it would be of great help to me. P.S the

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

假装没事ソ 提交于 2019-12-03 06:09:43
问题 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 an use case where you shouldn't enable this features? Are there any performance impacts when using this features? I can only see that these settings help a lot when i need to reduce my query count which is necessary especially in a cloud environment

should I “bind” “spinning” thread to the certain core?

这一生的挚爱 提交于 2019-12-03 01:05:22
My application contains several latency-critical threads that "spin", i.e. never blocks. Such thread expected to take 100% of one CPU core. However it seems modern operation systems often transfer threads from one core to another. So, for example, with this Windows code: void Processor::ConnectionThread() { while (work) { Iterate(); } } I do not see "100% occupied" core in Task manager, overall system load is 36-40%. But if I change it to this: void Processor::ConnectionThread() { SetThreadAffinityMask(GetCurrentThread(), 2); while (work) { Iterate(); } } Then I do see that one of the CPU

Low latency programming

依然范特西╮ 提交于 2019-12-03 00:02:49
问题 I've been reading a lot about low latency financial systems (especially since the famous case of corporate espionage) and the idea of low latency systems has been in my mind ever since. There are a million applications that can use what these guys are doing, so I would like to learn more about the topic. The thing is I cannot find anything valuable about the topic. Can anybody recommend books, sites, examples on low latency systems? 回答1: I work for a financial company that produces low