Memory usage is the amount of RAM or processor memory a computation consumes. It is a practical limit on GNN training: a graph that does not fit in available memory can slow a system or cause it to crash. Track it alongside time per epoch and time to convergence when deciding whether a workload will scale. section 7.2.3 section 7.2.2 section 7.0
Start with the graph’s stored data. Node features, edge features, and adjacency matrices all require memory; larger graphs and higher-dimensional features increase demand. Dataset size alone is therefore not a complete memory estimate. section 7.2.3
Make memory a planning and benchmarking check:
- Estimate dataset size for each phase and check the available hardware. A planning rule of thumb is memory capacity 4–10 times the dataset size. section 7.3.2
- Run a representative workload and record memory utilization as a baseline. Watch for usage approaching capacity rather than waiting for a slowdown or crash. section 7.3.2 section 7.2.2
- If capacity is a constraint, consider processor choice, sparse representation, GNN algorithm choice, sampling-based batches, remote backends, or graph coarsening. section 7.0
Measure the memory in use
For process RAM, `psutil.Process(os.getpid()).memory_info().rss` returns resident set size: the portion of the process held in RAM. For an NVIDIA GPU, initialize `pynvml`, obtain a device handle, and read `pynvml.nvmlDeviceGetMemoryInfo(handle).used`. These measurements distinguish process RAM from used GPU memory. section 7.2.3






