altinity-expert-clickhouse-storage

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Storage and Disk Usage Analysis

存储与磁盘使用分析

Diagnose disk usage, compression efficiency, part sizes, and storage bottlenecks.

诊断磁盘使用情况、压缩效率、数据分片大小以及存储瓶颈。

Diagnostics

诊断步骤

Run all queries from the file checks.sql and analyze the results.

运行checks.sql文件中的所有查询并分析结果。

Ad-Hoc Query Guidelines

临时查询指南

Required Safeguards

必要的安全措施

sql
-- Always limit results
limit 100

-- For part_log
where event_date >= today() - 1
sql
-- Always limit results
limit 100

-- For part_log
where event_date >= today() - 1

Key Tables

核心表

  • system.disks
    - Disk configuration
  • system.parts
    - Part storage details
  • system.columns
    - Column compression
  • system.storage_policies
    - Tiered storage
  • system.detached_parts
    - Orphaned parts

  • system.disks
    - 磁盘配置
  • system.parts
    - 数据分片存储详情
  • system.columns
    - 列压缩信息
  • system.storage_policies
    - 分层存储策略
  • system.detached_parts
    - 孤立分片

Cross-Module Triggers

跨模块触发规则

FindingLoad ModuleReason
Poor compression
altinity-expert-clickhouse-schema
Codec recommendations
Many small parts
altinity-expert-clickhouse-merges
Merge backlog
High write IO
altinity-expert-clickhouse-ingestion
Batch sizing
System logs large
altinity-expert-clickhouse-logs
TTL configuration
Slow disk + merges
altinity-expert-clickhouse-merges
Merge optimization

发现的问题加载模块原因
压缩效果差
altinity-expert-clickhouse-schema
编码格式建议
大量小分片
altinity-expert-clickhouse-merges
合并任务积压
写入IO过高
altinity-expert-clickhouse-ingestion
批量大小调整
系统日志过大
altinity-expert-clickhouse-logs
TTL配置优化
磁盘缓慢+合并问题
altinity-expert-clickhouse-merges
合并操作优化

Settings Reference

配置参数参考

SettingNotes
min_bytes_for_wide_part
Threshold for Wide vs Compact parts
min_rows_for_wide_part
Row threshold for Wide parts
max_bytes_to_merge_at_max_space_in_pool
Max merge size
prefer_not_to_merge
Disable merges (emergency)
配置项说明
min_bytes_for_wide_part
Wide与Compact分片的阈值
min_rows_for_wide_part
Wide分片的行数阈值
max_bytes_to_merge_at_max_space_in_pool
最大合并大小
prefer_not_to_merge
禁用合并(紧急场景)