test: set number of RPC server threads to 2 #33679

pull furszy wants to merge 1 commits into bitcoin:master from furszy:2025_test_reduce_RPC_server_threads changing 1 files +1 −0
  1. furszy commented at 1:33 pm on October 22, 2025: member

    The default -rpcthreads value spawns 16 HTTP server threads for each node. Running the functional test suite with default rpcthreads can exhaust file descriptors or hit other resource limits very easily (more when tests are run in parallel). Furthermore, having 16 threads is unnecessary since they are mostly idle. We run RPC calls on a single RPC connection and wait for it result synchronously. There is (almost) never two RPC calls occurring concurrently. Because of this, the threads are mostly idle, so we can safely limit the number of them to two.

    Note for reviewers: I checked this does not introduce any timing regression but would be good to double-check it on your end too. We could add another thread if needed. Just the 16 threads default value is too high and unnecessary.

  2. test: set number of RPC server threads to 2
    The default `-rpcthreads` value spawns 16 HTTP server threads for each node.
    Running the functional test suite with default `rpcthreads` can exhaust file
    descriptors or hit other resource limits very easily.
    Moreover, having 16 threads is unnecessary since they are mostly idle. We
    run RPC calls on a single RPC connection and wait for it result synchronously.
    There is (almost) never two RPC calls occurring concurrently.
    Because of this, the threads are mostly idle, so we can safely limit the number
    of them to two.
    e9cd45e3d3
  3. DrahtBot added the label Tests on Oct 22, 2025
  4. DrahtBot commented at 1:33 pm on October 22, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33679.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK maflcko, andrewtoth, l0rinc, kevkevinpal

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  5. maflcko commented at 1:45 pm on October 22, 2025: member

    lgtm ACK e9cd45e3d3c7592265ebf67387090b3df1501df4

    Any number larger than 1 should be fine, so that it is still possible to accidentally or intentionally cause races when several test threads call the rpc threads.

  6. andrewtoth approved
  7. andrewtoth commented at 2:53 pm on October 22, 2025: contributor

    ACK e9cd45e3d3c7592265ebf67387090b3df1501df4

    Makes sense, similar change to #33485.

  8. l0rinc commented at 3:30 pm on October 22, 2025: contributor
    Similar to #33485, ran the tests locally, seems fine, change makes sense. ACK e9cd45e3d3c7592265ebf67387090b3df1501df4
  9. kevkevinpal commented at 5:34 pm on October 22, 2025: contributor

    ACK e9cd45e

    as mentioned it is similar to #33485.

  10. fanquake merged this on Oct 23, 2025
  11. fanquake closed this on Oct 23, 2025

  12. furszy deleted the branch on Oct 23, 2025

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: 2025-11-02 18:12 UTC

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