What is usually meant by the phrase process memory usage, what does this actually mean, i.e. what does this memory consist of? And what column does it correspond in
ps aux output, RSS or VSZ?
RSS is the amount of RAM (physical memory) currently used by the process while VSZ is the size of the process virtual memory.
The latter consist of memory located:
- on RAM if the data has been accessed recently or if there is no pressure to release RAM
- on the swap area (swap partition or swap file) if it has been paginated out
- on the file system if the data correspond to memory mapped files (eg: shared libraries)
- nowhere (i.e. use no resource, especially on systems over-committing memory like Linux) if allocated pages have not been accessed yet
The fourth point is often overlooked.
The RSS indicates the non-swapped physical memory usage by the process and the VSZ stands for the Virtual memory used by the process. So I believe RSS indicates the exact RAM usage. The Virtual Memory is the combination of RAM & Disk space used (swap) by the process according to https://stackoverflow.com/questions/4970421/difference-between-virtual-memory-and-swap-space