2

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?

0

2 Answers 2

2

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.

4
  • Isn't swap area located in file system? And could you please explain how memory can be located nowhere? Commented May 23, 2013 at 16:24
  • 1
    The swap area is generally located on a raw device. Inside it, there might be some light structure (eg: Linux) or not (eg: Solaris) but definitely nothing like a file system (i.e. directories and files). Memory can be located "nowhere" when it has been allocated (malloc, brk, mmap) but hasn't been either written to or read from yet. There is no need to store anywhere something that has not yet any content.
    – jlliagre
    Commented May 23, 2013 at 21:24
  • What unix utility can I use to monitor process's memory in more detail than ps? I want to have a look at each item you've mentioned, is that possible? Commented May 24, 2013 at 17:49
  • 1
    pmap -x pid should give you a detailed information about memory segments a process uses.
    – jlliagre
    Commented May 24, 2013 at 20:01
1

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

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .