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

How much memory is needed to compile? #311

Closed
rococode opened this issue Jan 19, 2020 · 6 comments
Closed

How much memory is needed to compile? #311

rococode opened this issue Jan 19, 2020 · 6 comments
Labels

Comments

@rococode
Copy link

rococode commented Jan 19, 2020

I'm getting a

virtual memory exhausted: Cannot allocate memory

error when I try to compile (on the make -j step).

I'm running this on an AWS EC2 g4dn.xlarge machine which has 16GB RAM. Do I need more than that just to compile? When I run the make I indeed see free show memory usage steadily going up until the error appears and the build crashes.

@emjotde
Copy link
Member

emjotde commented Jan 19, 2020

Hi,
with make -j you run many build processes, they quickly add up. Try make -j 8 or whatever works.

@hieuhoang
Copy link
Collaborator

hieuhoang commented Jan 19, 2020 via email

@emjotde
Copy link
Member

emjotde commented Jan 19, 2020

I think this is oddly specific to AWS machines. I noticed make gets the number of CPUs/threads wrong there (because they are VMs?) and dispatches a much larger amount of processes than available threads.

@hieuhoang
Copy link
Collaborator

hieuhoang commented Jan 19, 2020 via email

@emjotde
Copy link
Member

emjotde commented Jan 19, 2020

At least a comment about the potential memory issue is a good idea. Usually people compile on larger machines if they have GPUs, though.

@rococode
Copy link
Author

Thank you for the very quick responses! make -j 8 worked successfully for me.

@emjotde emjotde pinned this issue Jan 19, 2020
@emjotde emjotde closed this as completed Jan 19, 2020
@snukky snukky added the faq label Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants