Calculate total memory footprint of a process from RSS, shared and private memory.
RSS (Resident Set Size) reports the total physical memory a process currently has mapped, but this figure double-counts memory shared with other processes — most commonly pages from shared libraries like libc that every process on the system maps into its own address space. Subtracting that shared portion from RSS yields the private memory truly unique to this process, which is the more meaningful figure when estimating how much memory would actually be freed if the process exited, or how much total RAM a fleet of similar processes really consumes. VSZ (Virtual Size), by contrast, includes all mapped address space whether or not it is backed by physical RAM, and is typically much larger than RSS.
RSS in megabytes
RSS_MB = rss_pages × page_size_KB / 1024
Private memory
private = RSS − shared_libraries
If ten processes each map the same 10MB shared library, summing their individual RSS values counts that 10MB ten times over, dramatically overstating actual physical memory consumption. PSS (Proportional Set Size) or the private memory figure this calculator produces avoid that double-counting.
VSZ counts all virtual address space a process has reserved, including memory-mapped files, reserved-but-unused heap, and address space for libraries that may never be fully touched — none of which necessarily occupies physical RAM, so VSZ can be many times larger than the process's actual resident footprint.
Most x86_64 Linux systems use a 4KB base page size, though systems using HugePages for specific workloads may have some memory backed by much larger 2MB or 1GB pages — check getconf PAGE_SIZE to confirm the base page size on a given system.