Replies: 4 comments
-
Benchmark result:
|
Beta Was this translation helpful? Give feedback.
-
BTW, sync with local blocks from height 7920001 to 7923597 takes 2minutes with memiavl, 7minutes with iavl. So it's like 3times end-to-end performance improvements, there could be more improvements after optimizations on cache store. EDIT: with async wal writing, the block replay time is further reduced from 2m to 1m10s. |
Beta Was this translation helpful? Give feedback.
-
More performance data collected from local runs on my laptop against mainnet snapshot.
The data seems suggest that it's fine to set snapshot interval to thousands of blocks, without slowdown startup too much, or increase too much memory usage. For different chains, it depends on the traffic on the chain. The golang program for this: package main
import (
"fmt"
"github.com/crypto-org-chain/cronos/memiavl"
)
func main() {
db, err := memiavl.Load("/path/to/.cronos/data/memiavl.db", memiavl.Options{})
if err != nil {
panic(err)
}
fmt.Println("loaded", db.Version())
if err := db.RewriteSnapshot(); err != nil {
panic(err)
}
if err := db.Reload(); err != nil {
panic(err)
}
fmt.Println("rewrited", db.Version())
} |
Beta Was this translation helpful? Give feedback.
-
https://github.com/crypto-org-chain/cronos/wiki/MemIAVL-Benchmark recent benchmarks. |
Beta Was this translation helpful? Give feedback.
-
Open this issue just to save the local benchmark script and result, it can't be run in CI because one need to prepare the data first.
The Benchmark Code
Prepare Data
Prepare the
memiavl.db
andapplication.db
for snapshot at Cronos mainnet height7920000
:memiavl.db
, after completed, remove thewal
directory to keep it clean.cronosd changeset restore-app-db
command to convertmemiavl.db/snapshot-7920000
to rocksdbapplication.db
.application.db
:Beta Was this translation helpful? Give feedback.
All reactions