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

Don't use make -j it may exhaust all memory #92

Merged
merged 1 commit into from Aug 15, 2018
Merged

Don't use make -j it may exhaust all memory #92

merged 1 commit into from Aug 15, 2018

Conversation

niklas88
Copy link
Member

This was kindly suggested by Marc Lavallée

This was kindly suggested by Marc Lavallée
@niklas88 niklas88 requested a review from naetherm August 14, 2018 14:49
Copy link
Member

@joka921 joka921 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good and reasonable. 4 Threads on a 4GB machine worked fine so this should be reasonable for reasonably dimensioned systems. Feel free to merge:)

@niklas88 niklas88 merged commit 750af2c into ad-freiburg:master Aug 15, 2018
Copy link

@naetherm naetherm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me.

@@ -147,7 +147,7 @@ script.

Build the project (Optional: add `-DPERFTOOLS_PROFILER=True/False` and `-DALLOW_SHUTDOWN=True/False`)

cmake -DCMAKE_BUILD_TYPE=Release .. && make -j
cmake -DCMAKE_BUILD_TYPE=Release .. && make -j $(nproc)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A rule of thumb for a good approximation of -j is usually <NUM CORES> + 1, some also use <NUM CORES> * range(1.5, 2.0).
For <NUM CORES> + 1 and <NUM CORES> * 1.5 the main idea is the following:
You'll have <NUM CORES> for the compilation and and additional thread for management of I/O activity. The latter thread is often in idle mode, so that thread will lead to now problem.
If the hardware supports hyperthreading one can also use <NUM CORES> * 2.0.

But, as usual: Such things highly depend on the underlying hardware.

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

3 participants