Performance Tricks
Optimizing Erigon Performance: Sync Speed, Cloud Drives, and Memory Tuning
These instructions are designed to improve the performance of Erigon 3, particularly for synchronization and memory management, on cloud drives and other systems with specific performance characteristics.
Increase Sync Speed
Set
--sync.loop.block.limit=10_000and--batchSize=2gto speed up the synchronization process.
--sync.loop.block.limit=10_000 --batchSize=2gIncrease download speed with flag
--torrent.download.rate=[value]setting your max speed (default value is 128MB). For example:
--torrent.download.rate=512mbOptimize for Cloud Drives
Set
SNAPSHOT_MADV_RND=falseto enable the operating system's cache prefetching for better performance on cloud drives with good throughput but bad latency.
SNAPSHOT_MADV_RND=falseLock Latest State in RAM
Use
vmtouch -vdlw /mnt/erigon/snapshots/domain/*btto lock the latest state in RAM, preventing it from being evicted due to high historical RPC traffic.
vmtouch -vdlw /mnt/erigon/snapshots/domain/*btRun
ls /mnt/erigon/snapshots/domain/*.kv | parallel vmtouch -vdlwto apply the same locking to all relevant files.
Handle Memory Allocation Issues
If you encounter issues with memory allocation, run the following to flush any pending write operations and free up memory:
sync && sudo sysctl vm.drop_caches=3Alternatively, set:
echo 1 > /proc/sys/vm/compact_memoryto help with memory allocation.
Last updated
Was this helpful?