Skip to content

Commit

Permalink
Update README.md (erigontech#10282)
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov authored May 13, 2024
1 parent 1a6bb6e commit ed72097
Showing 1 changed file with 31 additions and 8 deletions.
39 changes: 31 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -329,7 +329,8 @@ Engine API.

#### Caplin's Usage.

Caplin is be enabled by default. to disable it and enable the Engine API, use the `--externalcl` flag. from that point on, an external Consensus Layer will not be need
Caplin is be enabled by default. to disable it and enable the Engine API, use the `--externalcl` flag. from that point
on, an external Consensus Layer will not be need
anymore.

Caplin also has an archivial mode for historical states and blocks. it can be enabled through the `--caplin.archive`
@@ -602,7 +603,6 @@ In order to configure the ports, use:
|-----------|------|----------|---------|---------------|
| REST | 5555 | TCP | REST | Public |


#### `shared` ports

| Component | Port | Protocol | Purpose | Should Expose |
@@ -786,12 +786,14 @@ Supported networks: all (except Mumbai).
stage_trace_index
- E3 can execute 1 historical transaction - without executing it's block - because history/indices have
transaction-granularity, instead of block-granularity.
- Doesn't store Receipts/Logs - it always re-executing historical transactions - but re-execution is cheaper (see point
above). We would like to see how it will impact users - welcome feedback. Likely we will try add some small LRU-cache
- E3 doesn't store Logs (aka Receipts) - it always re-executing historical txn (but it's cheaper then in E2 - see point
above). Also Logs LRU added in E2 (release/2.60) and E3: https://github.com/ledgerwatch/erigon/pull/10112
here. Likely later we will add optional flag "to persist receipts".
- More cold-start-friendly and os-pre-fetch-friendly.
- datadir/chaindata is small now - to prevent it's grow: we recommend set --batchSize <= 1G. Probably 512mb is
enough.
- `--sync.loop.block.limit` is enabled by default. (Default: `2_000`.
Set `--sync.loop.block.limit=10_000_000 --batchSize=1g` to increase sync speed on good hardware).
- datadir/chaindata is small now - to prevent it's grow: we recommend set `--batchSize <= 1G`. And it's fine
to `rm -rf chaindata`
- can symlink/mount latest state to fast drive and history to cheap drive

### E3 datadir structure

@@ -808,7 +810,7 @@ datadir
# There is 4 domains: account, storage, code, commitment
```

### E3 can store state on fast disk and history on slow disk
### E3 can store state on fast disk and history on cheap disk

If you can afford store datadir on 1 nvme-raid - great. If can't - it's possible to store history on cheap drive.

@@ -865,3 +867,24 @@ du -hsc /erigon/snapshots/*
1.3T /erigon/snapshots/idx
3.7T total
```

### E3 other perf trics

- `--sync.loop.block.limit=10_000_000 --batchSize=1g` - likely will help for sync speed.
- on cloud-drives (good throughput, bad latency) - can enable OS's brain to pre-fetch some data (`madv_normal` instead
of `madv_random`). For `snapshots/domain` folder (latest
state) `KV_MADV_NORMAL_NO_LAST_LVL=accounts,storage,commitment` (or if have enough
RAM: `KV_MADV_NORMAL=accounts,storage,commitment`). For `chaindata` folder (latest updates) `MDBX_READAHEAD=true`.
For all files - `SNAPSHOT_MADV_RND=false`

- can lock latest state in RAM - to prevent from eviction (node may face high historical RPC traffic without impacting
Chain-Tip perf):

```
vmtouch -vdlw /mnt/erigon/snapshots/domain/*bt
ls /mnt/erigon/snapshots/domain/*.kv | parallel vmtouch -vdlw
# if it failing with "can't allocate memory", try:
sync && sudo sysctl vm.drop_caches=3
echo 1 > /proc/sys/vm/compact_memory
```

0 comments on commit ed72097

Please sign in to comment.