From 6a6216ee9ced7f12bff6346eaece91bbaaf8e852 Mon Sep 17 00:00:00 2001 From: Weiwei Date: Fri, 27 Sep 2024 14:15:58 +0800 Subject: [PATCH] docs: add docs for cache size suggestion (#1125) * docs: add docs for cache size suggestion Signed-off-by: zwwhdls * Update docs/en/guide/resource-optimization.md Co-authored-by: Caitin <34535727+CaitinChen@users.noreply.github.com> --------- Signed-off-by: zwwhdls Co-authored-by: Caitin <34535727+CaitinChen@users.noreply.github.com> --- docs/en/guide/resource-optimization.md | 6 ++++++ docs/zh_cn/guide/resource-optimization.md | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/docs/en/guide/resource-optimization.md b/docs/en/guide/resource-optimization.md index 3f0b9edc2e..76be14322c 100644 --- a/docs/en/guide/resource-optimization.md +++ b/docs/en/guide/resource-optimization.md @@ -182,6 +182,12 @@ storageClasses: memory: "5Gi" ``` +## Set reasonable cache size for Mount Pod {#set-reasonable-cache-size-for-mount-pod} + +[Node-pressure eviction](https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction) is usually set in a Kubernetes cluster. `nodefs.available` is the available disk space of the node's root file system. The default cache size of JuiceFS is 100GiB. `free-space-ratio`, the minimum free space ratio of the default cache directory, is 0.1. The default cache size is likely to trigger node eviction. It is recommended to set a reasonable cache size according to the actual disk space of the node. + +Cache size `cache-size` and the minimum free space ratio `free-space-ratio` of the cache directory can be set in mount options, see [Mount Options](./configurations.md#mount-options) for details. + ## Set non-preempting PriorityClass for Mount Pod {#set-non-preempting-priorityclass-for-mount-pod} :::tip diff --git a/docs/zh_cn/guide/resource-optimization.md b/docs/zh_cn/guide/resource-optimization.md index fcd3517a6e..e018119c53 100644 --- a/docs/zh_cn/guide/resource-optimization.md +++ b/docs/zh_cn/guide/resource-optimization.md @@ -204,6 +204,12 @@ storageClasses: memory: "5Gi" ``` +## 为 Mount Pod 设置合理的缓存大小 {#set-reasonable-cache-size-for-mount-pod} + +在云环境中,节点通常会设置[驱逐信号](https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction),其中 `nodefs.available` 为节点的根文件系统的可用磁盘空间。JuiceFS 默认缓存大小为 100GiB,默认的缓存目录的最小剩余空间占比 `free-space-ratio` 为 0.1,默认的缓存大小很可能触发节点驱逐。建议根据节点的实际磁盘空间,设置合理的缓存大小。 + +缓存大小 `cache-size` 和缓存目录的最小剩余空间占比 `free-space-ratio` 可以在挂载参数中设置,具体参考[挂载参数](./configurations.md#mount-options)一节。 + ## 为 Mount Pod 设置非抢占式 PriorityClass {#set-non-preempting-priorityclass-for-mount-pod} :::tip 提示