Skip to main content

Low latency, high throughput RMI, Any suggestions welcome.

2 replies [Last post]
peter__lawrey
Offline
Joined: 2005-11-01
Points: 0

I am working on a module which is designed to support low latency synchronous RMI and high throughput asynchronous RMI.
It uses TCP, NIO, custom serialization, custom RMI, Java 5 concurrency thread pools.
Its current latency is 5 to 15 micro-seconds slower than ping times (depending on the arguments/return values). For throughput, it gets 80K-140K calls per second on a single channel.
I have looked at JGroups and Stream.
I was wondering if any one has tried this sort of thing, what suggestions you might have and what open source libraries I might use for compassion.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
ted_graham
Offline
Joined: 2007-11-14
Points: 0

In my experience, being only 10 micros slower than ping is pretty good. Ping messages are ICMP traffic and are likely being answered closer to the network card than your application.

Try using Wireshark/tcpdump to capture your network traffic, you can tell how much time the incoming packet is spending on the server computer.

You mentioned thread pools; handing a message off to a different thread could easily add 5 micros.

peter__lawrey
Offline
Joined: 2005-11-01
Points: 0

I found handing the message off to another thread at each end adds 30 microseconds to the 90%tile times. However, I have two modes, synchronous calls for lowest latency (which has only the calling thread on the client and background threads which watch connections to see if they need a heartbeat or timeout etc) and asynchronous for throughput. (which use a background thread to batch and send the requests/responses)

The synch calls get a 90%tile latency of <40 microseconds on loopback and 90%tile throughput of 260K/s for simple calls.
.
.