Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TransactionView: benchmark TransactionMeta #2568

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

apfitzge
Copy link

Problem

Summary of Changes

Fixes #

@apfitzge apfitzge force-pushed the transaction_meta_bench branch from 21840a5 to e05868f Compare August 13, 2024 18:34
@apfitzge
Copy link
Author

apfitzge commented Aug 13, 2024

Benchmark showing some pretty good results compared to the VersionedTransaction.
The worst case for both is when we have a ton of instructions (packed noops) - though notably this is not quite as bad as it could be for the VersionedTransaction because afaik it won't actually do the allocations per instruction unless we had 1 byte and 1 account.

Also worth noting that the TransactionMeta does not take ownership of the packet data. The final transaction will likely do some sort of copying here, which will add some overhead, but even with just the meta we can inspect and could choose to filter out transaction much earlier at a much faster rate.

Benchmark Results
min sized transactions/VersionedTransaction
                        time:   [223.40 µs 223.53 µs 223.67 µs]
                        thrpt:  [4.5781 Melem/s 4.5809 Melem/s 4.5837 Melem/s]
min sized transactions/TransactionMeta
                        time:   [7.0786 µs 7.1396 µs 7.2073 µs]
                        thrpt:  [142.08 Melem/s 143.43 Melem/s 144.66 Melem/s]
simple transfers/VersionedTransaction
                        time:   [485.80 µs 486.76 µs 487.71 µs]
                        thrpt:  [2.0996 Melem/s 2.1037 Melem/s 2.1078 Melem/s]
simple transfers/TransactionMeta
                        time:   [7.7263 µs 7.7887 µs 7.8538 µs]
                        thrpt:  [130.38 Melem/s 131.47 Melem/s 132.53 Melem/s]
packed transfers/VersionedTransaction
                        time:   [6.2896 ms 6.2971 ms 6.3054 ms]
                        thrpt:  [162.40 Kelem/s 162.61 Kelem/s 162.81 Kelem/s]
packed transfers/TransactionMeta
                        time:   [235.30 µs 236.01 µs 236.80 µs]
                        thrpt:  [4.3244 Melem/s 4.3388 Melem/s 4.3518 Melem/s]
packed noops/VersionedTransaction
                        time:   [4.7049 ms 4.7073 ms 4.7105 ms]
                        thrpt:  [217.39 Kelem/s 217.53 Kelem/s 217.65 Kelem/s]
packed noops/TransactionMeta
                        time:   [1.3823 ms 1.3850 ms 1.3881 ms]
                        thrpt:  [737.71 Kelem/s 739.33 Kelem/s 740.80 Kelem/s]
packed atls/VersionedTransaction
                        time:   [3.5406 ms 3.5444 ms 3.5482 ms]
                        thrpt:  [288.60 Kelem/s 288.91 Kelem/s 289.21 Kelem/s]
packed atls/TransactionMeta
                        time:   [122.53 µs 122.66 µs 122.79 µs]
                        thrpt:  [8.3395 Melem/s 8.3482 Melem/s 8.3573 Melem/s]

@apfitzge apfitzge mentioned this pull request Aug 13, 2024
14 tasks
@apfitzge apfitzge marked this pull request as ready for review August 13, 2024 21:10
@apfitzge apfitzge merged commit aa2d351 into anza-xyz:master Aug 14, 2024
52 checks passed
@apfitzge apfitzge deleted the transaction_meta_bench branch August 14, 2024 15:50
ray-kast pushed a commit to abklabs/agave that referenced this pull request Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants