duyet/clickhouse-monitoring · Archived

storage-optimization

Compression codecs, TTL policies, tiered storage, part management, and disk space optimization.

First seen Apr 19, 2026

Installation

$ npx skills add duyet/clickhouse-monitoring --skill storage-optimization

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from duyet/clickhouse-monitoring.

npx skills add duyet/clickhouse-monitoring

Browse all from duyet/clickhouse-monitoring

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 241
License LICENSE
Default branch main
Open issues 5
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,985 B
  • docs SUMMARY.md 123 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 3 installs

SKILL.md

Storage Optimization

Compression Codecs

  • Default: LZ4 — fast, moderate compression
  • ZSTD(level) — better compression, slower. Level 1-22 (3 is good default)
  • Delta + ZSTD — excellent for time-series monotonic data
  • DoubleDelta — best for timestamps and counters
  • Gorilla — optimized for floating-point gauge metrics
  • T64 — for integer columns with small range
  • Per-column: ALTER TABLE t MODIFY COLUMN col TYPE UInt32 CODEC(Delta, ZSTD(3))
  • In-place codec change: ALTER TABLE t MODIFY COLUMN col CODEC(Delta, ZSTD(3))

TTL Policies

  • Table-level: ALTER TABLE t MODIFY TTL event_time + INTERVAL 90 DAY
  • Column-level: ALTER TABLE t MODIFY COLUMN oldcol TTL eventtime + INTERVAL 30 DAY
  • Move to volume: TTL event_time + INTERVAL 7 DAY TO VOLUME 'cold'
  • Delete: TTL event_time + INTERVAL 365 DAY DELETE
  • Monitor TTL merges: system.merges WHERE isttlmerge = 1

Tiered Storage

  • Define storage policies in config: hot (SSD) → warm (HDD) → cold (S3)
  • <storage_configuration> in config.xml
  • Move rules: TTL event_time + INTERVAL 7 DAY TO DISK 'hdd'
  • Check disk usage: system.disks
  • Check volume usage: system.storage_policies

Part Management

  • Monitor part count: SELECT count() FROM system.parts WHERE active AND database = 'db' AND table = 't'
  • Too many parts (>300 per partition) = degraded performance
  • Detached parts: check system.detached_parts, clean with DROP DETACHED PART
  • Part size target: 1-10GB per part for optimal performance

Disk Space Recovery

  • DROP PARTITION for bulk deletion by time
  • TRUNCATE TABLE for full table cleanup
  • Check for orphaned data: detached parts, temporary files
  • System tables can grow large — set TTL on querylog, tracelog, etc.
  • Load the troubleshooting skill for disk-full recovery procedures.