-
Notifications
You must be signed in to change notification settings - Fork 21
Disk space and number of items in the store #229
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
Conversation
tmcgilchrist
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good, please address the code comments.
|
@mtelvers you might want to grab aabae0f. Ideally |
Co-authored-by: Tim McGilchrist <[email protected]>
Co-authored-by: Tim McGilchrist <[email protected]>
Co-authored-by: Tim McGilchrist <[email protected]>
Co-authored-by: Antonin Décimo <[email protected]>
CHANGES: - Support OBuilder Docker backend on Windows and Linux (@MisterDA ocurrent/ocluster#143) - Support OBuilder FreeBSD worker (@tmcgilchrist ocurrent/ocluster#236) - Specify upper bound on number of items in OBuilder store (@mtelvers ocurrent/ocluster#229) - Add Prometheus statistics for OBuilder cache hit rate (@mtelvers ocurrent/ocluster#238)
CHANGES: - Support OBuilder Docker backend on Windows and Linux (@MisterDA ocurrent/ocluster#143) - Support OBuilder FreeBSD worker (@tmcgilchrist ocurrent/ocluster#236) - Specify upper bound on number of items in OBuilder store (@mtelvers ocurrent/ocluster#229) - Add Prometheus statistics for OBuilder cache hit rate (@mtelvers ocurrent/ocluster#238)
This PR introduces two new features:
It adds the command line option
--obuilder-prune-item-thresholdwhich specifies an upper bound on the number of result items/steps which will be held in the obuilder cache store. It is possible to specify both--obuilder-prune-thresholdand the new--obuilder-prune-item-thresholdat the same time which will limit both the number of items and the maximum percentage free and it will prune until both conditions are satisfied. It is noted that some stores perform badly when the number of items becomes very large.The free disk space calculation is now passed to the OBuilder Store via
Builder.dfrather than usingExtUnix.All.statvfsto determine the amount of free disk space. As a consequence, we do not need the variablet.root. On macOS with OpenZFS,statvfs(and macOS's owndf) returns the space used by the current ZFS volume only and does not include the sub-volumes. Instead, we must usezpoolto get the actual space used. I have extended this to BTRFS as well but the difference is negligible.