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

chore: trigger gc if disk at minimum free space limit #10651

Closed
wants to merge 1 commit into from

Conversation

gammazero
Copy link
Contributor

Add check to see if the remaining free space is too low, and if so that should trigger GC to run.

  • New config value: Datastore.DiskMinFreePercent
  • Default value: 95

If the percentage of free space on the datastore volume drops below this amount than run GC. The percentage must be from 0 to 100. A value of 0 (unset) results in the default being used. A value of < 0 or > 100 disables this check.

Closes #10648

Add check to see if the remaining free space is too low, and if so that should trigger GC to run.

- New config value: Datastore.DiskMinFreePercent
- Default value: 95

If the percentage of free space on the datastore volume drops below this amount than run GC. The percentage must be from 0 to 100. A value of 0 (unset) results in the default being used. A value of < 0 or > 100 disables this check.
Copy link
Contributor

@hsanjuan hsanjuan left a comment

Choose a reason for hiding this comment

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

IMHO we should probably not add this as it adds complexity for unclear gain:

  • Behaviour is unclear when when the repopath is a symlink to a different filesystem (i think not taken into account?). Also side-issues like repopath being one folder and "blocks" being a symlink, or a different mount. etc.
  • There is no good default. A 5% of free space in a 10TiB system is inherently different from 5% in a 32GiB one. This means the setting should be customized (like MaxStorage so why adding a new option).
  • In the end, if the user cares, they can set MaxStorage and if not not. This is an equivalent of expressing the same +code +extra-dependency +os-specific handling. Not worth it.

@gammazero
Copy link
Contributor Author

Closing in favor of setting StorageMax correctly and depending on users to manage their available storage.

@gammazero gammazero closed this Jan 3, 2025
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.

GC not working - maybe due to storage capacity below limit
2 participants