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

Large params consume huge amounts of memory #87

Closed
crockeea opened this issue Dec 5, 2019 · 1 comment
Closed

Large params consume huge amounts of memory #87

crockeea opened this issue Dec 5, 2019 · 1 comment

Comments

@crockeea
Copy link

crockeea commented Dec 5, 2019

Following up on #84:
I've set SEAL_POLY_MOD_DEGREE_MAX to 262144 and SEAL_COEFF_MOD_COUNT_MAX to 122 in defines.h, and updated the primes in globals.cpp per #84. Now I'm getting a "bad_alloc" in MemoryPoolHeadMT::get().

I'm on an instance with 64GB of memory, and watched SEALContext creation happily eat right though that (via free -hm), followed by the out-of-memory error.

64GB seems pretty excessive; is this expected? How much memory should I need for these parameters?

@kimlaine
Copy link
Contributor

kimlaine commented Dec 5, 2019

Well, a single polynomial will now be 244 MB in memory. When you create your SEALContext, maybe it's best if you don't create the modulus switching chain: auto context = SEALContext::Create(parms, false);.

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

No branches or pull requests

2 participants