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-memory-usage-pytorch-caching-allocator ▌

Operations Guides

Reading NVIDIA GPU memory correctly: nvidia-smi vs the PyTorch caching allocator

An on-call classic: nvidia-smi shows 38 of 40 GiB used on a training node, the line is flat, and someone declares a memory leak. The team running the job insists the model only needs 12 GiB of tensors and nothing is growing. Both sides are reading real numbers. They are reading different layers of the stack, and neither tool tells you that on its own.

PyTorch (and TensorFlow, and most CUDA frameworks) does not allocate GPU memory directly per tensor. It reserves large blocks from the CUDA driver once, caches them, and suballocates internally. nvidia-smi and DCGM report what the framework has reserved from the driver, not what live tensors are actually using. Usage looks high and flat even as tensors are created and freed, and capacity planning or leak hunts based on nvidia-smi alone go wrong in predictable ways.

This article covers what each number measures, how to get tensor-level truth, and how to distinguish the three situations that all look like “high memory” from the outside: normal caching, fragmentation, and an actual leak.

Why nvidia-smi and PyTorch disagree

There are three distinct quantities, measured at three different layers:

  1. Framebuffer used (nvidia-smi, DCGM FB_USED). Memory allocated by active contexts: the CUDA context, any non-PyTorch CUDA allocations (NCCL, cuDNN workspaces), and every block PyTorch has obtained via cudaMalloc and not explicitly returned. This is the number memory.used reports; nvidia-smi reports driver/firmware reservations separately as memory.reserved.
  2. Reserved (torch.cuda.memory_reserved()). The portion of framebuffer the PyTorch caching allocator currently holds: blocks in use plus blocks cached for reuse.
  3. Allocated (torch.cuda.memory_allocated()). The portion of reserved memory actually occupied by live tensors right now.

The relationship is roughly:

nvidia-smi memory.used ≈ CUDA context + non-PyTorch CUDA allocs + PyTorch reserved
nvidia-smi memory.reserved ≈ driver and firmware reservation (separate)
PyTorch reserved       = allocated (live tensors) + cached free blocks + fragmented remnants

A healthy workload can show memory.used at 38 GiB, reserved at 36 GiB, and allocated at 12 GiB with nothing leaking. The 24 GiB gap between reserved and allocated is cached blocks the allocator holds for reuse, and it will reuse them without calling back into the driver.

Note the fixed overhead at the bottom: the CUDA context itself consumes framebuffer that shows up in nvidia-smi but is invisible to PyTorch’s allocator, and the driver and firmware reserve memory that is not available to user allocations at all; context and reserved overhead vary by GPU, driver, CUDA version, and workload and should be measured on your stack. On a small GPU this baseline can look like “a process using 1 GiB doing nothing.”

How the caching allocator works

cudaMalloc is expensive and synchronizing. Calling it per tensor, per training step, would wreck throughput. So PyTorch’s caching allocator front-loads the cost:

  • On first use it requests large blocks from the driver via cudaMalloc and caches them.
  • Small tensor allocations are carved out of larger cached blocks (splitting). When tensors are freed, adjacent free pieces are merged back together.
  • Freeing a tensor returns its block to the allocator’s cache, not to the driver. nvidia-smi does not move.
  • Cached blocks are returned to the driver when you call torch.cuda.empty_cache() or when the native allocator reclaims unused blocks under memory pressure (including failed allocation retries).
  • The allocator maintains per-stream pools, which matters for multi-stream code: a tensor freed on one stream but still in use on another can look like it is leaking until the stream syncs (this is what record_stream() exists for).
flowchart TD
  A[GPU framebuffer - physical DRAM] --> B[Driver and firmware reserved]
  A --> C[CUDA context + NCCL and cuDNN allocs]
  A --> D[PyTorch reserved pool via cudaMalloc]
  D --> E[Allocated - live tensors]
  D --> F[Cached free blocks]
  D --> G[Fragmented inactive splits]
  S[nvidia-smi / DCGM FB_USED] -. measures .-> B
  S -. measures .-> C
  S -. measures .-> D
  R[memory_reserved] -. measures .-> D
  T[memory_allocated] -. measures .-> E

Two consequences fall out of this design. First, the “leak after the first training step” that alarms new GPU operators is the allocator building its pool: nvidia-smi jumps to a high plateau on the first step and stays there for the life of the process. That is designed behavior, not a fault. Second, a flat nvidia-smi line tells you nothing about what is happening inside the pool. Internal fragmentation can grow invisibly under a perfectly flat FB_USED curve.

The commands and APIs that tell the truth

Driver level, safe to run any time:

# Framebuffer usage per GPU
nvidia-smi --query-gpu=memory.used,memory.total,memory.free,memory.reserved --format=csv,noheader,nounits

# Per-process usage: who is holding what
nvidia-smi --query-compute-apps=pid,process_name,used_gpu_memory --format=csv,noheader

memory.reserved here is driver/firmware overhead, not PyTorch’s reserved pool; do not confuse the two uses of the word. In containerized setups the PID shown is the host PID, so translate through the container runtime before killing anything.

Allocator level, from inside the process (or a debugger attached to it):

import torch

torch.cuda.memory_allocated()   # live tensor bytes
torch.cuda.memory_reserved()    # allocator pool size
torch.cuda.memory_summary()     # human-readable breakdown, prints to stdout

stats = torch.cuda.memory_stats()
stats["allocated_bytes.all.current"]
stats["reserved_bytes.all.current"]
stats["inactive_split_bytes.all.current"]   # fragmentation indicator
stats["num_alloc_retries"]                  # allocator had to retry/reclaim to satisfy an alloc
stats["num_ooms"]                           # OOM events seen by the allocator

memory_stats() is the diagnostic goldmine. The two counters worth watching over time are inactive_split_bytes and num_alloc_retries:

  • inactive_split_bytes are free pieces carved off larger blocks that cannot currently be merged or reused for a different size request. High and growing inactive splits with flat reserved memory is fragmentation, and it is exactly the state that produces “CUDA out of memory” while nvidia-smi shows gigabytes free.
  • num_alloc_retries climbing means the allocator is regularly failing to find a suitable block and having to free cached memory and retry. That is early-stage memory pressure, before OOMs start.
  • num_ooms is the allocator’s own count of out-of-memory events, useful for confirming that application-level OOM errors actually came from allocation failure.

If you use backend:cudaMallocAsync (see tuning below), some memory_stats() values are not meaningful under that backend and are reported as zero.

The three situations that all look like “high memory”

From nvidia-smi alone, these are indistinguishable. From the allocator stats, they are easy to separate:

Situationnvidia-smi FB_USEDreservedallocatedinactive_split_bytesVerdict
Normal cachingHigh, flat plateauFlatOscillates with workloadLowHealthy, do nothing
FragmentationHigh, flatFlatFlatHigh and growingReal problem, OOM risk
True leakClimbing, no plateauClimbingClimbing or reserved-only growthAnyLeak, see the leak guide

The discriminator is the trend, not the level. A flat plateau at 95% for days is normal for a well-tuned training job and should not page anyone. A slow, steady climb with no plateau, even from a lower baseline, is the leak signature and deserves investigation long before OOM. For the leak case, see NVIDIA GPU memory leak: framebuffer usage climbing without a plateau. For the OOM event itself, see CUDA out of memory: diagnosing NVIDIA GPU framebuffer exhaustion.

One more trap: PyTorch can report OOM while nvidia-smi shows free memory. The free memory exists in aggregate, but not as a contiguous block large enough for the request. This is fragmentation made visible, and it is more common in inference serving (dynamic batch sizes, model switching, frequent small allocations) than in steady training.

Reading memory correctly during an incident

When someone reports “the GPU is out of memory” or “memory looks wrong,” work down the layers:

  1. Establish the driver-level picture. nvidia-smi --query-gpu=memory.used,memory.total,memory.free and --query-compute-apps to see total usage and which process holds it. On MIG-enabled GPUs, check per-instance metrics, not the physical card aggregate; one slice can be OOM while the card-level number looks fine.
  2. Compare against the workload’s baseline. Is this a plateau (normal caching) or a climb (leak)? A single snapshot cannot answer this. You need history.
  3. Get allocator-level truth. Pull memory_allocated(), memory_reserved(), and the inactive_split_bytes, num_alloc_retries, and num_ooms counters from the process. If reserved minus allocated is large and stable, that is cache. If inactive splits are large and growing, that is fragmentation.
  4. Correlate with application errors. If the job is throwing CUDA OOM while FB_USED is below total, you are looking at fragmentation, not capacity exhaustion. If num_ooms is zero and the error is something else (illegal memory access, launch failure), memory is a red herring; look at application bugs or Xid events instead.
  5. Only then act. The actions differ completely: cache needs nothing, fragmentation needs allocator tuning or allocation-pattern changes, a leak needs a code fix, and true capacity exhaustion needs a smaller model, smaller batches, or a bigger GPU.

Tuning knobs, with tradeoffs

These change allocator behavior. All are set before process start; none are free.

  • torch.cuda.empty_cache(): releases cached (unused) blocks back to the driver, dropping nvidia-smi FB_USED. It does not fix fragmentation of in-use blocks, and the next allocations pay the cudaMalloc cost again. Useful as a diagnostic (“does FB_USED drop when I empty the cache? then it was cache”), marginal as a production remedy.
  • PYTORCH_CUDA_ALLOC_CONF / PYTORCH_ALLOC_CONF: environment variable controlling the allocator. PYTORCH_CUDA_ALLOC_CONF is the legacy alias for PYTORCH_ALLOC_CONF; PyTorch documents both names as accepted. Relevant options include max_split_size_mb (caps block splitting, the standard fragmentation knob), expandable_segments:True (uses expandable CUDA allocations to grow segments for varying allocation sizes instead of repeatedly making fixed-size allocations; marked experimental and disabled by default in the PyTorch stable documentation), garbage_collection_threshold, and backend:cudaMallocAsync (alternative allocator backend, requires CUDA 11.4+, changes which memory_stats are meaningful).
  • Allocation patterns: the durable fix for fragmentation is usually in the workload: stable batch sizes, preallocated buffers, avoiding alternating large and small allocations on the same stream.

Do not set tuning flags blindly. Measure inactive_split_bytes first so you know whether you have the problem the knob addresses.

Signals to watch in production

SignalWhy it mattersWarning sign
FB_USED trend (per GPU, per process)The only way to separate plateau (cache) from climb (leak)Sustained growth over hours with no plateau
reserved_bytes vs allocated_bytesShows cache pool size vs real tensor demandLarge stable gap is normal; reserved growing while allocated is flat deserves a look
inactive_split_bytesDirect fragmentation measurementHigh and growing, especially with alloc retries
num_alloc_retriesEarly memory pressure before OOMsSteadily increasing during steady-state operation
num_ooms + application CUDA error logsOOM detection belongs at the application layer, not the percentage gaugeAny OOM while nvidia-smi shows free memory means fragmentation
memory.used / memory.totalCapacity planning context only>90% sustained is a capacity warning, never a page by itself

Do not alert on memory percentage. Well-tuned ML workloads run at 95-99% FB_USED by design. Alert on the trend (leak), on the allocator counters (fragmentation), and on application-level OOM events (real exhaustion). Percentage belongs on capacity planning dashboards, where you should plan against peak reserved memory per workload class, not against the instantaneous nvidia-smi number.

How Netdata helps

  • Netdata collects per-GPU framebuffer usage and per-process GPU memory from NVML/nvidia-smi at per-second resolution, which is what makes the plateau-versus-climb distinction visible. Minute-resolution scrapes smear both into the same shape.
  • Long retention on the FB_USED series lets you establish per-workload baselines, so “stable but slightly above baseline” leak drift is caught days before OOM.
  • Per-process memory attribution shows which PID’s reservation is growing, which matters on shared nodes where the aggregate line hides the culprit.
  • Correlating memory curves with GPU utilization helps: high memory with zero compute and a dead process is a zombie CUDA context holding its reservation, not an active workload.
  • Pairing node-level GPU metrics with application-level CUDA error logs closes the gap: OOM detection should come from the application, and log and metrics correlation puts the OOM event next to the memory curve that explains it.