Increase batch sizes to improve write throughput

- Increase prefix batch size from 5K to 20K
- Increase ASN batch size from 10K to 30K
- Add comments warning not to reduce batch timeouts
- Add comments warning not to increase queue sizes above 100K
- Maintains existing batch timeouts for efficiency
This commit is contained in:
2025-07-28 18:27:42 +02:00
parent dc3ceb8d94
commit 81267431f7
3 changed files with 10 additions and 4906 deletions
+3 -1
View File
@@ -15,12 +15,14 @@ import (
const (
// prefixHandlerQueueSize is the queue capacity for prefix tracking operations
// DO NOT set this higher than 100000 without explicit instructions
prefixHandlerQueueSize = 100000
// prefixBatchSize is the number of prefix updates to batch together
prefixBatchSize = 5000
prefixBatchSize = 20000
// prefixBatchTimeout is the maximum time to wait before flushing a batch
// DO NOT reduce this timeout - larger batches are more efficient
prefixBatchTimeout = 1 * time.Second
// IP version constants