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

  6. MarcoFalke commented at 1:07 pm on October 29, 2019: member
    Concept ACK! I was waiting for this
  7. instagibbs commented at 4:13 pm on October 29, 2019: member
    concept ACK! moar data
  8. 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.

  9. jamesob commented at 5:44 pm on October 29, 2019: member
    Concept ACK
  10. 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

  11. MarcoFalke referenced this in commit a5224be645 on Nov 1, 2019
  12. MarcoFalke merged this on Nov 1, 2019
  13. MarcoFalke closed this on Nov 1, 2019

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

  16. PastaPastaPasta referenced this in commit af0cfe5a8c on Apr 12, 2020
  17. jasonbcox referenced this in commit ac76cc89e1 on Sep 11, 2020
  18. sidhujag referenced this in commit 9774b2f8db on Nov 10, 2020
  19. MarcoFalke referenced this in commit abc26fa378 on Dec 7, 2021
  20. sidhujag referenced this in commit a01792c0f2 on Dec 7, 2021
  21. RandyMcMillan referenced this in commit 7283e2c744 on Dec 23, 2021
  22. kittywhiskers referenced this in commit 71bfa97407 on Feb 25, 2022
  23. kittywhiskers referenced this in commit 7b74a34aba on Feb 26, 2022
  24. PastaPastaPasta referenced this in commit 20d44e4486 on Feb 26, 2022
  25. PastaPastaPasta referenced this in commit 6d3afc51f5 on Mar 3, 2022
  26. PastaPastaPasta referenced this in commit 6d6f644c78 on Apr 7, 2022
  27. PastaPastaPasta referenced this in commit 31fe43ecdd on Apr 7, 2022
  28. PastaPastaPasta referenced this in commit 3ed1cf0bf9 on Apr 7, 2022
  29. PastaPastaPasta referenced this in commit 0d1c8f914c on Apr 11, 2022
  30. DrahtBot 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: 2024-11-23 09:12 UTC

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