Search code examples
javachroniclewarm-upchronicle-queue

Warming up Chronicle


I am using the Indexed Chronicle queue (version 3.4.3) in a latency sensitive application. To smooth out the latency spikes, I have a blocking queue, in front of the chronicle, where producers drop the messages. A background thread then polls the queue and writes data to Chronicle.

I want to know if there are any techniques to warm up chronicle? I warm up the blocking queue by enqueuing/dequeuing a set number of messages. Should I write those messages to the chronicle and clean it to warm it up?

Thank you


Solution

  • Seek and you shall find! ChronicleTools has a warmup() method.

    https://github.com/OpenHFT/Java-Chronicle/blob/master/chronicle/src/main/java/net/openhft/chronicle/tools/ChronicleTools.java