跳转到主内容
跳转到主内容

system.filesystem_cache_settings

描述

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

  • cache_name (String) — 缓存名称
  • path (String) — 缓存目录路径
  • max_size (UInt64) — 缓存最大大小
  • max_elements (UInt64) — 缓存元素的最大数量,例如 File 段 (限制文件系统上的文件数量)
  • max_file_segment_size (UInt64) — 单个 File 段的最大大小
  • boundary_alignment (UInt64) — File 段对齐方式
  • cache_on_write_operations (UInt8) — 启用写穿缓存 (在 INSERT 和 MERGE 时写入缓存)
  • cache_policy (String) — 缓存淘汰策略
  • slru_size_ratio (Float64) — SLRU 缓存策略中,受保护元素与试用元素的大小比例
  • background_download_threads (UInt64) — 后台下载线程数。值为 0 时禁用后台下载
  • background_download_queue_size_limit (UInt64) — 后台下载队列大小。值为 0 时禁用后台下载
  • background_download_max_file_segment_size (UInt64) — 可通过后台下载下载的最大大小
  • load_metadata_threads (UInt64) — 服务器启动时用于加载缓存元数据的最大线程数
  • load_metadata_asynchronously (UInt8) — 启用在服务器启动时异步加载元数据
  • keep_free_space_size_ratio (Float64) — 缓存在后台尝试维持的空闲空间比例
  • keep_free_space_elements_ratio (Float64) — 缓存在后台尝试维持的空闲元素比例
  • keep_free_space_remove_batch (UInt64) — 用于维持空闲空间/元素比例的后台线程每次删除缓存元素的批次大小
  • enable_filesystem_query_cache_limit (UInt8) — 启用对单个查询可写入缓存的最大大小的限制
  • cache_hits_threshold (UInt64) — 已弃用设置
  • enable_bypass_cache_with_threshold (UInt8) — 未在文档中说明。不建议使用
  • bypass_cache_threshold (UInt64) — 未在文档中说明。不建议使用
  • write_cache_per_user_id_directory (UInt8) — ClickHouse Cloud 内部设置
  • allow_dynamic_cache_resize (UInt8) — 允许动态调整文件系统缓存大小
  • max_size_ratio_to_total_space (Float64) — max_size 与磁盘总空间的比例
  • skip_cache_on_disk_failure (UInt8) — 如果为 true,则在发生磁盘 IO 错误时静默跳过文件系统缓存操作。如果为 false (默认) ,则磁盘 IO 错误会作为启动失败向上传播。
  • use_split_cache (UInt8) — 使用 system/data 分离的文件方式。
  • split_cache_ratio (Float64) — 在 split_cache 中,system 分段占缓存总大小的比例。
  • overcommit_eviction_evict_step (UInt64) — overcommit 淘汰策略的淘汰步长 (以字节为单位) 。用于 keep_free_space_*_ratio 设置
  • check_cache_probability (Float64) — 仅适用于调试或 sanitizer 构建。通过遍历整个缓存并检查每个缓存元素的状态来验证缓存的正确性
  • is_initialized (UInt8) — 指示缓存是否已成功初始化
  • current_size (UInt64) — 当前缓存大小
  • current_elements_num (UInt64) — 当前缓存元素 (File 段) 数量