-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
Good job is using a lot of memory / ram #613
Comments
I noticed strange behaviour, when starting puma and good_job, both jump to 30% ram use. Then Puma starts to drop quite quickly and ends at around 9%. Good_job stays at around 29% (Sidekiq before was roughly the same as Puma with the same workers) - this is 10 minutes later: (This is with the dashboard disabled and preserve_job_records: false) Any ideas how to troubleshoot this and figure out why so much ram is being used? |
@rgaufman thanks for sharing this! I haven't done much memory profiling of GoodJob, though I'm surprised that GoodJob would perform significantly differently than Puma. Take the following as speculation (because I haven't looked)... GoodJob's initialization process is pretty simple:
Because I haven't done any memory profiling, I can't give you anything specific about how to dig into the problem. I think trying to get some stackprof points into the initialization would be a good place to start, and look at allocated objects. It sounds like there isn't a problem though with object retention (e.g. memory usage increases over time), just that there is more than expected in the first place. BTW, here's memory usage for my reference application. |
@sedubois yikes! That's not good. I can't think of anything off the top of my head that would have blown out memory. Looking through the Changelog, the major changes are:
Let me do another sweep through the code and see what I can find. |
@bensheldon yesterday I downgraded GoodJob from 3.0.0 to 2.15.1 and the memory issue had disappeared. Today I upgraded to 3.0.1 and there have also not been any memory spikes since. So it seems solved, thanks! 👍 |
@sedubois fantastic! 🎉 |
Hi there,
I have my good_job set up like this:
Here is a screenshot of it in action:
There are rarely more than 3-4 jobs running in parallel.
Compared to Sidekiq running the same jobs, it seems to take almost double the ram and looks like this in top:
Any ideas what could be responsible for this? - maybe I should disable the dashboard? - How would I troubleshoot and reduce ram usage?
The text was updated successfully, but these errors were encountered: