Chronicle Network Layer

60% faster TCP/IP within Java

One of the major drivers at Chronicle Software is the constant push to remove latency from technology stack , this involves constant analysis and work on all aspects that can add latency. One area we have recently been concentrating on is optimizing the Chronicle network latency that underpins Chronicle Queue open source and also our Enterprise suite of products and this work has achieved over a 60% improvement over standard Java TCP/IP network library.

The Chronicle Native Network Library provides a highly scalable Java low-latency socket i/o framework for Linux environments. The core functionality is implemented in C++ and exposed via JNI for Java applications.

Benchmark Tests
Tests were run on a pair of 2 x 12 core E5-2650 v4 @ 2.20GHz hosts, each with a Solarflare SFC9250 NIC, and with client and server threads pinned to isolated cores (isolcpu). Tests were run with and without Onload, for equivalent client/server configurations using Chronicle Native Network Library, and Chronicle Network. Note that the tests include 4 TCP stack transits in each round trip.
Results for 5 concurrent clients, each sending 256 byte messages are shown below. The line plots include results for 5 separate runs, with each client sending 1k, 10k, 25k, 50k, and 100k msgs/s per run.

Results with Onload Enabled
The results below show the round-trip latencies with the tests run with Onload enabled. The line plots show summary round trip times for a range of msgs/s at given percentiles.

Results with Onload Disabled
The following set of plots show results for the same test, this time with Onload disabled to show representative performance for standard NICs.

Results Summary

The above plots demonstrate the level of performance delta which can be achieved with the Chronicle Native Network Library when compared against Chronicle Network (which in turn provides much improved performance compared with standard Java I/O).

The key advantages of the Chronicle Native Network Library are:

• Improved (lower) latencies at all percentiles
• Significantly reduced jitter, and well-controlled outliers
• Significantly reduced sensitivity to load – note the line plots showing similar performance across the full range from 1,000 to 100,000 msgs/s per client (equating to total load across all clients ranging from 5,000 msgs/s to 500,000 msgs/s).

The results when the tests are run with Onload underline the kind of performance which can be achieved with the Chronicle Native Network Library, benefitting network applications where it is important to achieve the lowest latencies.
For the results run without Onload, the percentage improvement at low percentiles is smaller since the round-trip time is dominated by the large, fixed overhead of the network layer. However, in this case the benefits of both significantly reduced jitter, and significantly reduced sensitivity to load are still very apparent.

Want access to exclusive Chronicle content?

The Chronicle Community is now live, hit the button below and join the community, for free! You'll get exclusive access to blogs, guides and video content. Join today!

Want more from Chronicle? Subscribe today!

Something went wrong. Please check your entries and try again.