latency

Latencies issues which G1GC

帅比萌擦擦* 提交于 2019-12-03 23:28:51
I am facing a continues increase in GC pauses with G1GC algorithm. The service latencies continue to grow over time. Once this happens, i restart my service and the latencies go back to normal. Post startup, the latencies again continue to increase over time. At the time of startup, the service latencies are around ~200ms, but within 24 hours, they go up to 350ms, and continue to increase in a linear fashion. The increase in service latencies match the increase in GarbageCollection metrics. Service specifications I am running a java application (JDK-8) on M4-2X Large EC2 boxes with 50 active

kAudioDevicePropertyBufferFrameSize replacement for iOS

Deadly 提交于 2019-12-03 22:22:34
I was trying to set up an audio unit to render the music (instead of Audio Queue.. which was too opaque for my purposes).. iOS doesn't have this property kAudioDevicePropertyBufferFrameSize .. any idea how I can derive this value to set up the buffer size of my IO unit? I found this post interesting.. it asks about the possibility of using a combination of kAudioSessionProperty_CurrentHardwareIOBufferDuration and kAudioSessionProperty_CurrentHardwareOutputLatency audio session properties to determine that value.. but there is no answer.. any ideas? You can use the kAudioSessionProperty

(How) Can I reduce socket latency?

强颜欢笑 提交于 2019-12-03 22:01:49
I have written an HTTP proxy that does some stuff that's not relevant here, but it is increasing the client's time-to-serve by a huge amount (600us without proxy vs 60000us with it). I think I have found where the bulk of that time is coming from - between my proxy finishing sending back to the client and the client finishing receiving it. For now, server, proxy and client are running on the same host, using localhost as the addresses. Once the proxy has finished sending (once it has returned from send() at least), I print the result of gettimeofday which gives an absolute time. When my client

Howto take latency differences into consideration when verifying location differences with timestamps (anti-cheating)?

青春壹個敷衍的年華 提交于 2019-12-03 16:26:37
When you have a multiplayer game where the server is receiving movement (location) information from the client, you want to verify this information as an anti-cheating measure. This can be done like this: maxPlayerSpeed = 300; // = 300 pixels every 1 second if ((1000 / (getTime() - oldTimestamp) * (newPosX - oldPosX)) > maxPlayerSpeed) { disconnect(player); //this is illegal! } This is a simple example, only taking the X coords into consideration. The problem here is that the oldTimestamp is stored as soon as the last location update was received by the server. This means that if there was a

Force android to send UDP packets immediately?

时光毁灭记忆、已成空白 提交于 2019-12-03 14:01:59
I am experimenting with connecting my Galaxy Ace to my laptop via WiFi. Both devices are connected to a router via WiFi, and both sides use Java. After a TCP connection gave me very high pings from time to time, I decided to base the connection on UDP, to be able to control when the packets are actually sent. However, it seems like Android still buffers UDP packets and does not send them immediately. This, or it shuts down WiFi completely, if there is no outgoing data transmitted for some fraction of a second. First, I pinged the phone at irregular intervals of about once a second, repeatedly

How to use Android audio with low latency

。_饼干妹妹 提交于 2019-12-03 08:19:41
Problem: As you might have heard, Android does not provide with low latency audio API. What I mean by low latency audio is that you should be able to get audio signals from microphone and play the sound without much time gap in-between (e.g., 5-7 ms) I've tried old java (with AudioRecord and AudioTrack) and "new" OpenSL ES. They are terrible and make app unusable. The issue was well documented here. BTW, iOS API can produce about 5-7 ms latency. Looking for Workarounds: But I am trying to do the low latency audio anyway. Something like this answer describes. "However, I was only able to

Networking problems in games

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 07:40:15
I am looking for networking designs and tricks specific to games. I know about a few problems and I have some partial solutions to some of them but there can be problems I can't see yet. I think there is no definite answer to this but I will accept an answer I really like. I can think of 4 categories of problems. Bad network The messages sent by the clients take some time to reach the server. The server can't just process them FCFS because that is unfair against players with higher latency. A partial solution for this would be timestamps on the messages but you need 2 things for that: Be able

What does “connecting” mean in Chrome Developer Tools in the Network Tab, and why does it show up only for some sites?

痴心易碎 提交于 2019-12-03 07:01:53
I've been trying to look for an explanation online but I can't seem to find one. If you go to a site like youtube.com on Chrome and hover over the blue bar corresponding to the file name "http://www.youtube.com/", you'll see four different things: -Blocking -Sending -Waiting -Receiving While viewing a different site's page in the network tab, I see -DNS Lookup -Connecting -Sending -Waiting -Receiving It takes a long time to do all these things, even though the page is so simple. What makes my server display different statistical keys for a page load, and what can I do to optimize? In general,

Techniques to Reduce CPU to GPU Data Transfer Latency

一笑奈何 提交于 2019-12-03 04:27:26
问题 I've been looking into ways to reduce the latency caused by transferring data back and forth from the CPU and GPU. When I first started using CUDA I did notice that data transfer between the CPU and GPU did take a few seconds, but I didn't really care because this isn't really a concern for the small programs I'm been writing. In fact, the latency probably isn't much of a problem for vast majority of the programs that utilize GPUs, video games included, because they're still a lot faster than

Java BlockingQueue latency high on Linux

若如初见. 提交于 2019-12-03 04:15:33
问题 I am using BlockingQueue:s (trying both ArrayBlockingQueue and LinkedBlockingQueue) to pass objects between different threads in an application I’m currently working on. Performance and latency is relatively important in this application, so I was curious how much time it takes to pass objects between two threads using a BlockingQueue. In order to measure this, I wrote a simple program with two threads (one consumer and one producer), where I let the producer pass a timestamp (taken using