---
title: "Why OpenAI chose ClickHouse for petabyte-scale observability"
description: "OpenAI ingests petabytes of logs daily, growing over 20% monthly, into a ClickHouse cluster of 90 shards with two replicas each, fed by Fluent Bit agents."
url: "https://swe.quest/articles/why-openai-chose-clickhouse-for-petabyte-scale-observability-dd57167d0fc8c4cb"
canonical: "https://clickhouse.com/blog/why-openai-uses-clickhouse-for-petabyte-scale-observability"
source: "ClickHouse"
published: "2025-06-30"
difficulty: "medium"
kind: "Case study"
reading_minutes: 6
tags: ["observability","performance","analytics","scalability","data-structures"]
---

# Why OpenAI chose ClickHouse for petabyte-scale observability

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2025-06-30, 6 min read, Case study. Original: [https://clickhouse.com/blog/why-openai-uses-clickhouse-for-petabyte-scale-observability](https://clickhouse.com/blog/why-openai-uses-clickhouse-for-petabyte-scale-observability)

## Summary

OpenAI ingests petabytes of logs daily, growing over 20% monthly, into a ClickHouse cluster of 90 shards with two replicas each, fed by Fluent Bit agents. Recent data stays on local disk because about 80% of queries touch the last two days, and older logs tier to blob storage. ClickHouse was chosen for being open source, horizontally scalable, tunable in its indexing and queryable in SQL. When the GPT-4o image generation launch raised log volume 50% overnight, the team added a query-only replica and sampled logs, then profiled ClickHouse and found more than half of CPU time going to Bloom filter construction. Replacing a per-insert division with a multiply and bit shift cut CPU usage 40%, and the fix was upstreamed.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [Scaling](https://swe.quest/tags/scalability.md) (Distributed systems)
- [Data structures](https://swe.quest/tags/data-structures.md) (Architecture & design)

## Prerequisites

- columnar databases ([easy posts on Databases](https://swe.quest/tags/databases.md?difficulty=easy))
- Bloom filters
- log ingestion pipelines

## Keywords

ClickHouse, OpenAI, Fluent Bit, Bloom filter, GPT-4o, ClickStack

## Related posts

- [How we made ClickStack 5x faster for ClickHouse observability](https://swe.quest/articles/how-we-made-clickstack-5x-faster-for-clickhouse-observability-ed934241e77977aa.md): ClickHouse · 2026-07-02 · Hard · 22 min read · Observability, Analytics & OLAP, Performance engineering, Query engines, Storage engines
  ClickStack's OpenTelemetry logs schema, inherited from the ClickHouse exporter for the OTel Collector, was reworked through a benchmark-driven process.
- [How Canva achieved 10x faster search and 70% lower costs with ClickHouse](https://swe.quest/articles/how-canva-achieved-10x-faster-search-and-70-lower-costs-with-clickhouse-40e415ef239059a0.md): ClickHouse · 2025-12-01 · Medium · 7 min read · Observability, Analytics & OLAP, Cost optimization, Performance engineering, Databases
  Canva moved tracing and logging (about 3 million spans and 3 million logs per second) onto a self-managed ClickHouse cluster of 5 shards × 3 replicas on Kubernetes.
- [Clever ingests 200x more logs at the same cost with ClickHouse Cloud](https://swe.quest/articles/clever-ingests-200x-more-logs-at-the-same-cost-with-clickhouse-cloud-cafdd48afca59e57.md): ClickHouse · 2026-06-30 · Medium · 8 min read · Observability, Analytics & OLAP, Cost optimization, System design
  Clever replaced a split Datadog/Athena logging setup with ClickHouse Cloud.
- [Scaling observability at Character.AI: thousands of GPUs, 10x logs, and 50% lower cost with ClickStack](https://swe.quest/articles/scaling-observability-at-character-ai-thousands-of-gpus-10x-logs-and-50-lower-a0ff79c12547eafa.md): ClickHouse · 2025-08-27 · Medium · 10 min read · Observability, Analytics & OLAP, Cost optimization, Kubernetes, Scaling
  Character.AI consolidated fragmented logging across multi-cloud Kubernetes GPU clusters onto ClickStack (HyperDX UI) backed by ClickHouse Cloud.
- [Our New Observability Platform for 100B Logs](https://swe.quest/articles/our-new-observability-platform-for-100b-logs-ffdc8340b285c59b.md): Railway · 2023-09-29 · Medium · 7 min read · Observability, Analytics & OLAP, Replication, Scaling
  Railway rebuilt its logging backend on ClickHouse to power Log Explorer, handling about 1 billion new logs per day, 100 billion stored logs and 60 queries/sec at roughly 50ms average latency on a 2-shard/2-replica cluster.

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)
