Skip to content

Commit

Permalink
docs: add docs for cache size suggestion (#1125)
Browse files Browse the repository at this point in the history
* docs: add docs for cache size suggestion

Signed-off-by: zwwhdls <[email protected]>

* Update docs/en/guide/resource-optimization.md

Co-authored-by: Caitin <[email protected]>

---------

Signed-off-by: zwwhdls <[email protected]>
Co-authored-by: Caitin <[email protected]>
  • Loading branch information
zwwhdls and CaitinChen authored Sep 27, 2024
1 parent c3f59fa commit 6a6216e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/en/guide/resource-optimization.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions docs/zh_cn/guide/resource-optimization.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 提示
Expand Down

0 comments on commit 6a6216e

Please sign in to comment.