Skip to content

Conversation

@achow101
Copy link
Member

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.

@achow101 achow101 added the Tests label Apr 18, 2022
Copy link
Contributor

@w0xlt w0xlt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 464a162

Copy link
Contributor

@jarolrod jarolrod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review ACK 464a162

@maflcko maflcko merged commit 9076597 into bitcoin:master Apr 19, 2022
@fanquake
Copy link
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
Copy link
Member Author

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
Copy link
Member

That's fine, but it can't remain this slow as long as running ./src/bench/bench_bitcoin is part of make check. I underestimated how long it was actually taking. An invocation of ./bench_bitcoin just 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
Copy link
Member

hebasto commented Apr 19, 2022

That's fine, but it can't remain this slow as long as running ./src/bench/bench_bitcoin is part of make check. I underestimated how long it was actually taking. An invocation of ./bench_bitcoin just took 17 minutes:

Same here...

@achow101
Copy link
Member Author

See #24924

sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Apr 19, 2022
@bitcoin bitcoin locked and limited conversation to collaborators Apr 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants