-
Notifications
You must be signed in to change notification settings - Fork 212
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
rviz_default_plugins runs out of memory on CI packaging jobs #539
Comments
I'm taking a look in between other meetings. One thing I've found so far is that the |
All right, I collected some data on what's going on here. Essentially what I did was to make a bash script with the following contents:
I then pointed the colcon at that "cc" while building just the
That gave me the output from the time command for each file as it completed. Among the data printed is Maximum RSS size; here's one example:
I then wrote a python script to comb through that data, and sort by the maximum amount of memory being used by a process. I've elided the script here as it is a bit too long, but I can push it somewhere if people are interested. The data that I got out of it looks like this (I'm only showing the top 30; there are a lot more):
A few things pop out at me:
A few quick ideas on how to improve things:
I'll start looking at some of these options tomorrow. |
@clalancette / @sloretz I have been pretty annoyed building this package on my desktop, actually. It takes way longer than just about anything else on my system. The behavior I've noticed is rather different, though. I've got a 32 core threadripper (which gives 64 threads for compilation). This package takes longer than anything else in the stack, and seems to hang for quite a while, using only 1 or 2 threads. I have no idea why that is, but was planning to look into it so I'll mention it here while we're on the subject (this single package takes me about twice as long as all the other ROS 2 packages -- pretty odd).
Yes, that should help. That probably doesn't relate to my strange lack of cpu-usage, though. |
All right, I've identified 3 different concrete things that will help here:
With the combination of all of those, the build is about 10% slower, but the maximum memory usage looks more like:
PR upcoming with all of those changes. |
Copying from PR #532 which did not fix issue:
Opening issue because I need to ask for help. The ros2 linux packaging job is failing to build
rviz_defaullt_plugins
with an error that looks a bit like the agent ran out of memory.This PR tried compiling separate object libraries and then linking them into the big
rviz_default_plugins
library would reduce the peak memory usage. It didn't.Here's a script I wrote to watch the CPU and memory usage. It outputs csv to stdout that can be graphed.
I used it to watch the cumulative CPU and memory usage of all
ld
orcc1plus
processes on my machine while doing a clean buildrviz_default_plugins
.Here's the memory usage of building just
rviz_default_plugins
on theros2
branch. (vertical axis % of system memory used, horizontal axis seconds)Here's the memory usage using this branch
It does not appear to have reduced the peak. The only other idea I have is to break up the
rviz_default_plugins
library into smaller shared libraries.The text was updated successfully, but these errors were encountered: