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

Optimize Memory Consumption when Evaluating Large Workflows #5044

Open
1 of 7 tasks
jmchilton opened this issue Nov 20, 2017 · 0 comments
Open
1 of 7 tasks

Optimize Memory Consumption when Evaluating Large Workflows #5044

jmchilton opened this issue Nov 20, 2017 · 0 comments

Comments

@jmchilton
Copy link
Member

jmchilton commented Nov 20, 2017

I think we are close to solving #3883 with #5013 which should buy us new flexibility in terms of dealing with memory issues while scheduling workflows and recovering from memory problems. I want to continue to hit on this though - I think it is probably a limiting issue in terms of collection scaling at the moment. I have some ideas about how to limit the memory but I'm not sure how to test them effectively exactly.

  • Make separate schedulers for workflow scheduling a best practice for scaling.

With the above in place - admins of instances bumping into this issue could separate things out and isolate if the memory problems are in the scheduling processes or the job handler processes. When I started writing this issue I had some ideas for optimizing memory usage in job handlers but I did a detailed review and it turns out they have already been implemented thankfully. So I think if there are memory problems they will pop up in workflow scheduling process.

Here are some ideas:

  • I thought for sure the workflow scheduler would expunge objects between workflow scheduling iterations - it creates lists of IDs to allow doing this very effectively and get isolation between each invocation - but it doesn't after I did a search for that today. I think this means workflow scheduling has a serious memory leak - and so I will work on fixing that today. (These other interventions may not be needed at all in light of this).
  • Track forward connections and do not keep unneeded step outputs in memory in the WorkflowProgress object. Do not ever even load unneeded outputs on subsequent scheduling iterations (this is a lot easier after Improved Collection and Workflow State with Applications #5013 since we are persisting everything very clearly).
  • I don't think the workflow scheduler right now would ever need a lot of HDA attributes that are probably loaded into memory - e.g. metadata. The job handler would need those to turn things into jobs but not the scheduler I think? Verify this and do not load unneeded attributes into memory ever in that process.
@jmchilton jmchilton changed the title Optimize Memory Consumption when Evaluation Large Workflows Optimize Memory Consumption when Evaluating Large Workflows Nov 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant