Add new mempool benchmarks for a complex pool #17292

pull JeremyRubin wants to merge 1 commits into bitcoin:master from JeremyRubin:bench_mempool changing 2 files +94 −0
  1. JeremyRubin commented at 11:13 PM on October 28, 2019: contributor

    This PR is related to #17268.

    It adds a mempool stress test which makes a really big complicated tx graph, and then, similar to mempool_eviction test, trims the size.

    The test setup is to make 100 original transactions with Rand(10)+2 outputs each.

    Then, 800 times:

    we create a new transaction with Rand(10) + 1 parents that are randomly sampled from all existing transactions (with unspent outputs). From each such parent, we then select Rand(remaining outputs) +1 50% of the time, or 1 outputs 50% of the time.

    Then, we trim the size to 3/4. Then we trim it to just a single transaction.

    This creates, hopefully, a big bundle of transactions with lots of complex structure, that should really put a strain on the mempool graph algorithms.

    This ends up testing both the descendant and ancestor tracking.

    I don't love that the test is "unstable". That is, in order to compare this test to another, you really can't modify any of the internal state because it will have a different order of invocations of the deterministic randomness. However, it certainly suffices for comparing branches.

  2. Add new mempool benchmarks for a complex pool b0c774b48a
  3. fanquake added the label Mempool on Oct 28, 2019
  4. fanquake added the label Tests on Oct 28, 2019
  5. JeremyRubin cross-referenced this on Oct 28, 2019 from issue Epoch Mempool by JeremyRubin
  6. JeremyRubin commented at 2:10 AM on October 29, 2019: contributor

    For those curious, this is a graph of the transactions that are being tested here. The red ones are the "parentless" ones that we create (along with the fake parent I put in to make the graph render nicely.

    This graph doesn't show the weights for how many outputs are being consumed by a child from a parent, an inbound edge simply indicates any amount of consumption.

    Txn Graph

  7. MarcoFalke commented at 1:07 PM on October 29, 2019: member

    Concept ACK! I was waiting for this

  8. instagibbs commented at 4:13 PM on October 29, 2019: member

    concept ACK! moar data

  9. JeremyRubin commented at 4:38 PM on October 29, 2019: contributor

    Moar data:

    I ran #17268 against master across a number of paramters for the number of transactions.

    image

    Transactions Master Epoch MemPool Speedup
    800 0.26 0.122783 2.117556991
    2000 1.81 0.7989 2.265615221
    5000 11.92 5.14931 2.314873255
    8000 32.73 13.21 2.477668433
    10000 54.1336 22.5658 2.398922263
    12500 87.64 39.2 2.235714286
    17500 182.268 86.34 2.11104934
    20000 248.16 118.3 2.097717667

    What's interesting about the testing setup is if the only modification you make is the number of transactions, it is "monotonic" that is, G(n) is a subgraph of G(n+1) for all n. Adjusting other parameters will not have the same sort of effect, unfortunately, as the construction is not stable.

  10. JeremyRubin cross-referenced this on Oct 29, 2019 from issue Add assertion to randrange that input is not 0 by JeremyRubin
  11. jamesob commented at 5:44 PM on October 29, 2019: member

    Concept ACK

  12. JeremyRubin commented at 7:32 PM on October 29, 2019: contributor

    Not as useful to look at, but this is the structure with 10,000 nodes and 800. If anyone wants the svg (fully zoomable), can share.

    This is made using the twopi shell like layout. The other layout engines choke with this many nodes.

    smaller_hairball

    bighairball

  13. MarcoFalke referenced this in commit a5224be645 on Nov 1, 2019
  14. MarcoFalke merged this on Nov 1, 2019
  15. MarcoFalke closed this on Nov 1, 2019

  16. sidhujag referenced this in commit e298a8ea3e on Nov 2, 2019
  17. JeremyRubin added this to the "Testing" column in a project

  18. MarkLTZ cross-referenced this on Apr 4, 2020 from issue Bitcoin PR tracking by MarkLTZ
  19. PastaPastaPasta referenced this in commit af0cfe5a8c on Apr 12, 2020
  20. jasonbcox referenced this in commit ac76cc89e1 on Sep 11, 2020
  21. sidhujag referenced this in commit 9774b2f8db on Nov 10, 2020
  22. shoryak cross-referenced this on Sep 1, 2021 from issue test: Fix bug in transaction generation in ComplexMempool benchmark by shoryak
  23. kwvg cross-referenced this on Oct 12, 2021 from issue merge bitcoin#13219...#15779: benchmarks by kwvg
  24. MarcoFalke referenced this in commit abc26fa378 on Dec 7, 2021
  25. sidhujag referenced this in commit a01792c0f2 on Dec 7, 2021
  26. RandyMcMillan referenced this in commit 7283e2c744 on Dec 23, 2021
  27. kwvg referenced this in commit 71bfa97407 on Feb 25, 2022
  28. kwvg referenced this in commit 7b74a34aba on Feb 26, 2022
  29. PastaPastaPasta referenced this in commit 20d44e4486 on Feb 26, 2022
  30. PastaPastaPasta referenced this in commit 6d3afc51f5 on Mar 3, 2022
  31. PastaPastaPasta referenced this in commit 6d6f644c78 on Apr 7, 2022
  32. PastaPastaPasta referenced this in commit 31fe43ecdd on Apr 7, 2022
  33. PastaPastaPasta referenced this in commit 3ed1cf0bf9 on Apr 7, 2022
  34. PastaPastaPasta referenced this in commit 0d1c8f914c on Apr 11, 2022
  35. bitcoin locked this on Aug 16, 2022

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-05-20 06:54 UTC