-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zebra full lightwalletd
sync is significantly slower than zcashd
#5298
Comments
Some changes that might impact RPC speed:
Some previous changes that might have regressed RPC speed:
|
lightwalletd
sync faster than zcashd
lightwalletd
sync is significantly slower than zcashd
I tried timing a large block RPC with
This uses the |
This performance pattern continues even if I query multiple blocks, exactly the way time for HEIGHT in $(seq 1825310 1825310); do
zcash-cli -rpcport=28232 getblock $HEIGHT 0 > /dev/null
zcash-cli -rpcport=28232 getblock $HEIGHT 1 > /dev/null
done Zebra port:
|
Similarly, using For example: time curl --data-binary '{"method":"getblock","params":["1825310",0],"id":1}' -H 'Authorization: Basic (insert hashed password here)' -H 'Content-Type: application/json' http://127.0.0.1:8232/ You can get the hashed RPC password by running Maybe the slowness only happens with lots of blocks, or with a continually running process. |
The verbose getblock requests took about the same time for Zebra and Let's see if that fixes our performance issue. $ time curl --data-binary '{"method":"getblock","params":["1825310",1],"id":1}' -H 'Content-Type: application/json' http://127.0.0.1:28232/ > /dev/null
real 0m0.005s
user 0m0.002s
sys 0m0.002s The previous times were:
|
A full
|
That's awesome! Congratulations! |
Using zebra from this PR i synchronized lightwalletd in 4 hs and 20 mins locally. |
That sounds about right, the exact time depends on your disk speed, CPU, and Rust and OS versions. |
Motivation
Currently, a full
lightwalletd
sync is 37% slower with Zebra thanzcashd
(7h vs 5h).Benchmarks
Full Sync Benchmarks
Here are some commands for full sync benchmarks:
Zebra:
zcashd
:Quick Benchmarks
Here are some commands for quick benchmarks:
Zebra:
zcashd
:Benchmark Notes
You can change
182[0-9]{4}
to the current tip height minus 10,000. (For example, if the current tip height is 1,975,302 use196[0-9]{4}
.)rg
(ripgrep) is a fastgrep
alternative written in Rust. You can usetee /dev/stderr | grep --max-count=1
instead ofrg rg --passthru --max-count 1
./home/dev/.config/zebra/zebrad-mainnet-lightwalletd-tmp-zcash.conf
is set up like it is in thelightwalletd
tests:TODO
The text was updated successfully, but these errors were encountered: