Bitcoin Latest version.
I increased memory to 10GB and still one RPC call takes around 30 seconds. The blockchain is still syncing. Is that the reason why RPC calls are slow?
Bitcoin Latest version.
I increased memory to 10GB and still one RPC call takes around 30 seconds. The blockchain is still syncing. Is that the reason why RPC calls are slow?
When it stops syncing, they should be faster. Your CPU is probably hogged.
Try it with bitcoind -regtest and bitcoin-cli -regtest getblockchaininfo.
The CPU usage is atmost around 5% only. Yes the regtest works instatly but mainnet RPC calls are slow. Whats your latency?
I get an immediate response, even before syncd, on my Macbook Pro (MacOS 10.12.6, 2.5GHz i7, 16GB RAM).
Before IBD begins:
➜ bitcoin git:(b23e41edb) ✗ time nc -zw30 127.0.0.1 8332
Connection to 127.0.0.1 port 8332 [tcp/*] succeeded!
nc -zw30 127.0.0.1 8332 0.01s user 0.01s system 75% cpu 0.026 total
After:
➜ bitcoin git:(b23e41edb) ✗ time nc -zw30 127.0.0.1 8332
Connection to 127.0.0.1 port 8332 [tcp/*] succeeded!
nc -zw30 127.0.0.1 8332 0.01s user 0.00s system 86% cpu 0.015 total
Also immediate on my fully syncd RPi3. However, I did notice RPC sluggishness during block sync / validation, on both devices, in the past.
Yes the connect to rpc port was quick even in my case but its gettting slow when data was fetched. For example, can you try the same thing with getblockchaininfo or getnetworkinfo.
getblockchaininfo works immediately. I have had this problem you're mentioning though; I don't know its cause, but it seems to be during block validation (it happened even with just a -reindex).
Cool. Will try reindex. Thanks.
I disabled the wallet on node ( disablewallet=1 ), the RPC calls got faster.