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

DM-34497: Reduce memory usage of "butler register-skymap" #59

Merged
merged 1 commit into from Apr 20, 2022

Conversation

PaulPrice
Copy link
Contributor

No description provided.

Registering the HSC rings skymap is triggering the OOM-killer
on my Docker with 8 GB memory. The main problem is constructing
the records before they are needed, so all records are in memory
at once. Instead, create the records in a loop within the
transaction context.

This greatly reduces the memory footprint because we don't need
all records in memory at once. This comes at the price of
repeated calls to registry.insertDimensionData, but even if
there is a small loss of performance, this is a command that
gets run only once at the setting up of a Gen3 datastore, so
it shouldn't be too burdensome.
Copy link
Member

@TallJimbo TallJimbo 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! I'd probably have tried to gather up the tract insertions a bit, but thinking about it more the important thing is just doing the patch insertions in batch, and given that there are of order 100 times as many patches, I think this is good enough.

Thanks!

@PaulPrice PaulPrice merged commit 602c559 into main Apr 20, 2022
@PaulPrice PaulPrice deleted the tickets/DM-34497 branch April 20, 2022 18:52
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.

None yet

2 participants