`
netcome
  • 浏览: 482086 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Memory: VSS/RSS/PSS/USS

阅读更多

Terms

 

VSS - Virtual Set Size 虚拟耗用内存(包含共享库占用的内存)

RSS - Resident Set Size 实际使用物理内存(包含共享库占用的内存)

PSS - Proportional Set Size 实际使用的物理内存(比例分配共享库占用的内存)

USS - Unique Set Size 进程独自占用的物理内存(不包含共享库占用的内存)

一般来说内存占用大小有如下规律:VSS >= RSS >= PSS >= USS

 

Overview

 

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

 

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

 

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

 

VSS (reported as VSZ from ps) is the total accessible address space of a process. This size also includes memory that may not be resident in RAM like mallocs that have 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 shared libraries that the process uses, even though a shared library is only loaded into memory once regardless of how many processes use it. RSS is not an accurate representation of the memory usage for a single process.

 

PSS differs from RSS in that it reports the proportional size of its shared libraries, i.e. if three processes all use a shared library that has 30 pages, that library will only contribute 10 pages to the PSS that is reported for each of the three processes. PSS is a very useful number because when the PSS for all processes in the system are summed together, that is a good representation for the total memory usage in the system. When a process is killed, the shared libraries that contributed to its PSS will be proportionally distributed to the PSS totals for the remaining processes still using that library. In this way PSS can be 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 memory that is 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 is killed, the USS is the total memory that is actually returned to the system. USS is the best number to watch when initially suspicious of memory leaks in a process.

 

For systems that have Python available, there is also a nice tool called smem that will report memory statistics including all of these categories.

 

# procrank

procrank

PID      Vss      Rss      Pss      Uss cmdline

481   31536K   30936K   14337K    9956K system_server

475   26128K   26128K   10046K    5992K zygote

526   25108K   25108K    9225K    5384K android.process.acore

523   22388K   22388K    7166K    3432K com.android.phone

574   21632K   21632K    6109K    2468K com.android.settings

521   20816K   20816K    6050K    2776K jp.co.omronsoft.openwnn

474    3304K    3304K    1097K     624K /system/bin/mediaserver

37     304K     304K     289K     288K /sbin/adbd

29     720K     720K     261K     212K /system/bin/rild

601     412K     412K     225K     216K procrank

   1     204K     204K     185K     184K /init

35     388K     388K     182K     172K /system/bin/qemud

284     384K     384K     160K     148K top

27     376K     376K     148K     136K /system/bin/vold

261     332K     332K     123K     112K logcat

33     396K     396K     105K      80K /system/bin/keystore

32     316K     316K     100K      88K /system/bin/installd

269     328K     328K      95K      72K /system/bin/sh

26     280K     280K      93K      84K /system/bin/servicemanager

45     304K     304K      91K      80K /system/bin/qemu-props

34     324K     324K      91K      68K /system/bin/sh

260     324K     324K      91K      68K /system/bin/sh

600     324K     324K      91K      68K /system/bin/sh

25     308K     308K      88K      68K /system/bin/sh

28     232K     232K      67K      60K /system/bin/debuggerd

#

分享到:
评论

相关推荐

    MPPT算法:“MPPT算法的MIL和SIL和PIL测试”论文:论文:http://www.tandfonline.com/doi/abs/10.1080/23311916.2017.1378475-matlab开发

    MPPT_10kHz_PWM_P&O:以 10 khz 实现 P&O 算法MPPT_10kHz_PWM_VSS-P&O:10 kHz 可变步长 P&O 算法的实现MPPT_1kHz_PWM_M-VSS-P&O:使用 1 khz 实现修正的可变步长 P&O 算法MPPT_10kHz_PWM_M-VSS-P&O:使用 10 khz ...

    MyEclipse插件介绍与下载

    - **VSS Plugin**:版本控制系统插件。 - **Implementors**:帮助跳转到方法的实现类。 - **CallHierarchy**:展示方法调用层次。 - **Eclipse Tidy**:检查和格式化HTML/XML文件。 - **Checkclipse**:检查代码风格...

    VSS迁移到Git的Debug版

    Vss2Git is a Windows GUI application that exports all or parts of an existing Microsoft Visual SourceSafe 6.0 (VSS) (Wikipedia) repository to a new Git repository. It attempts to construct meaningful ...

    Eclipse插件\快捷键

    - **VSS Plugin**:为 Eclipse 提供 VSS 版本控制系统的集成。 **下载地址**:[http://sourceforge.net/projects/vssplugin](http://sourceforge.net/projects/vssplugin) #### 17. Implementors - Provides ...

    eclipse插件大全介绍.

    - **功能**:Memory Manager 用于监控和管理 Eclipse 的内存使用。 - **特点**:帮助开发者优化内存占用。 **下载地址**:[http://cloudgarden.com/memorymanager/](http://cloudgarden.com/memorymanager/) --- ...

    Eclipse插件下载地址

    - **功能简介**:Memory Manager插件可以监控Eclipse的内存使用情况,帮助开发者发现潜在的内存泄漏等问题。 ##### 25. SWT Designer,Java GUI设计工具 - **下载地址**:[http://www.swt-designer.com/]...

    project docment_tools VSS / CVS / SVN / ClearCase / Hudson / GIT

    NULL 博文链接:https://lindows.iteye.com/blog/512414

    Hexo的MaterialDesign主题hexo-theme-material.zip

    More:介绍及文档:https://material.vss.imGithub: https://github.com/viosey/hexo-theme-materialDemo: 访问我的博客实时预览 Paradox 样式:Viosey's Blog:https://blog.viosey.comIsolation 样式 Demo:...

    在Eclipse中添加Myeclipse插件的方法

    7. **VSS Plugin**:VSS客户端插件,适用于版本管理。下载地址:[http://sourcefore.net/projects/vssplugin](http://sourcefore.net/projects/vssplugin)。 8. **Implementors**:追踪方法代码时,可以转到方法的...

    Vss2Git.zip,64位,

    vss2005 vss传SVN(不支持),支持vss转git, 源码来源于:https://github.com/trevorr/vss2git(只负责编译好,没有改一行代码;本次编译代码的版本号为:099cb72(2021年4月27日),版本代码地址:...

    Eclipse插件下载列表

    **简介**:VSS Plugin为Eclipse提供了对Visual SourceSafe (VSS) 版本控制系统的支持,允许开发者在Eclipse环境中直接进行版本管理和协同开发。 #### 十二、Implementors **名称**:Implementors **链接**:...

    html 网页加载

    在探讨HTML网页加载中的`<iframe>`元素时,我们首先需要理解`<iframe>`的基本概念、属性及其在网页设计中的作用。本篇文章将围绕提供的代码片段`...

    公司培训:vss使用及配置

    VSS,全称为Visual SourceSafe,是由微软公司开发的一款源代码版本控制系统,广泛应用于软件开发团队的协同工作和代码管理。本次公司培训主要围绕VSS的使用和配置展开,通过三个PPT,我们可以深入理解其核心功能和...

    基于TortoiseSVN的版本控制工具(与Delphi I

    它可以替代CVS,VSS等轻量级版本控制工具,它支持Local和Web(Apache)两种工作方式,并且最关键就是完全免费的。 在组织团队开发时,除了服务器端的工具之外,客户端也需要相应的工具才能访问源码库。而且,最好...

    Visual SourceSafe

    微软的Visual SourceSafe(VSS)是一款专为软件应用程序团队开发设计的版本控制系统。版本控制系统的存在是为了解决在多人协作开发过程中可能出现的问题,确保团队成员可以安全地同时修改代码,而不会相互冲突或丢失...

    uml tool比较

    - **备注**:ARTiSAN Studio是一个功能全面的建模工具,支持多种编程语言和开发环境,同时还可以与其他版本控制系统(如PVCS、VSS、ClearCase、CMSynergy)集成,适用于大型复杂项目的开发和管理。 #### Astah UML ...

    ADB 命令 查看内存和CPU VSS,RSS,PSS,USS

    本文将详细介绍如何使用ADB命令来查看内存(VSS,RSS,PSS,USS)以及CPU的使用情况。 首先,确保你已经正确地配置了ADB并成功连接到你的Android设备。配置ADB通常包括在电脑上安装Android SDK Platform Tools,并...

Global site tag (gtag.js) - Google Analytics