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

Optimizing archive node genesis account function #16468

Open
wants to merge 2 commits into
base: dkijania/apply_caqti_patch
Choose a base branch
from

Conversation

dkijania
Copy link
Member

@dkijania dkijania commented Jan 15, 2025

Optimizing archive node genesis account function. Function tries to inserts all accounts specified in genesis ledger config file. However, it does it in non optimal way. Namely it open transaction at start then tries to add all accounts and finally commits. This can lead to OutOfMemory issues in postgres process as for instance mainnet genesis ledger contains 200k+ accounts. We experienced that problem on our performance environment. Solution is to make more granular commits during import. New code chop account to be inserted list into 100 account batches (this is measured value as 500 was also making postgres memory increase till 40~gb)

@dkijania
Copy link
Member Author

!ci-docker-me

@dkijania dkijania changed the title apply caqti upgrade plus archive init speedup patch archive genesis account loading fix Jan 16, 2025
@dkijania
Copy link
Member Author

!ci-docker-me

@dkijania dkijania changed the base branch from compatible to dkijania/apply_caqti_patch January 16, 2025 20:48
@dkijania dkijania self-assigned this Jan 16, 2025
@dkijania dkijania changed the title archive genesis account loading fix Optimizing archive node genesis account function Jan 16, 2025
@dkijania
Copy link
Member Author

!ci-build-me

@dkijania dkijania marked this pull request as ready for review January 16, 2025 22:12
@dkijania dkijania requested a review from a team as a code owner January 16, 2025 22:12
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.

1 participant