Optimize SQLite and PrefixHandler for better performance
- Increase PrefixHandler queue size to 500k and batch size to 25k - Set SQLite PRAGMA synchronous=OFF for faster writes (trades durability) - Increase SQLite cache to 1GB and mmap to 512MB - Increase WAL checkpoint interval to 10000 pages - Set page size to 8KB for better performance - Increase busy timeout to 30 seconds - Keep single connection to avoid SQLite locking issues
This commit is contained in:
@@ -14,10 +14,10 @@ import (
|
||||
|
||||
const (
|
||||
// prefixHandlerQueueSize is the queue capacity for prefix tracking operations
|
||||
prefixHandlerQueueSize = 200000
|
||||
prefixHandlerQueueSize = 500000
|
||||
|
||||
// prefixBatchSize is the number of prefix updates to batch together
|
||||
prefixBatchSize = 10000
|
||||
prefixBatchSize = 25000
|
||||
|
||||
// prefixBatchTimeout is the maximum time to wait before flushing a batch
|
||||
prefixBatchTimeout = 2 * time.Second
|
||||
|
||||
Reference in New Issue
Block a user