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 memory usage for computing hybrid results in the clear #1488

Merged

Conversation

akoshelev
Copy link
Collaborator

This operation was OOMing on 500M inputs

memory allocation of 73551314960 bytes failed
Aborted

The reason for that was that we were keeping all the information from original reports, including AAD and match key.
The improved algorithm only keeps breakdown keys and values to perform attribution.

My back of the envelope calculation says that this improvement is enough to get us to 1 billion reports. Each entry would take ~8 bytes and for 1B entries we are looking at 8Gb memory consumption which should be doable

I ran it on 500M and it finished successfully.

Same reason as for many other recent PRs - save memory for inputs larger than 200M, the footprint is significant
Copy link
Member

@eriktaubeneck eriktaubeneck 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!

Copy link

codecov bot commented Dec 11, 2024

Codecov Report

Attention: Patch coverage is 93.33333% with 3 lines in your changes missing coverage. Please review.

Project coverage is 93.28%. Comparing base (bb543f9) to head (1acf7bd).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
ipa-core/src/bin/in_the_clear.rs 0.00% 2 Missing ⚠️
ipa-core/src/test_fixture/hybrid.rs 97.67% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1488   +/-   ##
=======================================
  Coverage   93.28%   93.28%           
=======================================
  Files         239      239           
  Lines       43532    43546   +14     
=======================================
+ Hits        40608    40624   +16     
+ Misses       2924     2922    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@akoshelev akoshelev merged commit ff37b8a into private-attribution:main Dec 11, 2024
12 checks passed
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