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:
parent
155c08d735
commit
3f06955214
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user