L
Logs in the Sky
GPU Without the Guesswork

How to Know Video Memory: Check GPU Capacity and Usage

How to Know Video Memory: Check GPU Capacity and Usage
Learn how to know video memory on Windows, macOS, and Linux, check live GPU usage, and estimate whether an AI model will fit before deploying it.

A model fails with an out-of-memory error, and the first question is how to know video memory is available on the GPU actually running it. On Windows, open Task Manager and select Performance, then GPU. On an NVIDIA GPU, run `nvidia-smi` in a terminal for total and used memory. On a Mac, check unified memory under Apple menu > About This Mac; it is shared system memory, not a dedicated VRAM figure.

The important distinction is capacity versus free space. A GPU may have enough total memory for your model on paper but not enough available after the operating system, other processes, and your application allocate their share. Let’s check both before changing model settings.

Check video memory on Windows

Press Ctrl+Shift+Esc to open Task Manager, choose Performance, and select the GPU you want to inspect. Look for dedicated GPU memory and its usage graph. If there are multiple GPU entries, check each one: a laptop can expose both integrated graphics and a separate GPU, and the one driving your display is not necessarily the one running inference.

Task Manager can also show shared GPU memory. That is system RAM the GPU may access, not an extra pool of dedicated VRAM you can simply add to the GPU’s advertised capacity. Integrated GPUs commonly rely on shared memory, so their reported dedicated amount may not describe the whole picture.

For another capacity readout, open Settings, go to System > Display > Advanced display, and select Display adapter properties for the relevant display. The adapter information includes dedicated video memory. Windows menus can vary by version, and this view describes the display adapter, which may differ from your compute GPU.

If you have NVIDIA drivers installed, open PowerShell or Command Prompt and run `nvidia-smi`. Its memory-usage column gives a quick view of used and total device memory, alongside the GPU name and active processes when available. If the command is not found, check the driver installation and PATH; it is not a universal command for every graphics vendor.

Illustration for how to know video memory

How to know video memory on Linux and in containers

For an NVIDIA device on Linux, start with `nvidia-smi`. To get a compact per-device reading, run `nvidia-smi --query-gpu=index,name,memory.total,memory.used,memory.free --format=csv`. The output identifies each visible GPU and reports memory figures at that moment. Check the units in the output rather than assuming every tool uses the same definition of a gigabyte.

For AMD GPUs, the available tools and readings depend on the driver and software stack. `rocm-smi` can report device information on supported ROCm installations; consult its help output for the options available on your system. Do not assume a CUDA-specific command will work on an AMD device.

Inside a container or hosted job, run the check inside the same environment as the application. The host may have several GPUs while your process can see only one or a subset. Environment variables such as `CUDA_VISIBLE_DEVICES` can also change which CUDA devices your application sees and how they are numbered. Match the device name and, when needed, its UUID rather than assuming device zero means the same thing everywhere.

A missing GPU inside a container can be a device-passthrough or driver configuration issue, not proof that the machine has no GPU. Start by comparing the host and container views, then inspect the container runtime configuration. On a managed platform, use the job’s logs or terminal and verify that the selected GPU appears after the workload starts.

What the Mac number means

On Apple silicon, CPU and GPU share unified memory. Open Apple menu > About This Mac to see the installed memory, or use System Information for more hardware detail. That number is useful for establishing the machine’s overall memory capacity, but it is not a guarantee that the entire amount is available to a GPU workload.

Other applications and the operating system use that same pool. Open Activity Monitor and select the Memory tab to inspect system memory pressure while the workload runs. Some tools also expose GPU-related allocation figures, but their accounting may differ from the memory reported by a machine-learning framework. Treat these readings as complementary, not interchangeable.

An Intel-based Mac with a discrete GPU can have dedicated video memory. Check its graphics information in About This Mac or System Information rather than applying the Apple silicon shared-memory assumption to every Mac.

Visual context for how to know video memory

Measure what your application actually uses

A device-level snapshot tells you what is occupied, but it does not necessarily tell you which part of your application caused the peak. For a PyTorch CUDA workload, `torch.cuda.mem_get_info()` returns free and total device memory in bytes for a selected device. Run it after selecting the intended device and again after loading the model.

PyTorch also exposes `torch.cuda.memory_allocated()` and `torch.cuda.memory_reserved()`. Allocated memory tracks memory occupied by tensors managed by PyTorch; reserved memory includes blocks held by its caching allocator. These values can differ from device-wide usage because the driver, CUDA context, other libraries, and other processes also consume memory.

For a useful comparison, record the GPU name, free memory before loading, memory after loading, and the peak during a representative request. In PyTorch, reset the peak counters before the request and inspect `torch.cuda.max_memory_allocated()` afterward. A short prompt or tiny image may fit even when a production-sized request does not, so note the input size, batch size, precision, and concurrency alongside the reading.

Device memory changes while a job is running. If an allocation fails despite a seemingly adequate earlier snapshot, check for concurrent processes and capture usage closer to the failure. Fragmentation and framework allocation behavior can matter too.

Estimate whether a model will fit

A rough starting point for model weights is parameter count multiplied by bytes per parameter. For example, 7 billion parameters at two bytes each require about 14 billion bytes for weights alone, roughly 13 GiB. That is an illustration, not a deployment target: actual storage depends on the model format and precision.

Leave additional room for runtime overhead, intermediate tensors, and the key-value cache used during text generation. Longer contexts, larger batches, and concurrent requests can increase that requirement. Training needs still more memory for items such as gradients and optimizer state; an inference estimate is not a training budget.

Quantization can reduce weight storage, but it does not eliminate runtime overhead, and compatibility depends on the model and inference engine. Before deploying to Beam or another hosted GPU service, verify the device visible to the running job and measure a representative request there. Choose capacity with headroom for the workload you expect, then watch memory and errors as traffic changes. No panic, just logs.

Last revised · 2026-11-17 23:38
Letters
Readers Write

No letters yet — be the first to write.

Write a letter
© 2026 Logs in the Sky. Logs in the Sky