- 浏览: 283566 次
- 性别:
- 来自: 厦门
-
文章分类
最新评论
-
chenxliang:
2016年10月26、27日,上海浦东,Postgres中国用 ...
用JDBC连接Postgres(Postgres学习笔记1) -
cuiran:
不错,讲的很详细。
web.xml 中的listener、 filter、servlet 加载顺序及其详解 -
i_am_birdman:
PostgreSQL的管理启动服务pg_ctl -D /pat ...
PostgreSql 数据库备份恢复 删除 建立 -
i_am_birdman:
songshuang 写道现在觉悟也不晚!加油!
加油呵呵
人生规划啊 -
songshuang:
现在觉悟也不晚!加油!
人生规划啊
一般来说内存占用大小有如下规律:VSS >= RSS >= PSS >= USS 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. # procrankTerms
Overview
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
#
发表评论
-
linux的.bash_history
2013-02-23 15:52 13455今天看到一个人写的文章,说通过.bash_history来获取 ... -
shell 的 && 和 ||
2013-02-18 18:15 1057Shell && 和 || shell 在执 ... -
在网卡上绑定多个ip
2012-05-11 09:36 926如果要在eth0网卡设备上添加两个lP别名192.168.8. ... -
echo -e
2012-03-10 10:09 991[Gogo_yueyue@ShadowFiend ~] ... -
SSH无密码自动登录
2012-03-03 11:41 1017[root@ShadowFiend Gogo_yu ... -
ip端口请求转发(dnat)
2012-02-20 22:59 2495[福建]Mr.G(51061358) 21:26:14 有个 ... -
ulimit
2012-02-17 11:47 1000通过 ulimit 改善系统性能[url] http://ww ... -
linux tree 命令
2012-02-17 10:57 1493http://www.centerkey.com/tree/上 ... -
centos64位安装Adobe Flash Player
2012-01-17 21:19 1183从ADOBE网站上下载了个RPM (http://get.ad ... -
linux 防火墙 终端修改
2011-11-30 10:17 1226之前一直在图形用户界面修改的防火墙端口。这次因为某台服务器没有 ... -
SQLite入门与分析(一)---简介
2011-10-09 11:07 862写在前面:出于项目 ... -
/linux/null
2011-09-23 14:58 959/dev/null 2>&1 详解 ... -
R,Rserve安装
2011-08-15 09:50 2252统计计算引擎用R做。 R的安装: ... -
Linux服务器性能评估与优化(没事多看看)
2011-07-25 09:40 753原文地址:http://www.itlearner.com/a ... -
删除Openoffice.org
2011-07-08 11:06 1024这个问题前后困扰我快半个月了,你妹的,Openoffice问题 ... -
linux上ln命令详细说明
2011-06-29 20:56 1338ln是linux中又一个非常重 ... -
dia 安装
2011-05-13 14:35 1662Configuration: Source code ... -
linux root 用户vi颜色 普通用户vi有颜色?--转
2011-05-11 19:56 2232vi是没有颜色的,vim是有颜色的。可是系统中没有安装vim。 ... -
wordpress安装过程
2011-05-10 20:27 2115安装前提:PHP ,Apache ,Mysql都已经安装。其实 ... -
./configure 时提示权限不足
2011-05-09 13:53 1433真是悲剧。。 chomd 777 configure ...
相关推荐
一般来说,VSS >= RSS >= PSS >= USS。其中,USS 较小的原因是因为手机内存较小时,一般会将程序交由虚拟内存运行;程序所调用引入的接口类长度较大,占用内存高。 PSS 的重要性 PSS 是一个非常有用的数字,因为...
3. 使用procrank命令:procrank命令可以查看Android系统中各个进程的内存使用情况,包括PSS、USS、VSS和RSS等。通过观察USS的变化,可以更容易地发现内存泄露。 4. 使用脚本配合procrank:通过脚本定期调用procrank...
1. **VSS (Virtual Set Size)**:虚拟耗用内存,包含共享库占用的内存。 2. **RSS (Resident Set Size)**:实际使用物理内存,同样包含共享库占用的内存。 3. **PSS (Proportional Set Size)**:实际使用的物理内存...
- VSS(Virtual Set Size):虚拟耗用内存,包括共享库占用的内存。 - RSS(Resident Set Size):实际使用的物理内存,也包括共享库占用的部分。 - PSS(Proportional Set Size):按比例分配的共享内存,反映了...
- **VSS (Virtual Set Size)**:虚拟耗用内存,包括共享库占用的内存。 - **RSS (Resident Set Size)**:实际使用物理内存,包括共享库占用的内存。 - **PSS (Proportional Set Size)**:实际使用的物理内存,...
Procrank列出所有进程的内存占用情况,VSS、RSS、PSS和USS分别表示虚拟耗用内存、实际物理内存、比例分配的物理内存和进程独占的物理内存。在分析内存泄漏时,USS是一个重要的参考指标。 3. `dumpsys meminfo` 这...