I've been working on some improvements to wallet loading performance and it's useful to have a benchmark to check whether these improvements are actually improvements.
bench: Add a benchmark for wallet loading #24913
pull achow101 wants to merge 1 commits into bitcoin:master from achow101:bench-wallet-load changing 2 files +84 −0-
achow101 commented at 9:08 PM on April 18, 2022: member
-
bench: Add a benchmark for wallet loading 464a162817
- achow101 added the label Tests on Apr 18, 2022
- w0xlt approved
-
w0xlt commented at 9:36 PM on April 18, 2022: contributor
ACK 464a162
- MarcoFalke approved
-
jarolrod commented at 8:03 AM on April 19, 2022: member
- MarcoFalke merged this on Apr 19, 2022
- MarcoFalke closed this on Apr 19, 2022
-
fanquake commented at 12:43 PM on April 19, 2022: member
This has added minutes of runtime to
./src/bench/bench_bitcoin, at least when run on macOS. I assume it needs to be modified use something like-unsafesqlitesync. -
achow101 commented at 1:46 PM on April 19, 2022: member
I assume it needs to be modified use something like
-unsafesqlitesync.I considered that, but thought it would be preferable to benchmark the actual use rather than test-optimized use.
-
fanquake commented at 3:20 PM on April 19, 2022: member
That's fine, but it can't remain this slow as long as running
./src/bench/bench_bitcoinis part ofmake check. I underestimated how long it was actually taking. An invocation of./bench_bitcoinjust took 17 minutes:time src/bench/bench_bitcoin | ns/op | op/s | err% | total | benchmark |--------------------:|--------------------:|--------:|----------:|:---------- | 43,566,102.00 | 22.95 | 2.2% | 0.49 | `AddrManAdd` | 116,815,336.00 | 8.56 | 1.9% | 1.29 | `AddrManAddThenGood` <trimmed> | ns/op | op/s | err% | total | benchmark |--------------------:|--------------------:|--------:|----------:|:---------- | 29.94 | 33,402,338.83 | 12.9% | 0.01 | :wavy_dash: `SipHash_32b` (Unstable with ~31,263.6 iters. Increase `minEpochIterations` to e.g. 312636) | 9.02 | 110,848,661.52 | 7.1% | 0.02 | :wavy_dash: `Trig` (Unstable with ~183,410.9 iters. Increase `minEpochIterations` to e.g. 1834109) | 90,910.30 | 10,999.85 | 2.7% | 0.01 | `VerifyNestedIfScript` | 96,822.20 | 10,328.21 | 14.1% | 0.01 | :wavy_dash: `VerifyScriptBench` (Unstable with ~9.2 iters. Increase `minEpochIterations` to e.g. 92) | 8,326.47 | 120,098.92 | 0.4% | 0.01 | `WalletBalanceClean` | 197,664.75 | 5,059.07 | 0.1% | 0.01 | `WalletBalanceDirty` | 8,405.32 | 118,972.29 | 2.3% | 0.01 | `WalletBalanceMine` | 37.50 | 26,669,181.90 | 0.1% | 0.01 | `WalletBalanceWatch` | 839,372,226.90 | 1.19 | 1.6% | 204.41 | `WalletLoadingDescriptors` | 273,978,457.64 | 3.65 | 0.6% | 33.45 | `WalletLoadingLegacy` src/bench/bench_bitcoin 177.51s user 38.43s system 20% cpu 17:29.47 total `` -
hebasto commented at 3:57 PM on April 19, 2022: member
That's fine, but it can't remain this slow as long as running
./src/bench/bench_bitcoinis part ofmake check. I underestimated how long it was actually taking. An invocation of./bench_bitcoinjust took 17 minutes:Same here...
- sidhujag referenced this in commit 74b1abfb7d on Apr 19, 2022
- DrahtBot locked this on Apr 19, 2023