Send RPC calls performance #30416

issue VojtechMyslivec opened this issue on July 9, 2024
  1. VojtechMyslivec commented at 4:36 PM on July 9, 2024: none

    Is there an existing issue for this?

    • 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.

    Screenshot from 2024-07-09 17-19-55

    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.

    Screenshot from 2024-07-09 17-29-10

    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.

  2. VojtechMyslivec commented at 4:39 PM on July 9, 2024: none

    #26008 may relate? I am not sure if it was included in 27.0 release

  3. achow101 commented at 10:25 PM on July 9, 2024: member

    #26008 may relate? I am not sure if it was included in 27.0 release

    That went into 27.0, and seems like a probable candidate for the performance increase. However, I am a little bit skeptical since it should primarily benefit wallets with a ton of descriptors, and yours only has 24.

    Maybe it has a less noticeable benefit for descriptors since the cache is an std::unsorted_map while each descriptor has a std::map for the scripts.


    I would have expected that the number of transactions in the wallet would be the dominating factor in the performance of sending since the wallet currently iterates all transactions in the wallet in order to figure out the UTXOs that can be spent. #27286 changes that and should make it way more performant.

  4. willcl-ark added the label Wallet on Jan 15, 2026
  5. willcl-ark added the label RPC/REST/ZMQ on Jan 15, 2026
  6. willcl-ark commented at 9:25 AM on January 15, 2026: member

    Going to close this now, as I don't think there's anything actionable in here.

    Thanks for the report.

  7. willcl-ark closed this on Jan 15, 2026


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me