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

feat: add how to reduce memory usage while building #356

Merged
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docs/support/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@ A workaround here is to limit the job number while building.
MAKEFLAGS="-j4" colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
```

You can adjust `-j4` to any number based on your system.
You can adjust `-j4` to any number based on your system. Please see [manual page of GNU make](https://www.gnu.org/software/make/manual/make.html#Parallel-Disable) for details.
Shin-kyoto marked this conversation as resolved.
Show resolved Hide resolved

By reducing the number of packages built in parallel, you can also reduce the amount of memory used. In the following example, the number of packages built in parallel is set to 1, and the number of jobs used by `make` is limited to 1.
Shin-kyoto marked this conversation as resolved.
Show resolved Hide resolved

```bash
MAKEFLAGS="-j1" colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --parallel-workers 1
```
Copy link
Contributor

Choose a reason for hiding this comment

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

[nits] @Shin-kyoto Don't you have to add a note that the compilation speed will inevitably be slow?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kenji-miyake
Thank you for your comment.
I added note in dbc08ff


### Errors when using the latest version of Autoware

Expand Down