The only agent that thinks for itself

Autonomous Monitoring with self-learning AI built-in, operating independently across your entire stack.

Unlimited Metrics & Logs
Machine learning & MCP
5% CPU, 150MB RAM
3GB disk, >1 year retention
800+ integrations, zero config
Dashboards, alerts out of the box
> Discover Netdata Agents

Centralized metrics streaming and storage

Aggregate metrics from multiple agents into centralized Parent nodes for unified monitoring across your infrastructure.

Stream from unlimited agents
Long-term data retention
High availability clustering
Data replication & backup
Scalable architecture
Enterprise-grade security
> Learn about Parents

Fully managed cloud platform

Access your monitoring data from anywhere with our SaaS platform. No infrastructure to manage, automatic updates, and global availability.

Zero infrastructure management
99.9% uptime SLA
Global data centers
Automatic updates & patches
Enterprise SSO & RBAC
SOC2 & ISO certified
> Explore Netdata Cloud

Deploy Netdata Cloud in your infrastructure

Run the full Netdata Cloud platform on-premises for complete data sovereignty and compliance with your security policies.

Complete data sovereignty
Air-gapped deployment
Custom compliance controls
Private network integration
Dedicated support team
Kubernetes & Docker support
> Learn about Cloud On-Premises

Powerful, intuitive monitoring interface

Modern, responsive UI built for real-time troubleshooting with customizable dashboards and advanced visualization capabilities.

Real-time chart updates
Customizable dashboards
Dark & light themes
Advanced filtering & search
Responsive on all devices
Collaboration features
> Explore Netdata UI

Monitor on the go

Native iOS and Android apps bring full monitoring capabilities to your mobile device with real-time alerts and notifications.

iOS & Android apps
Push notifications
Touch-optimized interface
Offline data access
Biometric authentication
Widget support
> Download apps

The future of infrastructure observability

See our strategic direction across AI-native observability, full-stack signals, operational intelligence, and enterprise platform maturity.

AI-native observability
Full-stack signal coverage
Operational intelligence
Enterprise platform maturity
Agent releases every 6 weeks
Cloud continuous delivery
> Explore Product Roadmap

Best energy efficiency

True real-time per-second

100% automated zero config

Centralized observability

Multi-year retention

High availability built-in

Zero maintenance

Always up-to-date

Enterprise security

Complete data control

Air-gap ready

Compliance certified

Millisecond responsiveness

Infinite zoom & pan

Works on any device

Native performance

Instant alerts

Monitor anywhere

AI-native observability

Continuous delivery

Open source foundation

80% Faster Incident Resolution

AI-powered troubleshooting from detection, to root cause and blast radius identification, to reporting.

True Real-Time and Simple, even at Scale

Linearly and infinitely scalable full-stack observability, that can be deployed even mid-crisis.

90% Cost Reduction, Full Fidelity

Instead of centralizing the data, Netdata distributes the code, eliminating pipelines and complexity.

See and Map Your Entire Network

Live topology, flow analytics, and SNMP device and trap monitoring — unified with your full-stack observability.

Control Without Surrender

SOC 2 Type 2 certified with every metric kept on your infrastructure.

Integrations

800+ collectors and notification channels, auto-discovered and ready out of the box.

800+ data collectors
Auto-discovery & zero config
Cloud, infra, app protocols
Notifications out of the box
> Explore integrations
Real Results
46% Cost Reduction

Reduced monitoring costs by 46% while cutting staff overhead by 67%.

— Leonardo Antunez, Codyas

Zero Pipeline

No data shipping. No central storage costs. Query at the edge.

From Our Users
"Out-of-the-Box"

So many out-of-the-box features! I mostly don't have to develop anything.

— Simon Beginn, LANCOM Systems

No Query Language

Point-and-click troubleshooting. No PromQL, no LogQL, no learning curve.

Enterprise Ready
67% Less Staff, 46% Cost Cut

Enterprise efficiency without enterprise complexity—real ROI from day one.

— Leonardo Antunez, Codyas

SOC 2 Type 2 Certified

Zero data egress. Only metadata reaches the cloud. Your metrics stay on your infrastructure.

Full Coverage
800+ Collectors

Auto-discovered and configured. No manual setup required.

Any Notification Channel

Slack, PagerDuty, Teams, email, webhooks—all built-in.

Built for the People Who Get Paged

Because 3am alerts deserve instant answers, not hour-long hunts.

Every Industry Has Rules. We Master Them.

See how healthcare, finance, and government teams cut monitoring costs 90% while staying audit-ready.

Monitor Any Technology. Configure Nothing.

Install the agent. It already knows your stack.
From Our Users
"A Rare Unicorn"

Netdata gives more than you invest in it. A rare unicorn that obeys the Pareto rule.

— Eduard Porquet Mateu, TMB Barcelona

99% Downtime Reduction

Reduced website downtime by 99% and cloud bill by 30% using Netdata alerts.

— Falkland Islands Government

Real Savings
30% Cloud Cost Reduction

Optimized resource allocation based on Netdata alerts cut cloud spending by 30%.

— Falkland Islands Government

46% Cost Cut

Reduced monitoring staff by 67% while cutting operational costs by 46%.

— Codyas

Real Coverage
"Plugin for Everything"

Netdata has agent capacity or a plugin for everything, including Windows and Kubernetes.

— Eduard Porquet Mateu, TMB Barcelona

"Out-of-the-Box"

So many out-of-the-box features! I mostly don't have to develop anything.

— Simon Beginn, LANCOM Systems

Real Speed
Troubleshooting in 30 Seconds

From 2-3 minutes to 30 seconds—instant visibility into any node issue.

— Matthew Artist, Nodecraft

20% Downtime Reduction

20% less downtime and 40% budget optimization from out-of-the-box monitoring.

— Simon Beginn, LANCOM Systems

Pay per Node. Unlimited Everything Else.

One price per node. Unlimited metrics, logs, users, and retention. No per-GB surprises.

Free tier—forever
No metric limits or caps
Retention you control
Cancel anytime
> See pricing plans

What's Your Monitoring Really Costing You?

Most teams overpay by 40-60%. Let's find out why.

Expose hidden metric charges
Calculate tool consolidation
Customers report 30-67% savings
Results in under 60 seconds
> See what you're really paying

Your Infrastructure Is Unique. Let's Talk.

Because monitoring 10 nodes is different from monitoring 10,000.

On-prem & air-gapped deployment
Volume pricing & agreements
Architecture review for your scale
Compliance & security support
> Start a conversation

Monitoring That Sells Itself

Deploy in minutes. Impress clients in hours. Earn recurring revenue for years.

30-second live demos close deals
Zero config = zero support burden
Competitive margins & deal protection
Response in 48 hours
> Apply to partner

Per-Second Metrics at Homelab Prices

Same engine, same dashboards, same ML. Just priced for tinkerers.

Community: Free forever · 5 nodes · non-commercial
Homelab: $90/yr · unlimited nodes · fair usage
> Get the Homelab Plan

$1,000 Per Referral. Unlimited Referrals.

Your colleagues get 10% off. You get 10% commission. Everyone wins.

10% of subscriptions, up to $1,000 each
Track earnings inside Netdata Cloud
PayPal/Venmo payouts in 3-4 weeks
No caps, no complexity
> Get your referral link
Cost Proof
40% Budget Optimization

"Netdata's significant positive impact" — LANCOM Systems

Calculate Your Savings

Compare vs Datadog, Grafana, Dynatrace

Savings Proof
46% Cost Reduction

"Cut costs by 46%, staff by 67%" — Codyas

30% Cloud Bill Savings

"Reduced cloud bill by 30%" — Falkland Islands Gov

Enterprise Proof
"Better Than Combined Alternatives"

"Better observability with Netdata than combining other tools." — TMB Barcelona

Real Engineers, <24h Response

DPA, SLAs, on-prem, volume pricing

Why Partners Win
Demo Live Infrastructure

One command, 30 seconds, real data—no sandbox needed

Zero Tickets, High Margins

Auto-config + per-node pricing = predictable profit

Homelab Ready
Free Video Course

8-episode Netdata tutorial by LearnLinux.tv

76k+ GitHub Stars

3rd most starred monitoring project

Worth Recommending
Product That Delivers

Customers report 40-67% cost cuts, 99% downtime reduction

Zero Risk to Your Rep

Free tier lets them try before they buy

AI Support Assistant, Available 24/7

Nedi has access to all official documentation, source code, and resources. Ask any question about Netdata—responds in your language.

Deployment & configuration
Troubleshooting & sizing
Alerts & notifications
Evidence-based answers
> Ask Nedi now

Never Fight Fires Alone

Docs, community, and expert help—pick your path to resolution.

Learn.netdata.cloud docs
Discord, Forums, GitHub
Premium support available
> Get answers now

60 Seconds to First Dashboard

One command to install. Zero config. 850+ integrations documented.

Linux, Windows, K8s, Docker
Auto-discovers your stack
> Read our documentation

76,000+ Engineers Strong

615+ contributors. 1.5M daily downloads. One mission: simplify observability.

Per-Second. 90% Cheaper. Data Stays Home.

Side-by-side comparisons: costs, real-time granularity, and data sovereignty for every major tool.

See why teams switch from Datadog, Prometheus, Grafana, and more.

> Browse all comparisons
Edge-Native Observability, Born Open Source
Per-second visibility, ML on every metric, and data that never leaves your infrastructure.
Founded in 2016
615+ contributors worldwide
Remote-first, engineering-driven
Open source first
> Read our story
Promises We Publish—and Prove
12 principles backed by open code, independent validation, and measurable outcomes.
Open source, peer-reviewed
Zero config, instant value
Data sovereignty by design
Aligned pricing, no surprises
> See all 12 principles
Edge-Native, AI-Ready, 100% Open
76k+ stars. Full ML, AI, and automation—GPLv3+, not premium add-ons.
76,000+ GitHub stars
GPLv3+ licensed forever
ML on every metric, included
Zero vendor lock-in
> Explore our open source
Build Real-Time Observability for the World
Remote-first team shipping per-second monitoring with ML on every metric.
Remote-first, fully distributed
Open source (76k+ stars)
Challenging technical problems
Your code on millions of systems
> See open roles
Meet the Team Behind Netdata
Conferences, meetups, and tradeshows where you can see Netdata in action and talk to the engineers who build it.
Live demos and deep dives
Book 1-on-1 meetings
Talks and panel sessions
Event recaps and photos
> See all events
Talk to a Netdata Human in <24 Hours
Sales, partnerships, press, or professional services—real engineers, fast answers.
Discuss your observability needs
Pricing and volume discounts
Partnership opportunities
Media and press inquiries
> Book a conversation
Your Data. Your Rules.
On-prem data, cloud control plane, transparent terms.
Trust & Scale
76,000+ GitHub Stars

One of the most popular open-source monitoring projects

SOC 2 Type 2 Certified

Enterprise-grade security and compliance

Data Sovereignty

Your metrics stay on your infrastructure

Validated
University of Amsterdam

"Most energy-efficient monitoring solution" — ICSOC 2023, peer-reviewed

ADASTEC (Autonomous Driving)

"Doesn't miss alerts—mission-critical trust for safety software"

Community Stats
615+ Contributors

Global community improving monitoring for everyone

1.5M+ Downloads/Day

Trusted by teams worldwide

GPLv3+ Licensed

Free forever, fully open source agent

Why Join?
Remote-First

Work from anywhere, async-friendly culture

Impact at Scale

Your work helps millions of systems

$ guides / clickhouse / clickhouse-memory-limit-total-exceeded

Operations Guides

ClickHouse Memory limit (total) exceeded - server-wide memory pressure and fixes

Code: 241. DB::Exception: Memory limit (total) exceeded: would use X bytes (attempt to allocate chunk of C bytes), current RSS: Y bytes, maximum: Z bytes. is the server-level cap, not a per-query limit. When ClickHouse’s MemoryTracking hits max_server_memory_usage (effective default: 90% of physical RAM, because the setting defaults to 0 and is derived from max_server_memory_usage_to_ram_ratio), the server kills the heaviest running queries to protect the process. New and existing queries fail until memory drops. Find the largest memory consumer and stop it before the OOM killer does.

Unlike a per-query max_memory_usage breach, the (total) variant means the aggregate across all queries, background merges, caches, and dictionaries has crossed the server ceiling. It often arrives suddenly: a runaway JOIN, a burst of concurrent heavy GROUP BY queries, or a background merge spike pushes the tracked total over the line. ClickHouse uses a hierarchical memory tracker (server to user to query), and the server limit is the final backstop.

This error does not mean you need more RAM. It means the current workload is unsafe for the configured limit. Diagnose whether the pressure comes from a single query, concurrency, or background work, and recover without restarting the server.

What this means

ClickHouse tracks allocations through a hierarchy: a server-level MemoryTracker, then per-user trackers, then per-query trackers. The server limit is controlled by max_server_memory_usage. Left at defaults, max_server_memory_usage is 0, so ClickHouse derives the limit from physical RAM using the separate max_server_memory_usage_to_ram_ratio setting, whose default is 90%. That value lives in system.metrics as MemoryTracking.

When MemoryTracking approaches that ceiling, the server kills the heaviest queries to free memory. The error message Memory limit (total) exceeded is exception code 241. It is distinct from a query-level breach, which references per-query max_memory_usage instead of the server total.

The tracked value is an approximation. Resident Set Size (RSS) reported by the OS can exceed MemoryTracking because of allocator overhead, memory-mapped files, and untracked allocations. Relying on MemoryTracking alone can miss fragmentation that still exposes the process to the OOM killer.

flowchart TD
    A[Physical RAM] --> B[max_server_memory_usage]
    B --> C[Server MemoryTracker]
    C --> D[User tracker]
    C --> E[Background merges and caches]
    D --> F[Query A]
    D --> G[Query B]
    C -.-> H[Kill heaviest query when limit exceeded]

Common causes

CauseWhat it looks likeFirst thing to check
Runaway query with bad JOIN or huge GROUP BYOne query in system.processes has peak_memory_usage far above the rest, often with long elapsed timesystem.processes ordered by memory_usage DESC
Concurrent heavy query stormMany queries each using moderate memory; sum(memory_usage) from system.processes is near the server limitTotal query memory versus MemoryTracking
Background merge or mutation spikeMerge memory_usage in system.merges is elevated while active query count is lowSELECT sum(memory_usage) FROM system.merges
Cache or dictionary growthMemoryTracking climbs steadily without heavy queries; dictionaries may be reloadingsystem.dictionaries and cache metrics in system.asynchronous_metrics
Spill-to-disk feedback loop/var/lib/clickhouse/tmp/ is growing; query latency rises as I/O substitutes for RAMTemp directory size and query_log for spilling patterns

Quick checks

# Check OS-level resident memory for the ClickHouse process
for pid in $(pgrep clickhouse-server); do echo "PID $pid"; grep -E 'VmRSS|VmSize|VmPeak' /proc/$pid/status; done
-- Server-level tracked memory and OS-level resident memory
SELECT
    (SELECT value FROM system.metrics WHERE metric = 'MemoryTracking') AS tracked_bytes,
    (SELECT formatReadableSize(value) FROM system.asynchronous_metrics WHERE metric = 'MemoryResident') AS rss,
    (SELECT formatReadableSize(value) FROM system.asynchronous_metrics WHERE metric = 'OSMemoryAvailable') AS os_available
-- Heaviest running queries by current memory
SELECT
    query_id,
    user,
    elapsed,
    formatReadableSize(memory_usage) AS current_mem,
    formatReadableSize(peak_memory_usage) AS peak_mem,
    substring(query, 1, 120) AS query_prefix
FROM system.processes
WHERE memory_usage > 0
ORDER BY memory_usage DESC
LIMIT 10;
-- Total memory held by all running queries
SELECT formatReadableSize(sum(memory_usage)) AS total_query_memory FROM system.processes;
-- Total memory held by background merges
SELECT formatReadableSize(sum(memory_usage)) AS total_merge_memory FROM system.merges;
-- Recent MEMORY_LIMIT_EXCEEDED errors
SELECT
    event_time,
    query_id,
    user,
    substring(query, 1, 120) AS query_prefix
FROM system.query_log
WHERE type = 'ExceptionWhileProcessing'
  AND exception_code = 241
  AND event_time > now() - INTERVAL 10 MINUTE
ORDER BY event_time DESC;
# Check for spill-to-disk activity
ls -lh /var/lib/clickhouse/tmp/ 2>/dev/null | head -20

How to diagnose it

  1. Confirm the server limit is the problem. Query system.metrics for MemoryTracking. If it is near max_server_memory_usage and the error says (total), you are at the server cap.
  2. Classify the consumer. Compare total query memory (sum from system.processes) against total merge memory (sum from system.merges). If queries dominate, the fix is query-side. If merges dominate, the pressure is background workload.
  3. Find the runaway query. Sort system.processes by memory_usage DESC. Note query_id, user, elapsed, and peak_memory_usage. A single query using more than 50% of the server limit is the obvious target, and it is likely the one the server will kill first.
  4. Check for a concurrency pile-up. If no single query is huge but the sum of query memory exceeds 70% of the server limit, too many concurrent heavy queries are the issue.
  5. Inspect recent exceptions. Query system.query_log for exception_code = 241 in the last 10 minutes. If the same query pattern repeats, it is a bad query. If many distinct queries fail, the system is universally saturated.
  6. Look for spill-to-disk. If max_bytes_before_external_group_by is configured, queries may spill to /var/lib/clickhouse/tmp/ instead of failing. Large temp files mean memory pressure has already forced queries onto disk, which can starve merges of I/O and worsen the cascade.
  7. Compare RSS to tracked memory. Check system.asynchronous_metrics MemoryResident against MemoryTracking. If RSS is significantly higher, untracked allocations or allocator fragmentation are contributing. This explains why the OOM killer may strike before ClickHouse throttles queries.
  8. If queries and merges do not explain the pressure, check system.dictionaries for recent reloads and review mark cache size in system.asynchronous_metrics. Large dictionaries and oversized caches can consume server-level memory outside of query execution.

Metrics and signals to monitor

SignalWhy it mattersWarning sign
MemoryTracking / max_server_memory_usageTracked allocation approaching the server capTracked memory > 80% of limit
MemoryResident (RSS)Actual OS memory; the OOM killer sees this, not the internal trackerRSS > 90% of physical RAM
Per-query memory_usageIdentifies runaway queries before they threaten the serverSingle query > 50% of server limit
Sum of query memory_usageReveals concurrency-driven pressureTotal query memory > 70% of server limit
Merge memory_usage from system.mergesBackground merges can consume significant RAM during large consolidationsMerge memory unexpectedly high while parts accumulate
Exception code 241 in query_logEarly indicator of memory pressure trendSustained rate above baseline
OSMemoryAvailableSystem-level headroom before OOMAvailable memory < 5% of total
Spill-to-disk temp directory growthSignals queries are trading memory for I/O, which can cascade into merge starvation/var/lib/clickhouse/tmp/ growing steadily

Fixes

Kill the runaway query

Use KILL QUERY WHERE query_id = '...' on the heaviest consumer from system.processes. This is the fastest way to drop memory usage. The tradeoff is lost work. For ad-hoc analytics this is usually acceptable. For ETL jobs, coordinate with the owner before killing.

Reduce concurrent query load

If many moderate queries exhaust memory together, lower max_concurrent_queries temporarily to force queuing instead of simultaneous execution. This prevents aggregate memory from spiking. The tradeoff is increased query latency, but it keeps the server stable.

Enforce per-query memory limits

Set max_memory_usage in user profiles so individual queries hit their own ceiling before threatening the server limit. The tradeoff is that legitimate large queries fail earlier, but they fail predictably and do not destabilize the node.

Tune spill-to-disk behavior

If you configure max_bytes_before_external_group_by, queries spill rather than fail. When spill volume in /var/lib/clickhouse/tmp/ grows, disk I/O rises and merges slow down. Raise the threshold only if you have proven I/O headroom, or lower it to fail fast and force query rewriting. The tradeoff is query failure versus system-wide I/O saturation.

Reduce cache or dictionary memory

If mark cache or uncompressed cache is oversized relative to RAM, reduce mark_cache_size or uncompressed_cache_size in the server configuration. If large dictionaries reload during peak hours, reschedule reloads or reduce dictionary size. The tradeoff is more disk I/O on cold queries.

Optimize the underlying queries

Fix Cartesian products by adding proper JOIN conditions. Add LIMIT to high-cardinality GROUP BY queries. Reduce DISTINCT on large datasets. These changes reduce peak_memory_usage at the source. This is the only fix that does not trade capacity for stability, but it requires development time.

Prevention

  • Configure max_memory_usage per user profile so analytical users cannot allocate unbounded memory.
  • Set max_concurrent_queries based on worst-case memory: typical heavy query memory multiplied by desired concurrency should stay below 70% of max_server_memory_usage.
  • Monitor the 95th percentile of MemoryTracking over 5-minute windows. If the peak trends upward over days, investigate before it intersects the limit.
  • Require EXPLAIN or dry-run review for new JOIN and GROUP BY patterns against large tables.
  • Alert when MemoryResident exceeds MemoryTracking by a large ratio. This catches allocator fragmentation and untracked growth that the internal tracker misses.
  • Disable or minimally configure swap. ClickHouse on swap is effectively unresponsive.

How Netdata helps

Netdata tracks the clickhouse-server process RSS alongside system-level memory metrics. Compare RSS against ClickHouse’s internal MemoryTracking to spot divergence before the OOM killer intervenes.

The ClickHouse collector exposes MemoryTracking, query counts, and exception rates. Correlate spikes in code 241 with query concurrency and memory metrics.

Disk latency and I/O utilization charts show when spill-to-disk from memory pressure begins starving background merges.

Process memory charts show whether clickhouse-server RSS climbs independently of tracked query memory, indicating untracked allocation or cache growth.

Query latency metrics help spot the performance degradation that precedes explicit memory limit errors.

The Netdata solution

ClickHouse monitoring with Netdata

Netdata monitors ClickHouse with per-second metrics and ML anomaly detection. Track merge debt, memory usage, replication lag, Keeper/ZooKeeper saturation, and disk headroom against the host signals that drive them.