> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-8c05c8a2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> 包含所有文件系统缓存设置的相关信息

# system.filesystem_cache_settings

<div id="description">
  ## 描述
</div>

包含所有文件系统缓存设置的相关信息

<div id="columns">
  ## 列
</div>

* `cache_name` ([String](/zh/reference/data-types/index)) — 缓存名称
* `path` ([String](/zh/reference/data-types/index)) — 缓存目录路径
* `max_size` ([UInt64](/zh/reference/data-types/index)) — 缓存最大大小
* `max_elements` ([UInt64](/zh/reference/data-types/index)) — 缓存元素最大数量，例如 File 段 (限制文件系统上的文件数量)
* `max_file_segment_size` ([UInt64](/zh/reference/data-types/index)) — 单个 File 段的最大大小
* `boundary_alignment` ([UInt64](/zh/reference/data-types/index)) — File 段对齐
* `cache_on_write_operations` ([UInt8](/zh/reference/data-types/index)) — 启用直写缓存 (在 INSERT 和 MERGE 时写入缓存)
* `cache_policy` ([String](/zh/reference/data-types/index)) — 缓存淘汰策略
* `slru_size_ratio` ([Float64](/zh/reference/data-types/index)) — SLRU 缓存策略中 protected 元素与 probationary 元素的大小比例
* `background_download_threads` ([UInt64](/zh/reference/data-types/index)) — 后台下载线程数。值为 0 时禁用后台下载
* `background_download_queue_size_limit` ([UInt64](/zh/reference/data-types/index)) — 后台下载队列大小。值为 0 时禁用后台下载
* `background_download_max_file_segment_size` ([UInt64](/zh/reference/data-types/index)) — 后台下载允许的最大大小
* `load_metadata_threads` ([UInt64](/zh/reference/data-types/index)) — 服务器启动时用于加载缓存元数据的最大线程数
* `load_metadata_asynchronously` ([UInt8](/zh/reference/data-types/index)) — 启用在服务器启动时异步加载元数据
* `keep_free_space_size_ratio` ([Float64](/zh/reference/data-types/index)) — 缓存会在后台尽力维持的空闲空间比例
* `keep_free_space_elements_ratio` ([Float64](/zh/reference/data-types/index)) — 缓存会在后台尽力维持的空闲元素比例
* `keep_free_space_remove_batch` ([UInt64](/zh/reference/data-types/index)) — 后台线程为维持空闲空间/元素比例而删除的缓存元素批次大小
* `invalidated_entries_cleanup_interval_ms` ([UInt64](/zh/reference/data-types/index)) — 后台任务清理已失效 (延迟删除) 的优先队列条目时的空闲间隔 (毫秒)
* `invalidated_entries_cleanup_threshold` ([UInt64](/zh/reference/data-types/index)) — 累积的已失效优先队列条目数量，达到该数量时会触发后台删除
* `invalidated_entries_cleanup_remove_batch` ([UInt64](/zh/reference/data-types/index)) — 每次后台迭代中，在单个写锁下删除的已失效优先队列条目最大数量
* `enable_filesystem_query_cache_limit` ([UInt8](/zh/reference/data-types/index)) — 启用对单个查询内可写入缓存的最大大小进行限制
* `cache_hits_threshold` ([UInt64](/zh/reference/data-types/index)) — 已弃用设置
* `enable_bypass_cache_with_threshold` ([UInt8](/zh/reference/data-types/index)) — 未记录在文档中。不建议使用
* `bypass_cache_threshold` ([UInt64](/zh/reference/data-types/index)) — 未记录在文档中。不建议使用
* `write_cache_per_user_id_directory` ([UInt8](/zh/reference/data-types/index)) — ClickHouse Cloud 内部设置
* `allow_dynamic_cache_resize` ([UInt8](/zh/reference/data-types/index)) — 允许动态调整文件系统缓存大小
* `dynamic_resize_lock_wait_ms` ([UInt64](/zh/reference/data-types/index)) — 在放弃本次调整大小之前，获取动态调整大小独占锁的超时时间 (毫秒)
* `max_size_ratio_to_total_space` ([Float64](/zh/reference/data-types/index)) — `max_size` 与总磁盘空间的比率
* `skip_cache_on_disk_failure` ([UInt8](/zh/reference/data-types/index)) — 如果为 true，则在发生磁盘 IO 错误时静默跳过文件系统缓存操作。如果为 false (默认) ，则磁盘 IO 错误会作为启动失败上抛。
* `use_split_cache` ([UInt8](/zh/reference/data-types/index)) — 使用将文件分为 system/data 的方式。
* `split_cache_ratio` ([Float64](/zh/reference/data-types/index)) — 在 split\_cache 中，system 部分占缓存总大小的比率。
* `overcommit_eviction_evict_step` ([UInt64](/zh/reference/data-types/index)) — overcommit 驱逐策略的驱逐步长 (以字节为单位) 。用于 keep\_free\_space\_\*\_ratio 设置
* `check_cache_probability` ([Float64](/zh/reference/data-types/index)) — 仅适用于 debug 或 sanitizer 构建。通过遍历整个缓存并检查每个缓存元素的状态来验证缓存的正确性
* `is_initialized` ([UInt8](/zh/reference/data-types/index)) — 表示缓存是否已成功初始化
* `current_size` ([UInt64](/zh/reference/data-types/index)) — 当前缓存大小
* `current_elements_num` ([UInt64](/zh/reference/data-types/index)) — 当前缓存元素 (File 段) 数量
