Issue Details
- Number
- 30416
- Title
- Send RPC calls performance
- Description
- ### Is there an existing issue for this?
- [X] I have searched the existing issues
### Current behaviour
I want to report performance changes of `sendmany` and `sendtoaddress` RPC calls.
We use fresh-new wallet for more than an year. There are 24 descriptors in the wallet from which 12 were imported from about a month older wallet. We generated circa 300 k addresses from these imported descriptors and hundreds of addresses from the new ones. We had send about 1500 transactions from this wallet which probably generated hundreds of change addresses.
During the operation of that wallet, the time of RPC `send*` calls degraded a lot. From several seconds at start to almost 3 minutes.

Graph of RPC call duration during last monts. yellow `sendmany` and blue `sendtoaddress`.
The significant drop to cca 25 seconds appears just after update to version 27.0.
BTW, during that time of performance degradation, I monitored number of UTXOs as well and the performance didn't correlate. We have 1-10 k of UTXOs in the wallet and even if I consolidate these to only tens of UTXOs, the performance didn't improve, as you may notice on the graph.

The same graph for last few weeks after update to version 27.0
**So, big kudos and many thanks to this perfomance improvement!** :clap: I notice the new coin-selection algorithm in the changelog, but – according to documentation – this new algorithm should apply only with high fees, which does not apply during last weeks. So I am not sure what could have caused this improvement change and so I am posting this report.
We notice only minor degradation during last days – from 24 seconds to 26 seconds. I will monitor the performance further and report if it get worse or not.
### Expected behaviour
Bitcoin core performance of `send*` RPC calls will not degrade over time.
### Steps to reproduce
I am not sure how to reproduce. For short: generate hundreds of thousands of addresses, receive ten thousands of UTXOs, send thousand of UTXOs.
### Relevant log output
_No response_
### How did you obtain Bitcoin Core
Pre-built binaries
### What version of Bitcoin Core are you using?
27.1
### Operating system and version
Debian 11
### Machine specifications
Amazon AWS EC2 instances. Mainly `t3a` and `c6a` instance types (AMD EPYC 7571). Instance type change didn't have significant impact on performance.
- URL
-
https://github.com/bitcoin/bitcoin/issue/30416
- Closed by
-
Back to List