Search code examples
javachroniclechronicle-queue

Chronicle Queue: blockSize, index count and size guidance


The ChronicleQueueBuilder interface (4.5) allows parameterisation of the queue file characteristics. By default I get 80mb files for daily rollover.

  • Is there any guidance how one should use these values?
  • What are the trade-offs? Can I optimize it to let an appender seek to an index quickly?
  • If I know my average excerpt size and the average number of excerpts per period, can I choose these values to avoid resizing of the queue file during the day?

Solution

  • Unless you have a reason to change it I would leave it as it is. If you make the chunk size smaller it might use less space on windows though on linux it uses sparse files so it won't make a difference.

    You could increase the chunk size to 1 GB or more however if you are concerned about the cost of resizing I suggest calling the pretoucher() in another thread periodically to ensure there is always headroom.