Increase batch sizes and timeouts for better throughput

- Increase batch size from 100/50 to 500 for both handlers
- Increase batch timeout from 100-200ms to 5 seconds
- This will reduce database write frequency and improve throughput
  for high-volume BGP update streams
This commit is contained in:
Jeffrey Paul 2025-07-28 01:03:09 +02:00
parent 155c08d735
commit 3f06955214
2 changed files with 4 additions and 4 deletions

View File

@ -14,10 +14,10 @@ const (
batchedDatabaseHandlerQueueSize = 1000
// batchSize is the number of operations to batch together
batchSize = 100
batchSize = 500
// batchTimeout is the maximum time to wait before flushing a batch
batchTimeout = 100 * time.Millisecond
batchTimeout = 5 * time.Second
)
// BatchedDatabaseHandler handles BGP messages and stores them in the database using batched operations

View File

@ -15,10 +15,10 @@ const (
batchedPeerHandlerQueueSize = 2000
// peerBatchSize is the number of peer updates to batch together
peerBatchSize = 50
peerBatchSize = 500
// peerBatchTimeout is the maximum time to wait before flushing a batch
peerBatchTimeout = 200 * time.Millisecond
peerBatchTimeout = 5 * time.Second
)
// BatchedPeerHandler tracks BGP peers from all message types using batched operations