---
title: "Optimizing ClickHouse for Intel's ultra-high core count processors"
description: "Intel engineers profiled all 43 ClickBench queries on 160–480 vCPU Xeon systems and landed a series of ClickHouse optimizations targeting lock contention, memory management and other scaling bottlenecks."
url: "https://swe.quest/articles/optimizing-clickhouse-for-intel-s-ultra-high-core-count-processors-93479313e687f95e"
canonical: "https://clickhouse.com/blog/optimizing-clickhouse-intel-high-core-count-cpu"
source: "ClickHouse"
published: "2025-09-17"
difficulty: "hard"
kind: "Case study"
reading_minutes: 22
tags: ["performance","concurrency","memory-management","analytics","hardware"]
---

# Optimizing ClickHouse for Intel's ultra-high core count processors

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2025-09-17, 22 min read, Case study. Original: [https://clickhouse.com/blog/optimizing-clickhouse-intel-high-core-count-cpu](https://clickhouse.com/blog/optimizing-clickhouse-intel-high-core-count-cpu)

## Summary

Intel engineers profiled all 43 ClickBench queries on 160–480 vCPU Xeon systems and landed a series of ClickHouse optimizations targeting lock contention, memory management and other scaling bottlenecks. Examples include double-checked locking with shared locks in the query condition cache (spinlock time cut from 76% to 1%, Q10/Q11 up ~85–89%), thread-local profiler timers, and raising jemalloc's lg\_extent\_max\_active\_fit to 8 to match two-level hash table reuse (Q35 up 96%, page faults down 71%). Individual fixes gave up to 10x on single queries and 2–10% geomean gains each, all merged upstream.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Concurrency](https://swe.quest/tags/concurrency.md) (Compilers & runtimes)
- [Memory management](https://swe.quest/tags/memory-management.md) (Compilers & runtimes)
- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [Hardware](https://swe.quest/tags/hardware.md) (Infrastructure)

## Prerequisites

- C++ concurrency primitives ([easy posts on C & C++](https://swe.quest/tags/c-cpp.md?difficulty=easy))
- memory allocators ([easy posts on Memory management](https://swe.quest/tags/memory-management.md?difficulty=easy))
- CPU cache coherence ([easy posts on Hardware](https://swe.quest/tags/hardware.md?difficulty=easy))
- profiling with perf ([easy posts on Performance engineering](https://swe.quest/tags/performance.md?difficulty=easy))

## Keywords

ClickHouse, ClickBench, jemalloc, Intel Xeon, Granite Rapids, Sierra Forest, Intel VTune

## Related posts

- [Running ClickHouse on NVIDIA Vera CPU: Is your favorite database up to the challenge?](https://swe.quest/articles/running-clickhouse-on-nvidia-vera-cpu-is-your-favorite-database-up-to-the-2e92c798f70f3113.md): ClickHouse · 2026-10-21 · Medium · 12 min read · Performance engineering, Query engines, Hardware, Analytics & OLAP
  ClickHouse, run unmodified on NVIDIA's early-access Vera CPU (2×88 Arm Olympus cores, 352 SMT threads, ~1.2 TB/s memory bandwidth), topped the ClickBench hardware leaderboard.
- [ClickHouse Cloud on Google Cloud Now Powered by Google Axion Processors: 30–55% Faster Queries, ~15% Fewer Compute Credits](https://swe.quest/articles/clickhouse-cloud-on-google-cloud-now-powered-by-google-axion-processors-30-55-c5e0059b06f012b1.md): ClickHouse · 2026-04-22 · Easy · 5 min read · Hardware, Performance engineering, Cloud platforms, Analytics & OLAP, Cost optimization
  ClickHouse Cloud is migrating its Google Cloud fleet from x86 N2D instances to Arm-based Axion C4A instances, yielding 30–55% faster queries across all 43 ClickBench queries, roughly halved load times, and first place on the combined ClickBench ranking.
- [How ClickHouse became fast at joins](https://swe.quest/articles/how-clickhouse-became-fast-at-joins-68de042e0ff6c22e.md): ClickHouse · 2026-06-03 · Hard · 15 min read · Query engines, Analytics & OLAP, Performance engineering, SQL
  ClickHouse became 26× faster on the join-heavy TPC-H SF100 workload between 22.4 and 26.4.
- [Announcing Silk: a silky smooth fiber runtime for ClickHouse](https://swe.quest/articles/announcing-silk-a-silky-smooth-fiber-runtime-for-clickhouse-bd3ca633b291b6b6.md): ClickHouse · 2026-06-25 · Hard · 11 min read · Concurrency, Runtimes & VMs, C & C++, Performance engineering, Linux
  Silk is a C++ stackful-fiber runtime for ClickHouse. It pins one scheduler thread per CPU, uses io\_uring as its I/O foundation, steals work in order of CPU topology cost (hyperthread sibling, then same socket, then cross-socket), and does zero heap allocation in the steady-state hot path through mmap'd stack pools, stack-resident futures and intrusive containers.
- [Parallelizing ClickHouse aggregation merge for fixed hash map](https://swe.quest/articles/parallelizing-clickhouse-aggregation-merge-for-fixed-hash-map-9fc83cd0ed214dc7.md): ClickHouse · 2025-12-16 · Hard · 6 min read · Query engines, Performance engineering, Concurrency, Memory management, C & C++
  ClickHouse 25.11 parallelizes the merge phase for GROUP BY on 8- and 16-bit keys, which use an array-backed FixedHashMap.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
