Memory usage
Memory usage is the amount of computer memory occupied, allocated, or required by a program, system, data structure, or computation during operation.
Fast by Default
The amount of computer memory occupied by a software process or application during operation.
- How it is used
- Sets enforceable RAM limits that protect responsiveness, stability, device capacity, and backend scalability.
- How deep it goes
- Develops budgets, checkpoint measurements, leak signatures, snapshot comparisons, and platform-specific profiling workflows.
- Examples
- Uses mobile navigation retention, desktop image export, and backend per-request concurrency calculations.
- What you can do after
- Diagnose/debug with platform profilers by comparing baselines, repeated actions, snapshots, and extended-session memory growth.
Fast Python: High performance techniques for large datasets
- How it is used
- Uses memory measurement to keep data processing in memory, enable parallel processes, and reduce data-loading costs.
- How deep it goes
- Develops an iterative Python object-size estimator and column-level measurements, while cautioning that external objects and profilers can defeat reliable estimates.
- Examples
- Measures NOAA station-file containers and a New York taxi data frame, then illustrates GPU residency with CuPy and NumPy arrays.
- What you can do after
- Diagnose memory usage with Python object-size estimates and pandas deep inspection, then evaluate data-type and precision changes.
Read how Fast Python: High performance techniques for large datasets explains memory usage →
Troubleshooting Java, Second Edition
Memory usage is the amount of runtime memory occupied or allocated by a process or its components.
- How it is used
- Guides investigation of slow, frozen, or failing Java applications by relating memory consumption to allocation, retention, and garbage collection.
- How deep it goes
- Explains monitoring, sampling, leak patterns, and heap pressure, while deferring detailed memory instrumentation and GC-log analysis.
- Examples
- Uses VisualVM widgets, sampled Product objects, large video files, memory graphs, and repeated full-GC log entries.
- What you can do after
- Diagnose memory pressure with VisualVM sampling and GC graphs, distinguish leaks from insufficient allocation, and identify optimization targets.
Read how Troubleshooting Java, Second Edition explains memory usage →
Pandas Workout: 200 exercises to make you a stronger data analyst
Memory usage is the amount of computer memory occupied by a data structure or computation.
- How it is used
- Reduces pandas DataFrame resource consumption while preserving the data needed for analysis.
- How deep it goes
- Demonstrates import-time column selection and reports measured savings, while deferring detailed memory-measurement techniques.
- Examples
- Uses a 7.6-million-row New York City taxi dataset and a wide 264-column survey dataset.
- What you can do after
- Operate/configure pandas CSV imports to retain necessary columns and avoid overburdening available memory.
Read how Pandas Workout: 200 exercises to make you a stronger data analyst explains memory usage →
Graph Neural Networks in Action
The amount or proportion of available memory consumed by a computation.
- How it is used
- Uses memory consumption to identify GNN scaling problems alongside epoch time and convergence time.
- How deep it goes
- Defines memory usage, identifies graph storage demands, and shows monitoring methods; stops short of a complete memory budget.
- Examples
- Measures process resident set size with psutil and used NVIDIA GPU memory with pynvml.
- What you can do after
- Diagnose/debug with psutil and pynvml by measuring memory use before choosing a scaling strategy.
Read how Graph Neural Networks in Action explains memory usage →
The Art of Code
Memory footprint is the amount of system memory occupied by a program and its in-memory data during execution.
- How it is used
- Uses memory footprint as a resource constraint in sustainable coding and solution design.
- How deep it goes
- Works through allocation-reduction strategies and a Java example, then identifies measurement tools without quantifying savings.
- Examples
- Compares boxed and primitive age tracking, preallocates a names list, and combines stream aggregations.
- What you can do after
- Apply memory-reduction strategies and investigate allocations with profilers and microbenchmarks.
Advanced Algorithms and Data Structures
Memory consumption is the amount of memory occupied by a computation or program during execution.
- How it is used
- Uses memory profiling and space estimates to compare data structures and judge practical trade-offs.
- How deep it goes
- Develops node-count reasoning, key-size formulas, profiling comparisons, and structural trade-offs without detailing allocator internals.
- Examples
- Compares BST and treap allocations for integer and string keys, and contrasts trie storage when strings share prefixes or do not.
- What you can do after
- Evaluate data-structure choices by estimating space from node counts, key lengths, overhead, and measured allocations.
Read how Advanced Algorithms and Data Structures explains memory usage →
Rearchitecting LLMs
Memory consumption is the amount of computer memory required to store and execute a model or computation.
- How it is used
- Reduces model and runtime memory to fit larger prompts and relieve inference bottlenecks.
- How deep it goes
- Separates parameter and KV-cache savings, then reports pruning measurements and quality costs without giving a general memory-planning procedure.
- Examples
- Compares Qwen3 block removal and Llama attention-pruning configurations, including dynamic VRAM and benchmark changes.
- What you can do after
- Evaluate memory savings against benchmark and generation-quality losses, while treating shared-T4 throughput as directional.
Quantization and Fast Inference
Memory footprint is the amount of memory occupied by a model or computation.
- How it is used
- Frames memory footprint as a deployment constraint for LLM inference.
- How deep it goes
- Explains bit-width savings and KV-cache growth as context expands.
- Examples
- Uses a 7B model's per-token costs and contrasts KV-cache traffic at 512 and 128K tokens.
- What you can do after
- Evaluate how bit precision and context length affect inference memory traffic and energy.
Read how Quantization and Fast Inference explains memory usage →
Vibe Engineering
Memory usage is the amount of computer memory consumed by a running application or its data.
- How it is used
- Frames memory usage as a constraint for local model selection and application caching decisions.
- How deep it goes
- Compares memory thresholds, resident model parameters, eager caches, startup cost, and dictionary-size constraints.
- Examples
- Uses local-model RAM tiers, a cached word dictionary, JMH timings, Gatling latency results, and a 10MB sizing constraint.
- What you can do after
- Evaluate cache and local-inference choices by weighing memory capacity against latency, startup time, model capability, and data size.
AI for Everyday IT
Memory utilization is the proportion of available physical memory occupied by a system or workload.
- How it is used
- Calculates database memory utilization and identifies configurations exceeding a physical-memory threshold.
- How deep it goes
- Provides a worked SQL approach with unit conversion, conditional calculation, and threshold filtering rather than database internals.
- Examples
- Uses a configuration SELECT statement, a sample row, and a two-CTE calculation pattern.
- What you can do after
- Build it from scratch by prompting for a query that normalizes memory settings and reports utilization above 75%.
Troubleshooting Java: Read, debug, and optimize JVM applications
A measure of the memory occupied by a process or application.
- How it is used
- Investigates whether an application allocates memory efficiently and helps locate resource-related problems.
- How deep it goes
- Profiles process statistics and analyzes heap contents, while presuming basic Java memory-allocation knowledge.
- Examples
- Uses VisualVM observations of a producer-consumer app showing little memory use and zero GC activity.
- What you can do after
- Diagnose allocation problems by profiling memory statistics or inspecting a heap dump when execution cannot be profiled.
Read how Troubleshooting Java: Read, debug, and optimize JVM applications explains memory usage →
AI Model Evaluation
Memory footprint is the amount of memory occupied by a model or software process during operation.
- How it is used
- Tracks RAM consumption as a guardrail for model evaluations and online system performance.
- How deep it goes
- Defines memory consumption and its measurement role, but stops short of implementation-level memory optimization.
- Examples
- Uses a 2% click-through gain, half-second slowdown, doubled GPU cost, and RAM consumption under load as evaluation examples.
- What you can do after
- Diagnose infrastructure regressions by configuring memory utilization as an experiment guardrail and analyzing it under load.
Also covered in
- Quarkus in Action
- Delivering Machine Learning Projects: From design to deployment
- Go by Example
- Software Engineering for Data ScientistsIn early access (MEAP)
- Learn Concurrent Programming with Go
- Microsoft Azure in Action
- Writing for Developers: Blogs that get read
- LLMs in Production
- Domain-Specific Small Language Models
- Cloud Observability in Action
- Build a DeepSeek Model (From Scratch)In early access (MEAP)
- Learn Go with Pocket-Sized Projects
What to know first
- garbage collectionGarbage collection is an automated process that identifies and reclaims or removes memory, data, or other items no longer reachable or needed by a system.
- performancePerformance is a measure of how effectively a person, process, model, or system achieves its objectives, including qualities such as output quality, speed, and resource efficiency.
- CPUA central processing unit (CPU) is a computer processor that executes program instructions and performs general-purpose computational operations.
- meanThe mean is a measure of central location equal to the arithmetic average of numerical observations, or the probability-weighted average of a random variable’s possible values.
Related concepts
- gradient accumulationaddressed by · Gradient accumulation is a training technique that combines gradients from multiple smaller batches before applying an optimizer update to model parameters.
- quantizationaddressed by · Model quantization represents model parameters or computations with reduced-precision numerical values, often to lower storage or computational requirements.
- BenchmarkDotNetmeasured by · BenchmarkDotNet is a .NET library and tool for measuring and analyzing managed-code performance.
- bit precisionconfigured by · Bit precision is the number of bits used to represent a numerical value.
- categorical dataaddressed by · Categorical data consists of values representing membership in discrete categories rather than measured numerical magnitudes.
Questions about memory usage
What is memory usage?
Memory usage is the amount of computer memory occupied, allocated, or required by a program, system, data structure, or computation during operation.
Which Manning books explain memory usage?
Fast by Default, Fast Python: High performance techniques for large datasets, Troubleshooting Java, Second Edition, Pandas Workout: 200 exercises to make you a stronger data analyst, Graph Neural Networks in Action, The Art of Code, Advanced Algorithms and Data Structures, Rearchitecting LLMs and 5 more.
What should I know before learning memory usage?
Manning books that teach memory usage usually introduce garbage collection, performance, CPU and mean first.
What kinds of memory usage are there?
Kinds of memory usage include heap memory usage.
What is memory usage also called?
Memory usage is also called memory footprint, memory consumption, memory use or memory utilization.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.












