ClickHouse on dedicated servers

ClickHouse scans billions of rows a second by reading only the columns a query needs and using every core. On a dedicated machine all those cores and all that disk bandwidth are yours.

What is ClickHouse good at?

Analytical queries over very large tables: product analytics, web and app events, logs, metrics, financial ticks and observability data. It is a columnar database under the Apache 2.0 licence, compresses data heavily, and parallelises each query across all cores. It is not designed for frequent single-row updates; it shines when data arrives in batches and is read in aggregate.

How do I install it?

From the project's package repository for Debian, Ubuntu or the EL family. The server listens on 8123 for HTTP and 9000 for the native protocol; keep both on localhost or a tunnel until users and passwords are set.

apt install clickhouse-server clickhouse-client
systemctl enable --now clickhouse-server
clickhouse-client --password

How should tables be designed?

Around the sort key. A MergeTree table stores data sorted by its ORDER BY columns, and a sparse primary index lets queries skip everything outside the range they filter on. Put the columns you filter on most first, from low to high cardinality. Partition by month or day to make dropping old data cheap, not to speed up queries.

CREATE TABLE events
(
    site_id   UInt32,
    ts        DateTime64(3) CODEC(Delta, ZSTD(3)),
    user_id   UInt64,
    event     LowCardinality(String),
    url       String CODEC(ZSTD(6)),
    duration  UInt32 CODEC(T64, ZSTD(1))
)
ENGINE = MergeTree
PARTITION BY toYYYYMM(ts)
ORDER BY (site_id, event, ts)
TTL toDateTime(ts) + INTERVAL 30 DAY TO VOLUME 'cold', toDateTime(ts) + INTERVAL 400 DAY DELETE;

Column codecs such as Delta for timestamps and LowCardinality for repeated strings often bring compression to ten times or better.

How can NVMe and hard drives work together?

With a storage policy that defines a hot volume on NVMe and a cold volume on hard drives. The table's TTL moves parts to the cold volume after a set age. Storage models combine both kinds of drive in one machine, so recent data answers from NVMe while years of history sit on large drives.

<storage_configuration>
  <disks>
    <nvme><path>/nvme/clickhouse/</path></nvme>
    <hdd><path>/hdd/clickhouse/</path></hdd>
  </disks>
  <policies><tiered><volumes>
    <hot><disk>nvme</disk></hot>
    <cold><disk>hdd</disk></cold>
  </volumes></tiered></policies>
</storage_configuration>

Set SETTINGS storage_policy = 'tiered' on the table to use it.

What sets the memory budget of a ClickHouse server?

Enough for the largest aggregations and joins, plus the page cache for hot parts. The server limits its own use with max_server_memory_usage_to_ram_ratio, 0.9 by default, and each query with max_memory_usage. Large GROUP BY queries can spill to disk with max_bytes_before_external_group_by. For most analytics, 64 to 128 GB per server is comfortable; heavy joins on high-cardinality keys want more.

How do replicas work?

With ReplicatedMergeTree tables and ClickHouse Keeper, a built-in Raft coordination service that replaces ZooKeeper. Run three Keeper instances, often on the same machines as the servers, on ports 9181 for clients and 9234 for Raft. Replicas fetch parts from each other over the interserver port 9009. Keep all of this on a WireGuard mesh, since the servers connect over public ports.

Which machines fit?

UseMachineWhy
Product analytics, a few TBESSENTIAL-524 cores, 128 GB DDR4
Fast scans on NVMeESSENTIAL-XLZen 5 cores, 2x 1.92 TB SSD NVMe, Soft RAID
Hot NVMe plus cold historySTORAGE-2 20262x 960 GB SSD NVMe (system) + 2x 24 TB HDD SAS, Soft RAID
Large event archivesSTORAGE-3 202616 cores, 386 TB raw

ESSENTIAL-5 offers 24 cores and 128 GB DDR4 for $120.00 a month, ample for billions of rows. Back up with BACKUP TABLE ... TO Disk(...) or to an S3-compatible store, and keep the copies on another machine. Our Big data and analytics page covers wider analytics platforms.

Machines for ClickHouse

Lowest monthly price of each model across its data centres; the model page shows the price in every location.

ModelProcessorCoresMemoryDrivesPortPer month
ESSENTIAL-5AMD EPYC 741324128 GB2x 960 GB SSD NVMe1 Gbps unmetered$120.00
ESSENTIAL-8AMD EPYC 753232256 GB2x 480 GB SSD SATA1 Gbps unmetered$126.60
ESSENTIAL-XLAMD EPYC TURIN 945548128 GB2x 1.92 TB SSD NVMe1 Gbps unmetered$212.40
BUSINESS-5 2026INTEL Xeon 6527P24128 GB2x 960 GB SSD NVMe3 Gbps unmetered$406.20
STORAGE-2 2026AMD EPYC 4345P832 GB2x 960 GB SSD NVMe + 2x 24 TB HDD SAS3 Gbps unmetered$273.00
STORAGE-3 2026AMD EPYC 913516128 GB2x 1 TB SSD NVMe + 16x 24 TB HDD SAS10 Gbps unmetered$1,468.80

Cores speed every query; Storage models keep years of history on large drives.

See all servers and prices

Related pages

Big data and analytics

High core EPYC machines and dense disk chassis for Spark, ClickHouse and data lake clusters.

Read more

InfluxDB servers

Run InfluxDB for metrics and sensor data on bare metal: versions 1, 2 and 3 compared, Telegraf collection, retention, cardinality and disk sizing.

Read more

Storage servers

High capacity hard disk servers from 44 TB to 576 TB raw.

from $109.80 a monthRead more

Database servers

NVMe machines with large memory for PostgreSQL, MySQL, MariaDB and MongoDB, from a single primary to replicated pairs.

Read more

Questions and answers

How should I choose a ClickHouse ORDER BY key?

Put the columns you filter on most first, ordered from low to high cardinality, so the sparse index can skip most data.

Can ClickHouse use NVMe and hard drives together?

Yes. A storage policy with hot and cold volumes plus a table TTL moves older parts from NVMe to hard drives automatically.

Which ports does ClickHouse use?

8123 for HTTP, 9000 for the native protocol, 9009 between replicas, and 9181 and 9234 for ClickHouse Keeper.

Does ClickHouse still need ZooKeeper?

No. ClickHouse Keeper, a built-in Raft service, coordinates replicated tables; run three instances.

What RAM suits a ClickHouse analytics server?

64 to 128 GB covers most analytics; heavy joins and high-cardinality aggregations benefit from more.