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

Improve speed of ./tests package speed #12127

Closed
AskAlexSharov opened this issue Sep 28, 2024 · 2 comments
Closed

Improve speed of ./tests package speed #12127

AskAlexSharov opened this issue Sep 28, 2024 · 2 comments
Assignees
Labels
imp1 High importance

Comments

@AskAlexSharov
Copy link
Collaborator

github.com/erigontech/erigon/tests 407.674s

last bottleneck i know:

  • rwtx got committed (while can be rolledback)
  • it creating many databases on disk - and seems disk is the bottleneck (maybe ramfs can be used)
  • it seems ./tests - tests are mostly for stage_exec, but it using all components: Caplin, etc... maybe we should make them a bit lower-level (more like 'unit-tests' rather than 'integration')
@dvovk
Copy link
Member

dvovk commented Oct 29, 2024

I spent some time investigating what is going. The main time consuming parts is read write to disk. I don't see anything specific what can be done to it but in fact it is pretty fast as I got average speed per test around 60ms and it just the amount of tests which is thousands. I tried to use ramps but it didn't make any positive results. What I've done is make tests to run in parallel which increased performance by 25% #12527

@dvovk dvovk closed this as completed Oct 30, 2024
@dvovk
Copy link
Member

dvovk commented Nov 4, 2024

For integration tests I did more investigation and related to it make sense to have parallel execution only for BlockTest as other test doesn't shows any significant improvement or even get worse in performance:

File Test func Test name Tests count Total time seconds (parallel) Average time per test ms (parallel)
block_test.go TestBlockchain BlockTest 616 41 (26) 66.8 (42.2)
difficulty_test.go TestDifficulty - (func) 18598 2.65 (5.96) 0.14 (0.32)
exec_spec_test.go TestExecutionSpec BlockTest 5049 324 (211) 64.2 (41.7)
rlp_test.go TestRLP RLPTest 81 2.45 (2.48) 30.2 (30.6)
state_test.go TestState StateTest 16457 206.6 (205.5) 12.5 (12.4)
transaction_test.go TestTransaction TransactionTest 237 3.2 (5.74) 13.5 (24.2)

@dvovk dvovk mentioned this issue Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
imp1 High importance
Projects
None yet
Development

No branches or pull requests

2 participants