Capacity Planning for ClickHouse Observability Workloads

capacity planning for ClickHouse observability workloads has a specific set of behaviours that show up under real load. ClickHouse capacity planning for observability comes down to estimating ingest volume, storage with compression, query concurrency, and merge headroom — and then leaving room for growth. That single sentence hides a fair amount of detail, and the rest of this piece pulls those details apart so the levers and trade-offs are visible.

The most common version of the problem is straightforward: teams size ClickHouse for steady state, do not budget headroom, and find themselves expanding the cluster under fire. That kind of issue rarely traces back to a single setting. It is usually a combination of schema, sort key, and a few small misconfigurations stacking on top of each other, and the path to fixing it starts with understanding the mechanics.

For teams running ClickHouse in production, the cost of getting ClickHouse capacity planning for observability workloads wrong is felt in tail latency, in runaway memory grants, and in the hours operators spend chasing intermittent issues. Getting it right takes some up-front investment in measurement and a willingness to revisit defaults when the workload changes.

ClickHouse Capacity Planning, ClickHouse Observability

How it actually works

Before changing any setting, it helps to walk through what ClickHouse is actually doing under the surface. The behaviour described here is not specific to one release; the broad shape has held across recent versions, and the operational implications are the same on self-managed clusters and on managed offerings.

  • Ingest volume drives raw storage; compression typically reduces it by 5x to 20x depending on data shape.
  • Retention policy multiplied by daily ingest gives the steady-state storage estimate.
  • Query concurrency drives memory and CPU; account for max_concurrent_queries and per-query memory.
  • Merges need disk headroom — usually two to three times the largest expected merge.
  • Replication multiplies storage by the replica count.

Each of those steps has its own characteristic cost, and the slow ones tend to be the ones that show up in p95 and p99 latency. That is why the rest of this piece focuses on the levers that actually move those percentiles, rather than on micro-optimisations that look good in synthetic tests but rarely survive contact with production workloads.

Settings that actually matter

The configuration surface in ClickHouse is broad, and most of it does not need to be touched in a typical deployment. The settings below are the ones worth understanding because they shape behaviour directly under load. Defaults work for small workloads; the right values for production are usually different.

Setting Suggested value Notes
daily_ingest_gb Pre-compression.
compression_ratio 5-20 Workload dependent.
retention_days From policy.
replica_factor 2-3 HA depends on replicas.
max_concurrent_queries 100 Per-server concurrency cap.
background_pool_size 16 Merge throughput.

None of these are universal. The right number on a node with sixty-four cores and NVMe is not the right number on a smaller VM with attached storage, and the right number for an analytics workload differs from a streaming ingestion workload. The values above are starting points, not endpoints.

ClickHouse SQL examples

The SQL below shows the pattern in concrete terms. It is meant to be read alongside the explanation, not copied verbatim into a production script.

-- Compression ratio per table
SELECT database, table,
       formatReadableSize(sum(data_compressed_bytes)) AS compressed,
       formatReadableSize(sum(data_uncompressed_bytes)) AS raw,
       round(sum(data_uncompressed_bytes) / nullif(sum(data_compressed_bytes), 0), 2) AS ratio
FROM system.parts WHERE active
GROUP BY database, table
ORDER BY sum(data_compressed_bytes) DESC LIMIT 20;

ClickHouse Capacity Planning

Tuning approach that works in practice

The list below is the order most operators converge on when tuning capacity planning for ClickHouse observability workloads. It is not a recipe; the right answer depends on the workload. But it is a defensible sequence: each step is cheap to verify, and each one has a measurable effect when the change matters.

  1. Project storage from a representative ingest sample; do not extrapolate from defaults.
  2. Leave 30-50% disk headroom for merges, peaks, and recovery.
  3. Size memory for the worst legitimate query, not the average.
  4. Plan replicas before sharding; HA is the first failure mode you face.

Each change should be measured against the metrics that matter — usually p95 latency at a target throughput, plus query log statistics and CPU behaviour. Changes that do not move those numbers are not actually changes; they are configuration churn.

What to look at first

When something goes wrong with capacity planning for ClickHouse observability workloads, the first move is usually a handful of system table queries. The objects below are the ones that produce useful output fast, without needing a full monitoring pipeline to interpret.

Object What it shows
system.parts Active and inactive data parts per table, with row counts, bytes on disk, and merge state.
system.metrics Live counters such as Query, Merge, BackgroundPoolTask, and many others.
system.events Cumulative event counters: SelectQuery, Insert, FailedQuery, MarkCacheHits, etc.

Guardrails worth setting up

Tuning without monitoring is guesswork. The signals listed below are the ones that catch problems early enough to act on, and most production clusters end up alerting on a similar shortlist whether they planned to or not.

  • Forecast disk fill date weekly; alert when it dips below a threshold (e.g. 60 days).
  • Track 95th-percentile concurrency; if it approaches max_concurrent_queries, capacity is tight.
  • Monitor merge backlog as a leading indicator.

Pitfalls that show up repeatedly

The same handful of mistakes appears across cluster after cluster. Most of them are easier to avoid than to fix, and the cost of getting them wrong tends to compound — what starts as a small misconfiguration becomes a real incident weeks later when the workload grows.

  • Sizing for steady state with no peak headroom.
  • Forgetting that observability traffic is itself bursty; logs surge during incidents.
  • Ignoring replica multiplier; storage budget triples without it.

None of those are exotic. They show up in code reviews, in postmortems, and occasionally in vendor support tickets, and the operational habit of catching them early is worth more than any single configuration change.

Frequently asked questions

A handful of questions come up every time this topic is discussed. The answers below are the ones that hold up across most production deployments; the exceptions are usually visible in the metrics.

How big should each node be?

Modern observability deployments often use 32-64 cores and 128-512 GB RAM with NVMe disks. Size around the workload.

Should I use object storage?

For cold tiers, yes. Hot tier is almost always local NVMe.

How many replicas?

At least two; three for stronger availability.

Is more shards always better?

No. Shards add coordination overhead. Add them only when measurements demand.

How do I plan for spikes?

Run buffers (Kafka, async_insert) ahead of ClickHouse; observability spikes are unforgiving without them.

Configuration changes that are documented and reversible are easier to live with than ones that are not. Even small changes are worth recording with the date, the reason, and the before-and-after metric, because the same change is likely to come up again in a future incident or capacity review.

Behind every ClickHouse cluster there is a team that owns it, and the team’s habits matter as much as the configuration. Clear runbooks, clear ownership, and unambiguous SLOs do more for reliability than any single tuning decision, and they are what make tuning sustainable over time.

Monitoring decisions tend to follow tuning decisions: once a setting is in place, the metrics that prove it is working become the ongoing signal that triggers the next change. Without that loop, a tuned cluster drifts back toward defaults whenever workload changes nudge it that way, and the work has to be redone.

The query log is one of the most useful diagnostic surfaces in ClickHouse, and the retention policy applied to it determines how far back a team can look during a postmortem. A few weeks of retention is the minimum that supports root-cause analysis on slow-developing problems, and many teams hold it for longer.

A baseline taken once and never refreshed is rarely useful for long. The values that define normal on a ClickHouse cluster shift as data grows, as queries are added, and as schema evolves. Periodically refreshing baselines and comparing to historical trends gives the team something concrete to react to when behaviour changes.

ClickHouse rarely operates in isolation. It sits inside a larger data platform with its own monitoring, deployment, and incident workflows, and the engine’s performance characteristics interact with those workflows in ways that are easy to miss. Treating ClickHouse as part of a system, rather than a standalone service, generally produces better outcomes.

Hardware specifications change as nodes are replaced and infrastructure is upgraded. A configuration that fit a previous generation of disks or CPUs may underperform on the next, and revisiting tuning decisions when hardware changes is part of routine operations rather than an exceptional event.

Part count is a quiet failure mode: the cluster keeps working as parts accumulate, and then suddenly latency spikes or a merge thread saturates. Watching part count per partition and tying it to ingestion rate is a small habit that catches the problem long before it becomes an incident.

Teams that want a deeper look at capacity planning for ClickHouse observability workloads can review ChistaDATA’s observability articles, or contact ChistaDATA about ClickHouse support for production engagements.

Putting it together

Teams that handle capacity planning for ClickHouse observability workloads well treat it as ongoing work, not a one-time configuration exercise. The defaults ClickHouse ships with are reasonable starting points but rarely the right answer for a specific workload, and the difference between a cluster that holds its SLOs and one that struggles is often the willingness to measure first and tune second.

The work is rarely finished, but it is also not as mysterious as it sometimes feels: a small number of mechanisms drive most of the behaviour, and the levers that matter are mostly the ones described above.

You might also like:

About ChistaDATA Inc. 207 Articles
We are an full-stack ClickHouse infrastructure operations Consulting, Support and Managed Services provider with core expertise in performance, scalability and data SRE. Based out of California, Our consulting and support engineering team operates out of San Francisco, Vancouver, London, Germany, Russia, Ukraine, Australia, Singapore and India to deliver 24*7 enterprise-class consultative support and managed services. We operate very closely with some of the largest and planet-scale internet properties like PayPal, Garmin, Honda cars IoT project, Viacom, National Geographic, Nike, Morgan Stanley, American Express Travel, VISA, Netflix, PRADA, Blue Dart, Carlsberg, Sony, Unilever etc