By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
AIModelKitAIModelKitAIModelKit
  • Home
  • News
    NewsShow More
    Concerns Rise as UK Shops Launch Facial Recognition Technology with Real-Time Police Alerts
    Concerns Rise as UK Shops Launch Facial Recognition Technology with Real-Time Police Alerts
    7 Min Read
    Fidji Simo Resigns from OpenAI’s AGI Leadership Role Due to Health Issues
    Fidji Simo Resigns from OpenAI’s AGI Leadership Role Due to Health Issues
    5 Min Read
    Reeves Unveils City Skills Compact: A Commitment from Firms to Retrain Employees in AI for the Financial Sector
    Reeves Unveils City Skills Compact: A Commitment from Firms to Retrain Employees in AI for the Financial Sector
    5 Min Read
    OpenAI Declares GPT-5.6 as the Preferred Model for Microsoft Copilot 365 Amid Rumors of Breakup
    OpenAI Declares GPT-5.6 as the Preferred Model for Microsoft Copilot 365 Amid Rumors of Breakup
    4 Min Read
    Microsoft’s Upcoming Patch Tuesdays Set to Expand with More Updates
    Microsoft’s Upcoming Patch Tuesdays Set to Expand with More Updates
    5 Min Read
  • Open-Source Models
    Open-Source ModelsShow More
    Discover TabFM: A Zero-Shot Foundation Model Optimized for Tabular Data Analysis
    Discover TabFM: A Zero-Shot Foundation Model Optimized for Tabular Data Analysis
    5 Min Read
    Maximizing Cloud Cost Efficiency Through Linear Elastic Caching Strategies
    Maximizing Cloud Cost Efficiency Through Linear Elastic Caching Strategies
    5 Min Read
    Unlocking Parametric Knowledge in LLMs: The Role of Reasoning in Recall
    Unlocking Parametric Knowledge in LLMs: The Role of Reasoning in Recall
    4 Min Read
    Transforming Pixels into Action: How Earth AI Revolutionizes Nature Restoration
    Transforming Pixels into Action: How Earth AI Revolutionizes Nature Restoration
    5 Min Read
    Exploring AI Innovations for Better Understanding of Skin Conditions
    Exploring AI Innovations for Better Understanding of Skin Conditions
    5 Min Read
  • Guides
    GuidesShow More
    Unlocking Multiple AI Models Through the OpenRouter API Quiz – A Comprehensive Guide by Real Python
    Unlocking Multiple AI Models Through the OpenRouter API Quiz – A Comprehensive Guide by Real Python
    4 Min Read
    Unlocking Multiple AI Models with OpenRouter API – A Comprehensive Guide by Real Python
    Unlocking Multiple AI Models with OpenRouter API – A Comprehensive Guide by Real Python
    4 Min Read
    Mastering User Input in Python: A Comprehensive Quiz on Keyboard Input Techniques – Real Python
    Mastering User Input in Python: A Comprehensive Quiz on Keyboard Input Techniques – Real Python
    3 Min Read
    Mastering GitHub Copilot for Code Review in Pull Requests: A Comprehensive Quiz from Real Python
    Mastering GitHub Copilot for Code Review in Pull Requests: A Comprehensive Quiz from Real Python
    1 Min Read
    How to Structure Your Python Script Effectively – Real Python Guide
    How to Structure Your Python Script Effectively – Real Python Guide
    3 Min Read
  • Tools
    ToolsShow More
    Boosting Performance with Native-Speed vLLM Transformers for Enhanced Modeling Backend
    Boosting Performance with Native-Speed vLLM Transformers for Enhanced Modeling Backend
    5 Min Read
    Hugging Face and Cerebras Launch Gemma 4 for Advanced Real-Time Voice AI Solutions
    Hugging Face and Cerebras Launch Gemma 4 for Advanced Real-Time Voice AI Solutions
    4 Min Read
    Unlocking Dopamine: How I Optimized NeuroBait for Enhancing Focus in ADHD Minds
    Unlocking Dopamine: How I Optimized NeuroBait for Enhancing Focus in ADHD Minds
    6 Min Read
    Optimizing Use-Case Based Deployments with SageMaker JumpStart
    Optimizing Use-Case Based Deployments with SageMaker JumpStart
    5 Min Read
    Safetensors Partners with PyTorch Foundation: Strengthening AI Development
    Safetensors Partners with PyTorch Foundation: Strengthening AI Development
    5 Min Read
  • Events
    EventsShow More
    NVIDIA and Hugging Face Unveil New Models and Frameworks for LeRobot: A Game-Changer for the Open Robotics Community
    NVIDIA and Hugging Face Unveil New Models and Frameworks for LeRobot: A Game-Changer for the Open Robotics Community
    5 Min Read
    NVIDIA Unleashes Scalable AI Compute Solutions, Calling on Partners to Drive AI Infrastructure Development
    NVIDIA Unleashes Scalable AI Compute Solutions, Calling on Partners to Drive AI Infrastructure Development
    5 Min Read
    How Jaiveer Singh is Accelerating Robotics and Developer Efficiency
    How Jaiveer Singh is Accelerating Robotics and Developer Efficiency
    6 Min Read
    NVIDIA Fuels More Than 400 of the World’s Top 500 Fastest Supercomputers
    NVIDIA Fuels More Than 400 of the World’s Top 500 Fastest Supercomputers
    5 Min Read
    HTB Defensive Operations Analyst Certificate Now Approved for DoD 8140 Compliance
    HTB Defensive Operations Analyst Certificate Now Approved for DoD 8140 Compliance
    4 Min Read
  • Ethics
    EthicsShow More
    Adaptive Strategies for Generating Bias-Eliciting Questions in Large Language Models (LLMs) – Research Paper [2510.12857]
    Adaptive Strategies for Generating Bias-Eliciting Questions in Large Language Models (LLMs) – Research Paper [2510.12857]
    5 Min Read
    Why AI Can’t Replace Mental Health Therapists: Key Areas Where It Can Enhance Care
    Why AI Can’t Replace Mental Health Therapists: Key Areas Where It Can Enhance Care
    6 Min Read
    Exploring Desirable Effort Fairness and Optimal Trade-offs in Strategic Learning: Insights from Paper 2510.19098
    Exploring Desirable Effort Fairness and Optimal Trade-offs in Strategic Learning: Insights from Paper 2510.19098
    5 Min Read
    Expert Opinions: Should Australia Halt New Data Centre Construction?
    Expert Opinions: Should Australia Halt New Data Centre Construction?
    5 Min Read
    Groundbreaking Device Revives Donor Eyeballs, Paving the Way for Successful Eye Transplants
    Groundbreaking Device Revives Donor Eyeballs, Paving the Way for Successful Eye Transplants
    5 Min Read
  • Comparisons
    ComparisonsShow More
    Cloudflare Launches Temporary Accounts for Seamless Autonomous Worker Deployment
    Cloudflare Launches Temporary Accounts for Seamless Autonomous Worker Deployment
    4 Min Read
    Optimizing Ensemble Diversity for Enhanced Subjective Supervision
    Optimizing Ensemble Diversity for Enhanced Subjective Supervision
    5 Min Read
    Data Alchemy: Reducing Cross-Site Model Variability with Test Time Data Calibration Techniques
    Data Alchemy: Reducing Cross-Site Model Variability with Test Time Data Calibration Techniques
    5 Min Read
    Enhancing Embedding Model Reasoning with Refine Thought: A Test-Time Inference Approach (2511.13726)
    Enhancing Embedding Model Reasoning with Refine Thought: A Test-Time Inference Approach (2511.13726)
    5 Min Read
    Enhancing Bifidelity Parameter Estimation with Conditional Diffusion Models: A Comprehensive Study
    Enhancing Bifidelity Parameter Estimation with Conditional Diffusion Models: A Comprehensive Study
    5 Min Read
Search
  • Privacy Policy
  • Terms of Service
  • Contact Us
  • FAQ / Help Center
  • Advertise With Us
  • Latest News
  • Model Comparisons
  • Tutorials & Guides
  • Open-Source Tools
  • Community Events
© 2025 AI Model Kit. All Rights Reserved.
Reading: Cloudflare Discovers Query Planning Bottleneck in ClickHouse Performance
Share
Notification Show More
Font ResizerAa
AIModelKitAIModelKit
Font ResizerAa
  • 🏠
  • 🚀
  • 📰
  • 💡
  • 📚
  • ⭐
Search
  • Home
  • News
  • Models
  • Guides
  • Tools
  • Ethics
  • Events
  • Comparisons
Follow US
  • Latest News
  • Model Comparisons
  • Tutorials & Guides
  • Open-Source Tools
  • Community Events
© 2025 AI Model Kit. All Rights Reserved.
AIModelKit > Comparisons > Cloudflare Discovers Query Planning Bottleneck in ClickHouse Performance
Comparisons

Cloudflare Discovers Query Planning Bottleneck in ClickHouse Performance

aimodelkit
Last updated: June 6, 2026 10:00 am
aimodelkit
Share
SHARE

In a recent examination of its operational efficiencies, Cloudflare revealed challenges within its billing pipeline stemming from ClickHouse’s query planning stage. This bottleneck, characterized by contention, significantly impacted multiple downstream services essential for billing and fraud detection. The analysis led to an upgrade of ClickHouse, substituting an exclusive lock with a shared lock and optimizing processes such as part filtering to enhance performance.

Cloudflare’s billing pipeline plays a crucial role in its fraud systems. After a major migration that drastically increased the volume of data parts, daily aggregation jobs on ClickHouse faced severe slowdowns. Interestingly, traditional performance metrics—like I/O, memory consumption, and the number of rows scanned—remained within expected ranges, masking the underlying issue.

Cloudflare ClickHouse Performance Issues

Average SELECT query durations. Source: Cloudflare blog

Utilizing ClickHouse since its early days—before it featured built-in data expiration—Cloudflare handles a staggering amount of data, exceeding hundreds of petabytes. To manage this effectively, the company implemented its own retention system, partitioning data in the Ready-Analytics table daily. This approach allowed the deletion of data older than 31 days, preventing bloat. According to James Morrison and Christian Endres, senior distributed systems engineers at Cloudflare:

This system is popular, with hundreds of applications using it. It had already grown to more than 2 PiB of data by December 2024, and an ingestion rate of millions of rows per second. But it had one critical flaw: its retention policy.

As Cloudflare migrated to a new partitioning structure within ClickHouse, they included customer namespaces in the process. This enhancement allowed for more granular data retention management on a per-tenant basis. ClickHouse itself is an open-source analytical platform widely adopted for scenarios involving logs, metrics, analytics, and real-time reporting. However, the team discovered that while the number of parts accessed per query should stay constant, the actual performance declined significantly due to unexpected hurdles. Summarizing the plight, Morrison and Endres noted:

A huge amount of time was being spent in query planning. This is the phase before execution when ClickHouse decides which parts to read (…) 45% of the sampled CPU time was being spent in a single function called filterPartsByPartition (…) The problem wasn’t CPU-bound work; it was massive lock contention. More than half of our query duration was spent waiting to acquire a single mutex (MergeTreeData) that protects the table’s list of parts.

To alleviate the significant slowdown, the Cloudflare engineering team implemented three key modifications: they patched ClickHouse to replace the exclusive lock with a shared lock, eliminated the per-query replication of the complete parts list, and improved part filtering to ensure not every query had to scan the full list. Collectively, these enhancements led to a sharp reduction in query latency, successfully stabilizing performance even as the part count continued to rise. Morrison and Endres remarked:

After deploying this patch in March 2026, query durations dropped by 50%. More importantly, this finally breaks correlation of query durations with the number of parts.

Improved Query Performance

Source: Cloudflare blog

While the Cloudflare team celebrated their success in stabilizing query performance and resolving immediate billing issues, they remain cautious about the potential long-term viability of their partitioning strategy. As data parts continue to grow, operational challenges may persist. They observed that the increasing metadata load also posed dilemmas for ZooKeeper, which coordinates ClickHouse clusters. Reflecting on their experience, they discussed an “uneasy truce” regarding the sustainability of their current architecture.

In a broader context, industry insights shared by Edydh Marquez Avila, a field engineer at Park Place Technologies, shed light on the systemic nature of modern infrastructure failures. On platforms like Reddit and LinkedIn, practitioners have acknowledged that such challenges often arise not from resource constraints but from coordination layers within databases. Avila stated:

Cloudflare’s ClickHouse investigation is a good reminder that modern infrastructure failures increasingly happen in coordination layers, not obvious resource limits (…) The interesting signal is broader than ClickHouse itself (…) High-level telemetry alone is no longer enough for diagnosing large-scale systems under concurrency. Low-level execution visibility still matters.

Following their successful enhancements, Cloudflare contributed the changes back to the ClickHouse project, resulting in their integration into future releases starting from version 25.11, showcasing their commitment to advancing community-driven solutions in data management.

Inspired by: Source

Optimizing Large Language Models with Flexible Low-Rank Adaptation Techniques
Optimizing Deep Brain Stimulation for Parkinson’s Disease: A Sample-Efficient Reinforcement Learning Controller
Creating Interactive Map Animations Using LLM Agents: A Prototyping Guide
Google Boosts LiteRT for Accelerated On-Device Inference Performance
Understanding Overestimation Bias in Beam Search for Large Language Models (LLMs)

Sign Up For Daily Newsletter

Get AI news first! Join our newsletter for fresh updates on open-source models.

By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Copy Link Print
Previous Article New York Lawmakers Approve One-Year Moratorium on New Data Centers New York Lawmakers Approve One-Year Moratorium on New Data Centers
Next Article Anthropic Advocates for ‘Pause’ Option on AI Development: A Call for Responsible Artificial Intelligence Management Anthropic Advocates for ‘Pause’ Option on AI Development: A Call for Responsible Artificial Intelligence Management

Stay Connected

XFollow
PinterestPin
TelegramFollow
LinkedInFollow

							banner							
							banner
Explore Top AI Tools Instantly
Discover, compare, and choose the best AI tools in one place. Easy search, real-time updates, and expert-picked solutions.
Browse AI Tools

Latest News

Concerns Rise as UK Shops Launch Facial Recognition Technology with Real-Time Police Alerts
Concerns Rise as UK Shops Launch Facial Recognition Technology with Real-Time Police Alerts
News
Cloudflare Launches Temporary Accounts for Seamless Autonomous Worker Deployment
Cloudflare Launches Temporary Accounts for Seamless Autonomous Worker Deployment
Comparisons
Fidji Simo Resigns from OpenAI’s AGI Leadership Role Due to Health Issues
Fidji Simo Resigns from OpenAI’s AGI Leadership Role Due to Health Issues
News
Optimizing Ensemble Diversity for Enhanced Subjective Supervision
Optimizing Ensemble Diversity for Enhanced Subjective Supervision
Comparisons
//

Leading global tech insights for 20M+ innovators

Quick Link

  • Latest News
  • Model Comparisons
  • Tutorials & Guides
  • Open-Source Tools
  • Community Events

Support

  • Privacy Policy
  • Terms of Service
  • Contact Us
  • FAQ / Help Center
  • Advertise With Us

Sign Up for Our Newsletter

Get AI news first! Join our newsletter for fresh updates on open-source models.

AIModelKitAIModelKit
Follow US
© 2025 AI Model Kit. All Rights Reserved.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?