Android Memory _ from a test perspective

Source: Internet
Author: User

Some time ago to do some performance testing about the app, first some basic knowledge of memory.

1. Memory Name:

VSS = Virtual Set size = Memory consumed (contains memory consumed by shared libraries)

Rss-resident Set Size actually uses physical memory (contains memory consumed by shared libraries)

Pss-proportional Set Size Actual physical memory used (proportional allocation of memory consumed by shared libraries)

Uss-unique the Set Size process consumes the physical memory alone (does not contain the memory occupied by the shared library)
Can't you read it? In fact, I do not know very well. Reproduced in a blog post, the yellow part behind it has a certain explanation for this 4 memory (http://www.cnblogs.com/0616--ataozhijia/p/3713542.html).

But there is a conclusion: In general, the two numbers you want to watch is the Pss and Uss (Vss and Rss is generally worthless, be Cause they don ' t accurately reflect a process ' s usage of pages shared with other processes)

Conclusion Source Address: Http://elinux.org/Android_Memory_Usage

2. The testing significance of PSS and USS:

1. USS is a very accurate response to an app's memory situation, PSS accuracy is slightly worse, but can still be used.

2. A little note on PSS: the "proportionate Set Size" is a statistic, the Android system computes, to determine if it's going To kill your process. [The Android system will decide whether or not to kill the process depending on how much the app occupies on PSS]

Conclusion Source Address: http://www.littleeye.co/blog/2013/06/11/android-memory-management-understanding-app-pss/

3. How to obtain PSS and USS:

A. Procrank tools: Command Procrank | grep Apk_pakagename (Note that this tool generally does not have a mobile phone [whether or not root], the engineering system will exist, such as: CyanogenMod)/It can be queried to: USS,VSS,RSS,PSS, very efficient but the mobile phone system has certain requirements.

B. Dumpsys command: Dumpsys meminfo apk_pakagename, this command can be obtained to PSS, view total pss.

4. RSS and VSS

A. You can use the ADB top or PS command to get it, but it doesn't make much sense, and it's not recommended to test your app's memory footprint with this command.

Android Memory _ from a test perspective

Related Article

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.