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

Use gc to avoid trashing. #3363

Conversation

algonautshant
Copy link
Contributor

@algonautshant algonautshant commented Jan 4, 2022

TestArchivalFromNonArchival was sporadically failing, particularly on the feature/dilithium-scheme-integration branch.
The most likely reason for the slowdown is narrowed down to system trashing.

This fix seems to fix the issue by invoking GC before the test to have maximum amount of memory available, and after the test to minimize the memory impact on subsequent tests.

This fix is also necessary to confirm the memory hypothesis.

The memory consumption is high because of the existing ledger design, which is skewed in this test by creating a large number of asset creation transactions. This behavior is changing with the upcoming ledger refactoring project.

Resolves #3334

@algonautshant algonautshant self-assigned this Jan 4, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jan 4, 2022

Codecov Report

Merging #3363 (5866f25) into feature/dilithium-scheme-integration (ca330c6) will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@                           Coverage Diff                            @@
##           feature/dilithium-scheme-integration    #3363      +/-   ##
========================================================================
+ Coverage                                 47.84%   47.86%   +0.02%     
========================================================================
  Files                                       381      381              
  Lines                                     61651    61651              
========================================================================
+ Hits                                      29496    29509      +13     
+ Misses                                    28734    28724      -10     
+ Partials                                   3421     3418       -3     
Impacted Files Coverage Δ
network/wsNetwork.go 62.84% <0.00%> (-0.40%) ⬇️
catchup/service.go 70.64% <0.00%> (+1.24%) ⬆️
network/wsPeer.go 71.38% <0.00%> (+3.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ca330c6...5866f25. Read the comment docs.

@algonautshant algonautshant changed the base branch from feature/dilithium-scheme-integration to master January 5, 2022 04:24
@algonautshant algonautshant changed the base branch from master to feature/dilithium-scheme-integration January 5, 2022 04:26
Copy link
Contributor

@id-ms id-ms left a comment

Choose a reason for hiding this comment

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

looks good to me!

@id-ms id-ms merged commit 244b5f2 into algorand:feature/dilithium-scheme-integration Jan 6, 2022
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.

4 participants