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

Grafast: garbage collection #2040

Open
benjie opened this issue May 1, 2024 · 0 comments
Open

Grafast: garbage collection #2040

benjie opened this issue May 1, 2024 · 0 comments

Comments

@benjie
Copy link
Member

benjie commented May 1, 2024

Currently Grafast retains calculated values in the "Bucket" until the end of the operation. Ideally Grafast would only retain things for as long as necessary; Grafast knows where and when things will be used, so it should be able to get rid of the data at the point it is used and no longer required:

  • Some data is only needed as input to the next step, and then never again
    • it can be deleted as soon as the input to the step is prepared, we don't even have to wait for the step to execute
  • Some data is only needed to determine if the results should be copied to the next LayerPlan or not
    • it can be deleted as soon as the LayerPlan has been constructed, before further step execution occurs
  • Some data is needed as input to child LayerPlans, but then is not referenced directly in output plans
    • Once all the expected dependent LayerPlans have been constructed, the data can be deleted
  • Some data is required by output plans, but only from particular buckets, so it can be deleted from other buckets
    • This is mostly a reminder that OutputPlans exist and we should retain their data until the end of the operation, but that they only read the data from one place (bucket) so the same step can have its data removed from other buckets just fine.

Probably makes sense at the same time to do early execution of layer plans. If a layer plan contains 100 steps, but only 5 of them are needed by the next layerplan, it may make sense to kick off the next layerplan early without waiting for the 95 other steps to complete.

Though this has been long planned, I couldn't find an existing issue for this so I'm filing it now to make it easier to keep track of pending items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🦥 Sloth
Development

No branches or pull requests

1 participant