From 3a4101bbf961ccf7cc1b144b673b29ccdd3464e7 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Mon, 17 Dec 2018 19:07:55 +0100 Subject: [PATCH] increase the buffer between ingestion and insertion thread I was finally able to show that there is a tiny but measureable effect of this buffer. I think it was not visible before, because the parsing was too slow. But now, that I replaced the date parser, the ingestion thread is twice as fast as the insertion thread. Therefore the buffer makes more sense. --- pdb-ui/src/main/java/org/lucares/pdbui/TcpIngestor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdb-ui/src/main/java/org/lucares/pdbui/TcpIngestor.java b/pdb-ui/src/main/java/org/lucares/pdbui/TcpIngestor.java index 082e2c1..e14d99a 100644 --- a/pdb-ui/src/main/java/org/lucares/pdbui/TcpIngestor.java +++ b/pdb-ui/src/main/java/org/lucares/pdbui/TcpIngestor.java @@ -121,7 +121,7 @@ public class TcpIngestor implements Ingestor, AutoCloseable, DisposableBean { @Override public void start() throws Exception { - final ArrayBlockingQueue queue = new ArrayBlockingQueue<>(100); + final ArrayBlockingQueue queue = new ArrayBlockingQueue<>(10_000); serverThreadPool.submit(() -> { Thread.currentThread().setName("db-ingestion");