---
title: "Announcing Silk: a silky smooth fiber runtime for ClickHouse"
description: "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."
url: "https://swe.quest/articles/announcing-silk-a-silky-smooth-fiber-runtime-for-clickhouse-bd3ca633b291b6b6"
canonical: "https://clickhouse.com/blog/silk"
source: "ClickHouse"
published: "2026-06-25"
difficulty: "hard"
kind: "Announcement"
reading_minutes: 11
tags: ["concurrency","runtimes","c-cpp","performance","linux"]
---

# Announcing Silk: a silky smooth fiber runtime for ClickHouse

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2026-06-25, 11 min read, Announcement. Original: [https://clickhouse.com/blog/silk](https://clickhouse.com/blog/silk)

## Summary

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. Its benchmarks report about 3.6 ns per yield, 5.9M file IOPS and roughly 4-15x boost::asio throughput, and it argues that Photon's cache-aliasing penalty comes from slab-allocated stacks rather than from stackful fibers. The tradeoffs are that it runs only on Linux, uses a process-wide singleton scheduler and caps fiber parameters at 64 bytes. Its first target is ClickHouse's distributed cache, where internal tests showed about 65% better p99.9 latency than a thread pool.

Written by swe.quest, not by the author.

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

## Topics

- [Concurrency](https://swe.quest/tags/concurrency.md) (Compilers & runtimes)
- [Runtimes & VMs](https://swe.quest/tags/runtimes.md) (Compilers & runtimes)
- [C & C++](https://swe.quest/tags/c-cpp.md) (Languages)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Linux](https://swe.quest/tags/linux.md) (Infrastructure)

## Prerequisites

- C++ concurrency and memory ordering ([easy posts on C & C++](https://swe.quest/tags/c-cpp.md?difficulty=easy))
- io\_uring basics
- NUMA and CPU topology ([easy posts on Hardware](https://swe.quest/tags/hardware.md?difficulty=easy))
- coroutines vs threads

## Keywords

Silk, ClickHouse, io\_uring, Cilk, Photon, boost::asio, rseq, C++20 coroutines

## Related posts

- [Optimizing ClickHouse for Intel's ultra-high core count processors](https://swe.quest/articles/optimizing-clickhouse-for-intel-s-ultra-high-core-count-processors-93479313e687f95e.md): ClickHouse · 2025-09-17 · Hard · 22 min read · Performance engineering, Concurrency, Memory management, Analytics & OLAP, Hardware
  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.
- [Designing the new async-native ClickHouse Python client](https://swe.quest/articles/designing-the-new-async-native-clickhouse-python-client-686db4668ab2ae45.md): ClickHouse · 2026-03-16 · Medium · 12 min read · Python, Concurrency, Performance engineering, Databases
  The new async-native clickhouse-connect client replaces the legacy thread-pool wrapper with aiohttp for network I/O and a half-sync/half-async design: an async producer streams response chunks into a bounded queue (10 chunks of up to 1MB) while the existing synchronous Native-format parser consumes them in an executor thread, with the same queue reversed for inserts.
- [To Thread or Not to Thread: An In-Depth Look at Ruby’s Execution Models](https://swe.quest/articles/to-thread-or-not-to-thread-an-in-depth-look-at-ruby-s-execution-models-18ca691643d5cc44.md): Shopify Engineering · 2022-05-31 · Medium · 15 min read · Ruby, Concurrency, Memory management, Performance engineering, Runtimes & VMs
  Threaded Ruby servers like Puma and Sidekiq save memory over forking servers, but the gap is smaller than RSS suggests once copy-on-write sharing is measured properly with PSS and /proc/$PID/smaps\_rollup.
- [Large-scale distributed builds with Microsoft Build Accelerator](https://swe.quest/articles/large-scale-distributed-builds-with-microsoft-build-accelerator-9baa9a7436e8437c.md): Engineering@Microsoft · 2021-08-18 · Easy · 4 min read · Build systems, Developer productivity, Caching
  Microsoft's BuildXL distributes and caches builds for its largest codebases.
- [Building ClickCannon - a tool for benchmarking ClickHouse](https://swe.quest/articles/building-clickcannon-a-tool-for-benchmarking-clickhouse-15503a1f117264f6.md): ClickHouse · 2026-06-11 · Medium · 16 min read · Performance engineering, Go, Analytics & OLAP, Observability, Concurrency
  ClickCannon is an open-source Go tool for benchmarking ClickHouse insert and query workloads, built to produce hardware sizing recommendations for ClickStack observability deployments.

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)
