|
|
|
Back to newsletter 160 contents
The low latency space is an interesting one for we performance people. Until the last few years, low latency tips were practices that people had found worked - I won't call them "best" practices because often they aren't. But generally the advice centered around: minimizing copies, e.g. passing buffers through the system without copying them, just operating on the same buffers; avoiding and reusing objects; minimizing or even better avoiding GCs; keeping code paths as simple as possible; ruthlessly removing any features you don't need; keeping things as close to together physically as possible. There are others, but the basic paradigm is that the lower the latency you need, the less you can code in a normal style, the more you have to be ruthlessly strict in what you allow into the implementation. And controlling what causes GC is massively important.
In the last few years, things have noticeably improved in the low latency space because of efforts to make available open source implementations of low latency tools. Previously, there were vendors of frameworks and tools in the low latency space, and there were a few open source collection implementations that minimized object creation and avoided unnecessary overheads: the trove open address maps are an excellent example, but there are others.
So what have we had added to our toolset in the last few years? Several people and organisations dedicated to making available low latency open source tools that are much more extensive than we've seen before. Among these several stand out in popularising low latency tools: The LMAX Disruptor, which continues to be maintained by Mike Barber, one of it's authors; another of it's authors, Martin Thompson, is working on an open source highly efficient marshalling implementation, Simple Binary Encoding (see Todd Montgomery's presentation in the articles listed below); and Peter Lawrey's OpenHFT set of open source low latency tools (see the tools section below), one of which, the SharedHashMap, I cover with him in detail this month at fasterj.com
I look forward to this space of open source low latency targeted tools expanding even further in the coming years. Now on to yet more links to Java performance tools, news, articles and, as ever, all the extracted tips from all of this month's referenced articles.
Java performance tuning related news.
Java performance tuning related tools.
Back to newsletter 160 contents