Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We are trying to improve the average latency of Java proxy application.
The Java application receives a message from a client and proxies it to a necessary server.
The protocol is binary, asynchronous.

The topology is:

Client (1) - Java proxy (2) - Server (3)

Call flow is

(1)-(2)-(3)-(2)-(1)

The requirement is 2 ms average latency overhead for one direction hop for Java proxy.

We've noticed that if we increase the number of clients, latency overhead is decreased linearly.
Let's say,

1 client -> Java proxy latency overhead = 6 ms.
2 clients -> Java proxy latency overhead = 3 ms.
4 clients -> Java proxy latency overhead = 1.5 ms.

On the other hand we must comply with latency requirement even with one client.

The same behavior we observer, if we replace Java implementation of proxy with Erlang implementation.

Can we do anything for low level OS tuning?
Java proxy host is 2 Nehalem CPU X5550 2.67GHz, 16 hw threads in total; Red Hat Enterprise Linux Server release 5.6

share|improve this question

migrated from stackoverflow.com Oct 3 '11 at 11:47

This question came from our site for professional and enthusiast programmers.

    
What figures were you getting for the Erlang implementation of the proxy? –  rvirding Oct 3 '11 at 18:05

2 Answers 2

Before you perform your testing, I would make sure the JVM is warmed up and set to a real time priority. You should be able to achieve a latency below 0.1 ms over and above the network latency.

share|improve this answer

Is your Java proxy blocking while it waits for the Server's response? That would explain the times you are seeing.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.