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

Fix python loadgenerator memory leak #816

Closed
wants to merge 5 commits into from

Conversation

cartersocha
Copy link
Contributor

@cartersocha cartersocha commented Mar 30, 2023

My good friend ChatGPT and I tried a couple different solutions to eliminate the memory leak here.

The most effective method seemed to be switching to the locustio image as our base image from a generic python option.

I ran both versions locally for ~40 mins. The locustio image stabilized around 67 MB usage. The regular python image continued to add memory usage overtime and was around 86 MB usage when I stopped it.
Screenshot 2023-03-30 at 10 41 26 AM
Screenshot 2023-03-30 at 11 20 10 AM

@cartersocha cartersocha requested a review from a team March 30, 2023 18:23
@cartersocha
Copy link
Contributor Author

@puckpuck please take a look and trying running on your cluster

@cartersocha cartersocha changed the title Fix python memory leak Fix python loadgenerator memory leak Mar 30, 2023
@cartersocha
Copy link
Contributor Author

towards: #771

@puckpuck
Copy link
Contributor

oooh... this looks super interesting. Will give it a try on a long running tests

Wonder if we can do the same for the emailservice now 😛

@puckpuck
Copy link
Contributor

I have this running now. Loadgenerator was OOMing every 55-ish hours before.

Copy link
Member

@julianocosta89 julianocosta89 left a comment

Choose a reason for hiding this comment

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

Image size grew 100MB, but for the benefit that this is bringing I don't have anything against it.
Nice finding @cartersocha!

@cartersocha
Copy link
Contributor Author

@puckpuck im guessing no news is good news on restarts! Are we good to merge once I resolve the conflicts or have any issues popped up?

@puckpuck
Copy link
Contributor

puckpuck commented Apr 1, 2023

I'll confirm tonite one way or the other.

@puckpuck
Copy link
Contributor

puckpuck commented Apr 2, 2023

I still see a memory leak, at about the same rate as before :(

@cartersocha cartersocha closed this Apr 2, 2023
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.

4 participants