Home » Archives for Daniel Shaya

Author Archives: Daniel Shaya

Daniel has been programming in Java since it was in beta. Working predominantly in the finance industry he has created real time trading and margin risk applications. He is currently a director at OpenHFT where we are building next generation Java low latency products.

Allocation free logging with log4j2

Introduction Recently I was working for a client trying to remove some GC pauses for a large well crafted Java system. After profiling I realised that most of the garbage was being produced by logging!! Was there a simple unobtrusive way to remove all that allocation?  Turns out there was :) Which framework should I use for GC free logging? ...

Read More »

JLBH Examples 4 – Benchmarking QuickFix vs ChronicleFix

In this post: Using JLBH to test QuickFIX Observing how QuickFix latencies degrade through the percentiles Comparing QuickFIX with Chronicle FIX As mentioned in the Introduction to JLBH the primary reason JLBH was created was to measure the Chronicle-FIX engine. We use all the features of JLBH, particularly the throughput lever and the accounting for coordinated omission to get some ...

Read More »

JLBH Examples 3 – The Affects of Throughput on Latency

In this post: A discussion about the effects of thoughput on latency How use JLBH to measure TCP loopback Adding probes to test both halves of the TCP round trip Watching the effect of increasing throughput on latency Understanding that you have to drop throughput to achieve good latencies at high percentiles. In the post we saw the effects of accounting ...

Read More »

JLBH Examples 2 – Accounting for Coordinated Omission

In this post: Running JLBH with and without accounting for coordinated omission An example to in numbers the effects of coordinated omission A discussion about flow control             This is the example I used when describing what it would be like if you measured without accounting for coordinated omission: Let’s imagine you are waiting for ...

Read More »

JLBH Examples 1 – Why Code Should be Benchmarked in Context

In this post: A side by side example using JMH and JLBH for Date serialisation Measuring Date serialisation in a microbenchmark Measuring Date serialisation as part of a proper application How to add a probe to your JLBH benchmark Understanding the importance of measuring code in context       In the last post, ‘Introducing JLBH‘ we introduced JLBH the latency ...

Read More »

JLBH – Introducing Java Latency Benchmarking Harness

In this Post: What is JLBH Why did we write JLBH Differences between JMH and JLBH Quick start guide       What is JLBH? JLBH is a tool that can be used to measure latency in Java programs. It has these features: Aimed at running code that would be larger than a micro benchmark. Suitable for programs that use ...

Read More »

Learn about JDK9 Compact Strings (Video review Charlie Hunt)

JDK 9 introduces a new feature called Compact Strings.  Given the ubiquity of Strings in Java programs I feel that this is a really important change that needs to be understood by all Java developers. In this video Charlie Hunt explains the history and implementation of this new feature.  The video is not actually about Compact Strings. Compact Strings are ...

Read More »

Writing 2 Characters into a Single Java char

Here’s another nice trick we used when creating the ultra low latency Chronicle FIX-Engine. When it comes to reading data off a stream of bytes it’s way more efficient, if possible, to store data in a char rather than having to read it into a String.  (At the very least you are avoiding creating a String object, although this can ...

Read More »