To check memory usage per process in total we can execute below command #. P PROCESSFILTER, -processfilter=PROCESSFILTER h, -help show this help message and exit There are various filters which you can apply with smem as shown below with the latest available release (1.4) at the time of writing this article #. There is a tool named smem that collates the information from the smaps files and presents it in various ways, including as pie or bar charts. Note that the Rss is 58.7 M but because it is shared between many other processes, the Pss is only 56.4 MB. In other words, Pss is the number we have been looking for. Thus, if you add the Pss numbers for all processes, you will get the actual amount of memory being used by those processes. For example, if an area of library code is 12 pages long and is shared by six processes, each will accumulate two pages in Pss. Pss: This splits the accounting of shared pages that are committed to physical memory between all the processes that have them mapped.It is the amount of memory that would be freed if the process were to terminate. Uss: This is the amount of memory that is committed to physical memory and is unique to a process it is not shared with any other.In 2009, Matt Mackall began looking at the problem of accounting for shared pages in process memory measurement and added two new metrics called the unique set size or Uss, and the proportional set size or Pss Using smem to check memory usage per process However, they are not very accurate in the absolute measurements of memory usage. These simple commands give you a feel of the memory usage and give the first indication that you have a memory leak when you see that the Rss of a process keeps on increasing.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |