hardware-tuning

Detect ClickHouse server hardware and generate ratio-based configuration recommendations.

255|42|Updated Nov 16, 2023
One-click install
npx skills add https://github.com/chmonitor/chmonitor --skill hardware-tuning
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hardware-tuning
Source: https://github.com/chmonitor/chmonitor/tree/main/.agents/skills/hardware-tuning
Command: npx skills add https://github.com/chmonitor/chmonitor --skill hardware-tuning

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually tuning ClickHouse server settings without accounting for underlying hardware leads to suboptimal query performance, out-of-memory errors, or wasted system resources from overprovisioned configurations.

Core Features & Use Cases

  • Hardware Detection: Automatically identifies server CPU core count, total/available RAM, and disk layout directly from ClickHouse system tables, with fallbacks for version differences in metric names.
  • Ratio-Based Recommendations: Provides tailored guidance for CPU, memory, cache, and background pool settings scaled to the detected hardware, with clear explanations for each recommendation.
  • Safety & Verification: Includes guardrails to avoid overallocating resources, step-by-step verification queries to confirm changes take effect, and rollback guidance for issues like OOM errors.
  • Use Case: For a 16-core, 64GB RAM ClickHouse deployment on NVMe drives, this skill will recommend appropriate values for max_threads, max_memory_usage, and background pool sizes instead of relying on generic one-size-fits-all defaults.

Quick Start

Use the hardware-tuning skill to analyze my self-hosted ClickHouse server's hardware and get a list of recommended configuration settings tailored to my system.

Frequently Asked Questions about hardware-tuning

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize ClickHouse server settings for my specific hardware?

Optimizing ClickHouse settings for your hardware requires detecting server CPU, RAM, and disk specs from system tables to apply ratio-based recommendations for max_threads, memory, and background pool sizes, eliminating guesswork and preventing out-of-memory errors.

Why does my self-hosted ClickHouse deployment keep running out of memory?

Your self-hosted ClickHouse deployment runs out of memory when default server settings are overprovisioned relative to available RAM. Hardware tuning applies guardrails to avoid overallocating resources and provides ratio-based memory settings like max_memory_usage scaled to your detected hardware.

Does ClickHouse hardware tuning work on Docker and Kubernetes deployments?

Yes, ClickHouse hardware tuning works across all self-hosted deployment environments including Docker, Kubernetes, bare metal, and ClickHouse Cloud. It automatically identifies CPU, RAM, and disk layout from system tables with fallbacks for metric name differences across versions.

What's the best way to configure ClickHouse max_threads and background pool sizes?

The best way to configure ClickHouse max_threads and background pool sizes is using ratio-based recommendations scaled to your detected CPU core count and RAM. This avoids relying on generic one-size-fits-all defaults that cause suboptimal query performance or wasted system resources.

How do I verify ClickHouse configuration changes and rollback if performance drops?

To verify ClickHouse configuration changes and rollback if performance drops, use built-in verification queries to confirm changes take effect. This skill includes guardrails and rollback guidance for issues like out-of-memory errors to prevent service regressions.