Skip to content

bench(txpool): reordering#3882

Merged
mattsse merged 1 commit intomainfrom
rkrasiuk/bench-txpool-reordering
Jul 27, 2023
Merged

bench(txpool): reordering#3882
mattsse merged 1 commit intomainfrom
rkrasiuk/bench-txpool-reordering

Conversation

@rkrasiuk
Copy link
Contributor

@rkrasiuk rkrasiuk commented Jul 24, 2023

Description

Bench transaction pool reordering for upcoming ordering fix to transaction pool (ref #3853).

Bench Routine

After the testdata is generated, the benchmarked block first invokes reorder which sorts the inner collection, then adds a bunch of new transactions and resorts with a different base fee.

seed size is the current size of the pool.
Sampled seed size values: [1 000, 10 000, 50 000, 100 000]

input size is the number of new transactions that will be added in between the reorderings.
Sampled input size values: [10, 100, 1 000]

The benchmark samples measurements across 4 different implementations. See code for more details.

You can run the benchmark with the following command:

cargo bench -p reth-transaction-pool --bench reorder --features test-utils,arbitrary

Results

seed size: 1 000; input size: 10

Screenshot 2023-07-24 at 16 35 55

seed size: 1 000; input size: 100

Screenshot 2023-07-24 at 16 36 37

seed size: 1 000; input size: 1 000

Screenshot 2023-07-24 at 16 36 54

seed size: 10 000; input size: 10

Screenshot 2023-07-24 at 16 37 32

seed size: 10 000; input size: 100

Screenshot 2023-07-24 at 16 37 48

seed size: 10 000; input size: 1 000

Screenshot 2023-07-24 at 16 38 19

seed size: 50 000; input size: 10

Screenshot 2023-07-24 at 16 42 53

seed size: 50 000; input size: 100

Screenshot 2023-07-24 at 16 51 39

seed size: 50 000; input size: 1 000

Screenshot 2023-07-24 at 17 00 21

seed size: 100 000; input size: 10, 100, 1 000

Skipped

VecTxPoolSortStableAndOnInsert started taking too long and is now removed.

@rkrasiuk rkrasiuk added A-tx-pool Related to the transaction mempool C-benchmark A change that impacts how or what we benchmark labels Jul 24, 2023
@rkrasiuk rkrasiuk requested review from gakonst and mattsse as code owners July 24, 2023 13:09
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't look too bad, but we should also check for btreemap

@rkrasiuk rkrasiuk requested a review from mattsse July 24, 2023 15:15
@onbjerg onbjerg force-pushed the rkrasiuk/bench-txpool-reordering branch from 43b2384 to 7db9741 Compare July 26, 2023 16:45
@onbjerg
Copy link
Collaborator

onbjerg commented Jul 26, 2023

Rebased

@rkrasiuk rkrasiuk force-pushed the rkrasiuk/bench-txpool-reordering branch from 7db9741 to c561e59 Compare July 27, 2023 07:41
@codecov
Copy link

codecov bot commented Jul 27, 2023

Codecov Report

Merging #3882 (c561e59) into main (49e1127) will decrease coverage by 0.05%.
Report is 10 commits behind head on main.
The diff coverage is 0.00%.

Impacted file tree graph

Files Changed Coverage Δ
crates/transaction-pool/src/lib.rs 32.31% <ø> (ø)
crates/transaction-pool/src/test_utils/mock.rs 56.01% <0.00%> (-10.36%) ⬇️
crates/transaction-pool/src/traits.rs 4.02% <0.00%> (-0.09%) ⬇️
crates/transaction-pool/src/validate/mod.rs 46.83% <0.00%> (-1.85%) ⬇️

... and 23 files with indirect coverage changes

Flag Coverage Δ
integration-tests 15.53% <0.00%> (-0.06%) ⬇️
unit-tests 64.49% <0.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
reth binary 27.18% <ø> (-0.06%) ⬇️
blockchain tree 83.04% <ø> (+0.03%) ⬆️
pipeline 89.82% <ø> (+0.13%) ⬆️
storage (db) 74.29% <ø> (+0.10%) ⬆️
trie 94.70% <ø> (ø)
txpool 45.18% <0.00%> (-0.82%) ⬇️
networking 77.63% <ø> (-0.06%) ⬇️
rpc 58.86% <ø> (-0.07%) ⬇️
consensus 64.46% <ø> (ø)
revm 33.68% <ø> (ø)
payload builder 6.61% <ø> (ø)
primitives 87.91% <ø> (-0.15%) ⬇️

@mattsse mattsse added this pull request to the merge queue Jul 27, 2023
Merged via the queue into main with commit a298756 Jul 27, 2023
@mattsse mattsse deleted the rkrasiuk/bench-txpool-reordering branch July 27, 2023 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-tx-pool Related to the transaction mempool C-benchmark A change that impacts how or what we benchmark

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants