# RSS vs VSZ in Virtual Memory: What the OOM Killer Actually Counts

DevFeed: [RSS vs VSZ in Virtual Memory: What the OOM Killer Actually Counts](<https://devfeed.tech/articles/rss-vs-vsz-in-virtual-memory-what-the-oom-killer-actually-counts-39569.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/17-virtual-memory-rss-vsz-oom-killer/>)

Author: hello@ankit-rana.com

Published: 2026-03-17T00:00:00Z

Content type: tutorial

Language: en

Sources: [Ankit Rana | Mechanical Sympathy](<https://devfeed.tech/sources/ankit-rana-mechanical-sympathy.md>)

Topics: [Processes](<https://devfeed.tech/topics/processes.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Kernel](<https://devfeed.tech/topics/kernel.md>)

Tags: [cpu](<https://devfeed.tech/tags/cpu.md>), [linux](<https://devfeed.tech/tags/linux.md>), [memory](<https://devfeed.tech/tags/memory.md>), [observability](<https://devfeed.tech/tags/observability.md>), [operating-systems](<https://devfeed.tech/tags/operating-systems.md>), [pages](<https://devfeed.tech/tags/pages.md>), [performance](<https://devfeed.tech/tags/performance.md>), [process](<https://devfeed.tech/tags/process.md>), [virtual-memory](<https://devfeed.tech/tags/virtual-memory.md>)

## AI overview

This tutorial explains the difference between virtual address space (VSZ) and resident memory (RSS). Allocating memory usually reserves virtual addresses without immediately assigning physical pages; pages are committed when accessed, often through page faults. It concludes that Linux's OOM killer primarily responds to physical memory consumption, making RSS more useful than allocation counters when investigating process termination under load.

## Source excerpt

malloc() does not hand you RAM, it reserves virtual address space. VSZ is a credit limit; RSS is cash. Physical pages are committed one page fault at a time as you actually touch memory, which is why the reservation is cheap and the memset is expensive. The OOM killer selects on RSS, so virtual promises are not what gets your process killed.