In this article we will present the latency and throughput numbers of CoralSequencer. In doing that we compute the time it takes for a node to publish a message in the queue and receive the response in the message bus, in other words, we are measuring network round-trip times. There are two independent JVMs: one running the queue and one running the benchmark node. The node sends the message to the queue, the queue picks up the message and sends a response to the bus so that the node can get it. CoralSequencer comes with a
BenchmarkNode implementation that you can use to measure the throughput and latency in your own environment.
The machine used for the benchmarks below was an Intel i7 quad-core (4 x 3.50GHz) Ubuntu box overclocked to 4.50Ghz.
NOTE: Everyone’s network environment is different, and we usually have a hard time comparing over-the-wire benchmark numbers. To make this simple we present loopback numbers (i.e. client and server running on the same physical machine but different JVMs) which are easy to compare and weed out external factors, isolating the performance of the application + network code. To calculate total numbers you should add your typical over-the-wire network latency. A 256-byte packet traveling through a 10 Gigabits ethernet will take at least 382 nanoseconds to go from NIC to NIC (ignoring the switch hop). If your ethernet is 1 Gigabits then the latency is at least 3.82 micros on top of CoralSequencer numbers. Another factor is the network card latency. Going from JVM to kernel to NIC can be costly and some good network cards optimize that by offering kernel bypass (i.e. Open OnLoad from SolarFlare).
Message Size: 256 bytes Messages: 1,000,000 Avg Time: 5.627 micros Min Time: 4.854 micros Max Time: 78.16 micros 75% = [avg: 5.529 micros, max: 5.844 micros] 90% = [avg: 5.585 micros, max: 5.892 micros] 99% = [avg: 5.615 micros, max: 6.028 micros] 99.9% = [avg: 5.621 micros, max: 7.871 micros] 99.99% = [avg: 5.625 micros, max: 15.89 micros] 99.999% = [avg: 5.626 micros, max: 34.535 micros]
Message Size: 256 bytes Messages Sent: 1,000,000 Avg Latency: 5.292 micros Messages per second: 188,958
NOTE: A much higher throughput can be achieved by using message batching, in other words, by sending more than one message inside the same UDP packet. The throughput numbers above were taken considering one message per packet only.
CoralSequencer can sustain a throughput of 188k messages (256 bytes) per second and latencies close to 5.6 micros per message (256 bytes). All these times are round-trip times, in other words, the time it takes for a node to send a message and receive a response back in the message bus.