diff --git a/docs/buildkitd.toml.md b/docs/buildkitd.toml.md index 607c5e34baa0..71061c626868 100644 --- a/docs/buildkitd.toml.md +++ b/docs/buildkitd.toml.md @@ -62,11 +62,25 @@ insecure-entitlements = [ "network.host", "security.insecure" ] # Whether run subprocesses in main pid namespace or not, this is useful for # running rootless buildkit inside a container. noProcessSandbox = false + + # gc enables/disables garbage collection gc = true - # gckeepstorage can be an integer number of bytes (e.g. 512000000), a string - # with a unit (e.g. "512MB"), or a string percentage of the total disk - # space (e.g. "10%") - gckeepstorage = 9000 + # reservedSpace is the minimum amount of disk space guaranteed to be + # retained by this buildkit worker - any usage below this threshold will not + # be reclaimed during garbage collection. + # all disk space parameters can be an integer number of bytes (e.g. + # 512000000), a string with a unit (e.g. "512MB"), or a string percentage + # of the total disk space (e.g. "10%") + reservedSpace = "30%" + # maxUsedSpace is the maximum amount of disk space that may be used by + # this buildkit worker - any usage above this threshold will be reclaimed + # during garbage collection. + maxUsedSpace = "60%" + # minFreeSpace is the target amount of free disk space that the garbage + # collector will attempt to leave - however, it will never be bought below + # reservedSpace. + minFreeSpace = "20GB" + # alternate OCI worker binary name(example 'crun'), by default either # buildkit-runc or runc binary is used binary = "" @@ -83,26 +97,51 @@ insecure-entitlements = [ "network.host", "security.insecure" ] "foo" = "bar" [[worker.oci.gcpolicy]] - # keepBytes can be an integer number of bytes (e.g. 512000000), a string - # with a unit (e.g. "512MB"), or a string percentage of the total disk - # space (e.g. "10%") - keepBytes = "512MB" + # reservedSpace is the minimum amount of disk space guaranteed to be + # retained by this policy - any usage below this threshold will not be + # reclaimed during # garbage collection. + reservedSpace = "512MB" + # maxUsedSpace is the maximum amount of disk space that may be used by this + # policy - any usage above this threshold will be reclaimed during garbage + # collection. + maxUsedSpace = "1GB" + # minFreeSpace is the target amount of free disk space that the garbage + # collector will attempt to leave - however, it will never be bought below + # reservedSpace. + minFreeSpace = "10GB" + # keepDuration can be an integer number of seconds (e.g. 172800), or a # string duration (e.g. "48h") keepDuration = "48h" filters = [ "type==source.local", "type==exec.cachemount", "type==source.git.checkout"] [[worker.oci.gcpolicy]] all = true - keepBytes = 1024000000 + reservedSpace = 1024000000 [worker.containerd] address = "/run/containerd/containerd.sock" enabled = true platforms = [ "linux/amd64", "linux/arm64" ] namespace = "buildkit" + + # gc enables/disables garbage collection gc = true - # gckeepstorage sets storage limit for default gc profile, in bytes. - gckeepstorage = 9000 + # reservedSpace is the minimum amount of disk space guaranteed to be + # retained by this buildkit worker - any usage below this threshold will not + # be reclaimed during garbage collection. + # all disk space parameters can be an integer number of bytes (e.g. + # 512000000), a string with a unit (e.g. "512MB"), or a string percentage + # of the total disk space (e.g. "10%") + reservedSpace = "30%" + # maxUsedSpace is the maximum amount of disk space that may be used by + # this buildkit worker - any usage above this threshold will be reclaimed + # during garbage collection. + maxUsedSpace = "60%" + # minFreeSpace is the target amount of free disk space that the garbage + # collector will attempt to leave - however, it will never be bought below + # reservedSpace. + minFreeSpace = "20GB" + # maintain a pool of reusable CNI network namespaces to amortize the overhead # of allocating and releasing the namespaces cniPoolSize = 16 @@ -119,12 +158,12 @@ insecure-entitlements = [ "network.host", "security.insecure" ] options = { BinaryName = "runc" } [[worker.containerd.gcpolicy]] - keepBytes = 512000000 + reservedSpace = 512000000 keepDuration = 172800 filters = [ "type==source.local", "type==exec.cachemount", "type==source.git.checkout"] [[worker.containerd.gcpolicy]] all = true - keepBytes = 1024000000 + reservedSpace = 1024000000 # registry configures a new Docker register used for cache import or output. [registry."docker.io"]