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 / nvidia-gpu / nvidia-gpu-cuda-oom-with-free-memory ▌

Operations Guides

CUDA out of memory with free memory available: GPU memory fragmentation

Your training run or inference server has been up for hours. Then it dies with torch.cuda.OutOfMemoryError: CUDA out of memory. You check nvidia-smi and the GPU shows gigabytes free. The error message and the driver disagree, and the driver looks right.

Both are right. The GPU has free memory in aggregate, but no single contiguous block large enough for the allocation that just failed. The memory is fragmented: free in total, unusable in practice.

The pattern is recognizable. It almost never fires on the first allocation. It fires after the process has been running a while, after many allocate/free cycles of varying sizes. It is far more common in inference serving with dynamic batch sizes and variable sequence lengths than in fixed-allocation training loops. And restarting the process “fixes” it, which is why it keeps coming back.

This article covers how to confirm fragmentation (as opposed to true exhaustion or a leak), how the PyTorch caching allocator creates it, and which fixes are durable versus which are band-aids.

What this means

PyTorch does not call cudaMalloc for every tensor. It uses a caching allocator: it reserves large segments from the driver up front, sub-allocates blocks from those segments for your tensors, and when you free a tensor the block goes back into the allocator’s pool, not back to the driver. This is why nvidia-smi shows high “used” memory for a healthy PyTorch process even between steps. The allocator is holding cached memory for reuse.

The failure is inside that cache. Over time, segments get carved into blocks of assorted sizes. A block freed between two still-live blocks cannot be merged with anything or returned to the driver, because the driver only gets memory back when an entire segment is empty. When a new allocation arrives that is larger than any single free block, the allocator tries to reserve a new segment. If the driver has no room left (because the allocator is already holding most of VRAM as cache), the allocation fails. OOM, with free memory showing everywhere.

Two numbers tell the whole story:

  • Allocated: memory actually holding live tensor data.
  • Reserved: memory the allocator has taken from the driver, including its free cache.

When reserved is much larger than allocated and allocations still fail, you have fragmentation.

flowchart TD
  A[Tensor allocation request] --> B{Free block in cache big enough?}
  B -->|yes| C[Reuse cached block]
  B -->|no| D{Driver has room for new segment?}
  D -->|yes| E[cudaMalloc new segment]
  D -->|no| F[CUDA OOM with free memory showing]
  G[Tensor freed] --> H[Block returns to allocator pool]
  H --> I{Whole segment free?}
  I -->|yes| J[Segment can return to driver]
  I -->|no| K[Free fragment stranded between live blocks]
  K -.->|accumulates over hours| B

Common causes

CauseWhat it looks likeFirst thing to check
Allocator fragmentation from variable-size allocationsOOM after hours of uptime; reserved » allocated; serving workload with dynamic batch or sequence lengthstorch.cuda.memory_stats() reserved vs allocated
Large blocks split into unusable piecesRepeated OOM on one specific large allocation size; plenty of smaller free blocksmemory_summary() segment and block sizes
Cached memory never returned to the drivernvidia-smi used stays high even at idle between requeststorch.cuda.empty_cache() effect on nvidia-smi
Slow leak masquerading as fragmentationAllocated (not just reserved) climbs steadily without a plateauTrack memory_allocated() over time; see the memory leak guide
True exhaustion, misreadnvidia-smi free is genuinely near zero; per-process list shows another consumernvidia-smi --query-compute-apps=pid,process_name,used_gpu_memory --format=csv
Raw CUDA allocations outside a caching allocatorCustom CUDA extensions or non-PyTorch code allocating directlyAudit which components call cudaMalloc directly

The first three are the same root cause at different layers. The last three must be ruled out before concluding “fragmentation”, because the fixes are completely different.

Quick checks

All read-only. Run inside the affected process’s environment where noted.

# What the driver sees: used/free and which processes hold memory
nvidia-smi --query-gpu=memory.used,memory.total,memory.free --format=csv,noheader,nounits
nvidia-smi --query-compute-apps=pid,process_name,used_gpu_memory --format=csv,noheader

memory.used includes PyTorch’s cached-but-free pool. nvidia-smi cannot see inside the allocator, so it will always overstate what is “really” in use. That is expected, not a fault.

# Inside the affected process: the allocator's own view
import torch
print(torch.cuda.memory_summary())

Look at two things: “Allocated” versus “Reserved” for GPU memory, and the segment/block breakdown. Reserved much larger than allocated, plus a rising count of small free blocks, is the fragmentation signature.

# The specific fragmentation signal
stats = torch.cuda.memory_stats()
print("allocated:", stats["allocated_bytes.all.current"])
print("reserved:  ", stats["reserved_bytes.all.current"])
print("inactive split:", stats["inactive_split_bytes.all.current"])

inactive_split_bytes counts memory that is free inside the pool but stranded as split fragments of larger segments, so it cannot be returned to the driver or reused for large requests. A large and growing inactive_split_bytes.all.current is the closest thing to a direct fragmentation metric the allocator exposes (the key is stable across current PyTorch releases; confirm with torch.cuda.memory_stats() on the version in use).

# What the driver reports as free, from inside the process
free_b, total_b = torch.cuda.mem_get_info()
print(f"driver free: {free_b / 2**30:.1f} GiB of {total_b / 2**30:.1f} GiB")

If mem_get_info shows little driver-level free space while reserved - allocated is large, the allocator is sitting on the memory and the driver cannot hand out a new segment. That confirms the mechanism.

# Full allocator state for offline visualization
import torch
torch.cuda.memory._record_memory_history()
# ... run until the OOM or a representative window ...
torch.cuda.memory._dump_snapshot("fragmentation.pickle")

Load the snapshot into PyTorch’s memory visualizer (pytorch.org/memory_viz) to see the segment layout directly: which segments are chopped up, which blocks are pinned alive. The snapshot function lives under torch.cuda.memory and has changed names across releases — check dir(torch.cuda.memory) on the version in use.

How to diagnose it

  1. Confirm it is not true exhaustion. Check nvidia-smi --query-compute-apps for other processes on the GPU, and check memory.free. If another tenant or a zombie process is holding memory, this is not fragmentation. Confirm the process is actually stale, kill it, and move on.

  2. Confirm it is not a leak. A leak shows allocated_bytes climbing monotonically without a plateau; fragmentation shows allocated roughly flat while reserved and inactive_split_bytes grow. If allocated never plateaus, follow the GPU memory leak guide instead.

  3. Capture the allocator state at failure time. Wrap the failing allocation site (or the serving loop) so that on torch.cuda.OutOfMemoryError you dump memory_summary() and the stats above before the process exits. The OOM itself is transient; the summary is what you diagnose from.

  4. Identify the allocation that fails. Note its size. Fragmentation OOMs characteristically fail on a large allocation (an activation tensor for a long sequence, a KV cache growth step) while thousands of smaller free blocks exist. If small allocations also fail, you are closer to true exhaustion.

  5. Correlate with workload shape. Does the failure follow a change in batch size distribution, a long-tail request, or a model switch? Dynamic shapes are the fragment generator. Fixed-shape training that OOMs on step one is a sizing problem, not fragmentation.

  6. Decide fix class. Band-aid (cache clearing, allocator tuning), structural (allocation pattern changes, paged memory), or operational (periodic restart). See below.

Metrics and signals to monitor

SignalWhy it mattersWarning sign
reserved_bytes vs allocated_bytesThe gap is cached memory; a growing gap with failures is fragmentationGap grows over hours while allocated stays flat
inactive_split_bytes.all.currentFree memory stranded in split segments; the closest thing to a fragmentation gaugeSteady climb between GC events; large fraction of reserved
OOM error count in application logsThe failure itself; rate matters for severityRecurring OOMs at similar uptime offsets after each restart
nvidia-smi memory.usedDriver-level view including cache; needed for capacity contextNear-total used with small allocated inside the process
Uptime at time of OOMFragmentation is time-and-churn dependentOOMs clustering at similar hours-after-start values
Allocation size at failureDistinguishes “no large block” from “no memory at all”Same large size failing repeatedly

The key distinction from the broader monitoring checklist: VRAM percentage alone is misleading for this failure. OOM can fire at 85% “used” because percentage says nothing about contiguity. Alerting on application-level OOM events plus the reserved-minus-allocated gap catches what nvidia-smi cannot.

Fixes

Band-aid: clear the cache

import torch
torch.cuda.empty_cache()

empty_cache() returns fully-free segments to the driver, which lowers nvidia-smi used memory and gives the allocator room to re-reserve. Its limits matter: it cannot free split fragments (segments with any live block stay put), so for established fragmentation it often changes little. It also forces the next allocation to cudaMalloc fresh segments, adding latency. Use it at natural boundaries (between requests, between epochs), not in a hot loop, and do not treat it as a fix. Some operators schedule it periodically as a pressure-relief valve; that works until fragmentation outpaces it.

Allocator tuning: max_split_size_mb

# Limit how eagerly the allocator splits large blocks
export PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:512

Without a limit, the allocator will split a large free block to satisfy a small request, permanently carving big segments into small pieces. max_split_size_mb tells it to leave blocks above that size intact and reserve a new segment for small requests instead, keeping large contiguous space available for large allocations. This is the mitigation the PyTorch OOM message itself suggests. The right value is workload-specific: set it near the size of the allocations that keep failing. Too low and you waste memory; too high and you are back to splitting.

Newer PyTorch versions also offer expandable_segments:True, which maps segments into one growable virtual address range so blocks can merge across old segment boundaries, making allocation order matter much less. It remains experimental: current PyTorch OOM error text and documentation point at it first for fragmentation, and setting it together with max_split_size_mb is documented to error out, so do not set both at once.

If you run with backend:cudaMallocAsync, allocator semantics change: several memory_stats() fields report zero and max_split_size_mb is ignored, because that option configures the native caching allocator only. Diagnose fragmentation differently on that backend.

Structural: stop generating fragments

  • Bucket your shapes. In inference serving, quantize batch sizes and pad sequence lengths to a small set of fixed sizes. Ten allocation sizes fragment; three do not.
  • Pre-allocate the big things. Allocate the largest tensors (KV cache, activation workspace) once at startup, at maximum size, and reuse them. Memory that is never freed cannot fragment.
  • Keep allocation order stable. Large-then-small ordering at startup keeps big segments intact; interleaved sizes over hours is what churns the pool.
  • Use a serving runtime with paged memory management. Frameworks such as vLLM allocate the KV cache as one large pool divided into fixed-size pages, eliminating the variable-size allocation churn that causes this failure class in LLM serving. If you are hand-rolling a serving loop on raw PyTorch, this is the durable fix.
  • Avoid raw cudaMalloc in extensions. Raw CUDA allocations outside the caching allocator fragment worse and cannot participate in its pooling. Route allocations through the framework allocator where possible.

Operational: restart

A restart resets the allocator to a clean slate. For serving fleets, rolling restarts on a schedule (or on a watermark signal like inactive_split_bytes crossing a threshold) are pragmatic containment while a structural fix is worked out. It is containment, not a cure; the OOMs return on the same timescale if the workload does not change.

Prevention

  • Track the gap, not the percentage. Add reserved - allocated and inactive_split_bytes to your per-service metrics. Fragmentation is visible days before the first OOM if you watch the right numbers.
  • Fix allocation shapes at design time. Dynamic batching is good for throughput and bad for the allocator; bucket it.
  • Set allocator configuration deliberately in production images. Do not leave max_split_size_mb or expandable segments as per-host experiments; bake the tuned value into the service config with a comment explaining the allocation size it protects.
  • Load-test with realistic shape distributions. A soak test with uniform batch sizes will never reproduce this. Replay production-like request size mixes and watch fragmentation metrics over 24+ hours.
  • Size headroom for churn, not just peak. The framebuffer capacity guidance treats >90% sustained as at-risk; for dynamic-shape serving, keep more headroom because the usable fraction of “free” memory shrinks as fragmentation builds.

How Netdata helps

  • Per-second VRAM sampling catches the memory growth curve and the exact moment of the OOM, which minute-resolution monitoring smooths away. Fragmentation OOMs are often preceded by a slow reserved-memory climb that is only visible at high resolution.
  • Process-level attribution separates “another tenant ate the memory” from “the allocator is holding it”, the first branch in the diagnosis.
  • Application metric correlation: plotting the service’s own reserved, allocated, and OOM-event counters against driver-level memory.used on one dashboard makes the reserved-allocated gap visible without logging into the host.
  • Uptime-correlated alerting: OOM events annotated against process uptime expose the “fails N hours after every restart” signature that distinguishes fragmentation from a sizing problem.
  • Fleet-wide comparison shows whether one replica fragments faster than its peers, which usually means a different request mix or config drift rather than a platform problem.