From 8b43882526c2ba3841474061aa8b91b288df4bcf Mon Sep 17 00:00:00 2001 From: sneak Date: Mon, 28 Jul 2025 02:11:05 +0200 Subject: [PATCH] Increase batch sizes to 10000 and queue sizes to 200000, reduce timeout to 2s --- internal/routewatch/dbhandler.go | 6 +++--- internal/routewatch/peerhandler.go | 6 +++--- internal/routewatch/prefixhandler.go | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/internal/routewatch/dbhandler.go b/internal/routewatch/dbhandler.go index 6d705b3..611b1f5 100644 --- a/internal/routewatch/dbhandler.go +++ b/internal/routewatch/dbhandler.go @@ -11,13 +11,13 @@ import ( const ( // dbHandlerQueueSize is the queue capacity for database operations - dbHandlerQueueSize = 50000 + dbHandlerQueueSize = 200000 // batchSize is the number of operations to batch together - batchSize = 32000 + batchSize = 10000 // batchTimeout is the maximum time to wait before flushing a batch - batchTimeout = 5 * time.Second + batchTimeout = 2 * time.Second ) // DBHandler handles BGP messages and stores them in the database using batched operations diff --git a/internal/routewatch/peerhandler.go b/internal/routewatch/peerhandler.go index 3c149ef..9f6d8ec 100644 --- a/internal/routewatch/peerhandler.go +++ b/internal/routewatch/peerhandler.go @@ -12,13 +12,13 @@ import ( const ( // peerHandlerQueueSize is the queue capacity for peer tracking operations - peerHandlerQueueSize = 50000 + peerHandlerQueueSize = 200000 // peerBatchSize is the number of peer updates to batch together - peerBatchSize = 500 + peerBatchSize = 10000 // peerBatchTimeout is the maximum time to wait before flushing a batch - peerBatchTimeout = 5 * time.Second + peerBatchTimeout = 2 * time.Second ) // PeerHandler tracks BGP peers from all message types using batched operations diff --git a/internal/routewatch/prefixhandler.go b/internal/routewatch/prefixhandler.go index 79917b5..f6ca240 100644 --- a/internal/routewatch/prefixhandler.go +++ b/internal/routewatch/prefixhandler.go @@ -14,13 +14,13 @@ import ( const ( // prefixHandlerQueueSize is the queue capacity for prefix tracking operations - prefixHandlerQueueSize = 50000 + prefixHandlerQueueSize = 200000 // prefixBatchSize is the number of prefix updates to batch together - prefixBatchSize = 2000 + prefixBatchSize = 10000 // prefixBatchTimeout is the maximum time to wait before flushing a batch - prefixBatchTimeout = 5 * time.Second + prefixBatchTimeout = 2 * time.Second // IP version constants ipv4Version = 4