Skip to content

Commit 2387b87

Browse files
remove batchSize from performance.md recommendations (#34)
1 parent 6f36baa commit 2387b87

File tree

1 file changed

+7
-24
lines changed

1 file changed

+7
-24
lines changed

src/advanced/performance.md

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,30 @@
11
# Performance Tricks
22

3-
43
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.
54

6-
75
## Increase Sync Speed
86

9-
* Set `--sync.loop.block.limit=10_000` and `--batchSize=2g` to speed up the synchronization process.
10-
```bash
11-
--sync.loop.block.limit=10_000 --batchSize=2g
12-
```
137
* Increase download speed with flag ```--torrent.download.rate=[value]``` setting your max speed (default value is 128MB). For example:
148
```bash
159
--torrent.download.rate=512mb
1610
```
1711

18-
## Optimize for Cloud Drives
19-
20-
* Set `SNAPSHOT_MADV_RND=false` to enable the operating system's cache prefetching for better performance on cloud drives with good throughput but bad latency.
21-
```bash
22-
SNAPSHOT_MADV_RND=false
23-
```
24-
2512
## Lock Latest State in RAM
2613

27-
* Use `vmtouch -vdlw /mnt/erigon/snapshots/domain/*bt` to lock the latest state in RAM, preventing it from being evicted due to high historical RPC traffic.
14+
* Use `vmtouch -vdlw /mnt/erigon/snapshots/domain/*bt` to lock the "latest state indices" in RAM, preventing it from being evicted due to high historical RPC traffic.
2815
```bash
2916
vmtouch -vdlw /mnt/erigon/snapshots/domain/*bt
3017
```
3118

32-
* Run `ls /mnt/erigon/snapshots/domain/*.kv | parallel vmtouch -vdlw` to apply the same locking to all relevant files.
33-
34-
## Handle Memory Allocation Issues
35-
36-
* If you encounter issues with memory allocation, run the following to flush any pending write operations and free up memory:
19+
* Or same for "whole latest sate": `ls /mnt/erigon/snapshots/domain/*.kv | parallel vmtouch -vdlw`
20+
* If you encounter "cannot allocate memory" issues with above commands, then free memory by next command and re-try:
3721
```bash
38-
sync && sudo sysctl vm.drop_caches=3
22+
sync && sudo sysctl vm.drop_caches=3 && echo 1 > /proc/sys/vm/compact_memory
3923
```
4024

41-
* Alternatively, set:
25+
## Optimize for Cloud Drives
4226

27+
* Cloud Drives (gp3, pd-ssd) have good throughput but bad latency. So, we don't recommend them to Erigon. But still can set `SNAPSHOT_MADV_RND=false` to enable the operating system's cache prefetching - but it will lead to huge IO if RAM is small.
4328
```bash
44-
echo 1 > /proc/sys/vm/compact_memory
29+
SNAPSHOT_MADV_RND=false
4530
```
46-
47-
to help with memory allocation.

0 commit comments

Comments
 (0)