Skip to content
This repository has been archived by the owner on Jul 22, 2021. It is now read-only.

Mitigating memory explosions from difficult negotiations #130

Merged
merged 12 commits into from
Jul 20, 2020

Conversation

mxgrey
Copy link
Member

@mxgrey mxgrey commented Jul 16, 2020

This PR should help mitigate the fleet adapter memory explosions that were sometimes being caused by difficult negotiations.

This does not fix the underlying issue of the motion planner utilizing large amounts of memory, but it makes it so that planning work being done for negotiations are managed more carefully, and as a result we should see a much lower ceiling for high the memory explosions can get.

A later PR will address the core issue of the motion planner's memory usage. For now this should PR should be sufficient to prevent fleet adapters from using up so much memory that they risk crashing.

Copy link
Member

@Yadunund Yadunund left a comment

Choose a reason for hiding this comment

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

I can confirm that memory is being freed after negotiations 👍

@gbiggs
Copy link
Member

gbiggs commented Jul 17, 2020

Looks like this PR is more than just the trim call, so I don't feel qualified to approve it. I did have one really tiny suggested change though.

Co-authored-by: Geoffrey Biggs <gbiggs@killbots.net>
@mxgrey
Copy link
Member Author

mxgrey commented Jul 17, 2020

Yeah, the trim is really just to make sure that the explosions are truly temporary and to not alarm anyone who looks at the memory usage of the fleet adapter. The other changes are what was really needed to keep the memory explosions from being unsustainably large, in particular these changes are making it so that difficult planning jobs are being discarded when they're no longer useful instead of being allowed to grow obscenely large and eventually die off with no benefit.

@mxgrey mxgrey merged commit 579b205 into master Jul 20, 2020
@mxgrey mxgrey deleted the bug/memory_leak branch July 20, 2020 04:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants