Memory Vss/rss/pss/uss noun Explanation

Source: Internet
Author: User

    • VSS (virtual set size) Virtual memory consumption (contains memory consumed by shared libraries)
    • RSS (resident set size) actual use of physical memory (contains memory consumed by shared libraries)
      •   RSS is the size of the part of the physical memory that the process actually exists in. Because a process execution does not require the entire process to be fully stored in physical memory. RSS is the most common memory metric that represents the amount of physical memory the process occupies. However, adding the RSS values for each process usually exceeds the memory consumption of the entire system, because each process in the RSS contains the memory shared between the processes, so there is an overlap.
      •   VSS is the total size of a process. Rss=vss only when the process executes and the entire process is stored in physical memory.
    • PSS (proportional set size) physical memory actually used (proportional allocation of memory consumed by shared libraries)
    • USS (Unique set size) the physical memory occupied by the process alone (does not contain the memory occupied by the shared library)
      • PSS is more accurate than RSS, which averages the size of the shared memory and then scales it up into processes.
      • The USS is its own part of PSS, which calculates only the amount of memory that the process occupies on its own, and does not contain any shared portions.

In general, memory footprint has the following rules: VSS >= RSS >= PSS >= USS

Overview

The aim of this post was to provide information that would assist in interpreting memory reports from various tools so the T Rue memory usage for Linux processes and the system can is determined.

Android have a tool called Procrank (/system/xbin/procrank), which lists out the memory usage of Linux processes I n order from highest to lowest usage. The sizes reported per process is VSS, RSS, PSS, and USS.

For the sake of simplicity in this description, memory would be a expressed in terms of pages, rather than bytes. Linux systems like ours manage memory in 4096 bytes pages at the lowest level.

VSS (Reported as VSZ from PS) are the total accessible address space of a process. This is the size also includes memory that May is resident in RAM like Mallocs that has been allocated but not written to. VSS is of very little use for determing real memory usage of a process.

RSS is the total memory actually held in RAM for a process. RSS can be misleading, because it reports the total all of the the the A-Libraries that process uses, even though a share D library is a loaded into memory once regardless of what many processes use it. RSS isn't an accurate representation of the memory usage for a single process.

PSS  differs from RSS in that it reports the proportional size of its s hared libraries, i.e. if three processes all use a shared libraries that have pages, that library would only contribute 10 Pages to the PSS are reported for each of the three processes. PSS is a very useful number because if the PSS for all processes in the system is summed together, which is a good repre Sentation for the total memory usage in the system. When a process was killed, the shared libraries that contributed to its PSS would be proportionally distributed to the PSS T Otals for the remaining processes still using that library. In this-a-slightly misleading, because when a process is killed, PSS does not accurately represent the memory Returned to the overall system.

USS is the total private memory for a process, i.e. that's memory that's completely unique to that process. USS is an extremely useful number because it indicates the true incremental cost of running a particular process. When a process was killed, the USS is actually returned to the system. USS is the best number to watch when initially suspicious of memory leaks in a process.

Memory Vss/rss/pss/uss noun Explanation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.