---
title: "Announcing Silk: a silky smooth fiber runtime for ClickHouse"
description: "Silk is a C++ stackful-fiber library and scheduler created for ClickHouse’s highly concurrent, I/O-bound components, including object-storage I/O, distributed cache lookups, replica coordination, and HTTP fan-out. Its design combines one pinned OS scheduler thread per CPU, NUMA-aware work stealing, io_uring for asynchronous I/O and timers, and zero heap allocation in the steady-state hot path; fiber stacks are mmap’d from per-fiber pools with guard pages, while runtime containers are intrusive. The post reports benchmarks including roughly 3.6-nanosecond fiber yields with cross-CPU stealing, 5.9 million file IOPS in a working configuration, and about fifteen times boost::asio’s throughput at one connection. At 10,000 concurrent S3-style requests, internal measurements showed a roughly 65% improvement in 99.9th-percentile latency versus an equivalent thread-pool executor, with identical median throughput; distributed cache is the first intended ClickHouse integration."
---

# Announcing Silk: a silky smooth fiber runtime for ClickHouse

[Clickhouse](https://yomu.fyi/company/clickhouse) · Jun 25, 2026

**Type:** Announcement

## Summary

Silk is a C++ stackful-fiber library and scheduler created for ClickHouse’s highly concurrent, I/O-bound components, including object-storage I/O, distributed cache lookups, replica coordination, and HTTP fan-out. Its design combines one pinned OS scheduler thread per CPU, NUMA-aware work stealing, io\_uring for asynchronous I/O and timers, and zero heap allocation in the steady-state hot path; fiber stacks are mmap’d from per-fiber pools with guard pages, while runtime containers are intrusive. The post reports benchmarks including roughly 3.6-nanosecond fiber yields with cross-CPU stealing, 5.9 million file IOPS in a working configuration, and about fifteen times boost::asio’s throughput at one connection. At 10,000 concurrent S3-style requests, internal measurements showed a roughly 65% improvement in 99.9th-percentile latency versus an equivalent thread-pool executor, with identical median throughput; distributed cache is the first intended ClickHouse integration.

## Context

ClickHouse’s existing thread-based concurrency model suits long-running query computation, but the engine also contains highly concurrent, I/O-bound workloads whose performance is shaped by 99th- and 99.9th-percentile latency. The stated targets include object-storage I/O, distributed cache lookups, replica coordination, and HTTP fan-out.

## Approach / What changed

Silk provides stackful fibers with cooperative scheduling, one pinned scheduler thread per CPU, NUMA-aware work stealing, io\_uring as the I/O ground truth, and a steady-state hot path without heap allocation. It includes a benchmark harness, GDB extension, and BPF profiler. Fiber stacks are mmap’d from per-fiber pools with guard pages, and runtime containers use intrusive fields.

## Takeaways

- Silk’s topology-aware stealing orders candidates by estimated cost: hyperthread siblings, same-socket cores, then cross-socket cores, with randomization within each tier.
- The reported benchmarks include roughly 3.6 nanoseconds per fiber yield with cross-CPU work stealing, 7.6 microseconds for an io\_uring ping-pong, and 5.9 million file IOPS in a working configuration.
- At 10,000 concurrent S3-style requests, internal benchmarks reported roughly 65% better 99.9th-percentile latency than an equivalent thread-pool executor, while median throughput was identical.

**Tags:** [Architecture](https://yomu.fyi/topic/architecture), [Open Source](https://yomu.fyi/topic/open-source), [Performance](https://yomu.fyi/topic/performance), [Scalability](https://yomu.fyi/topic/scalability)

- Source: [Clickhouse](https://clickhouse.com/blog/silk)
- Source URL: https://clickhouse.com/blog/silk
- Ingested by Yomu: 2026-08-29T01:36:49.292Z

[Read original post](https://clickhouse.com/blog/silk)
