adb shell dumpsys meminfo - What is the meaning of each cell of its output?
Asked Answered
G

1

12

I was looking at the output given below for the command

adb shell dumpsys meminfo com.imangi.templerun

However, I am not able to understand this properly.

Can anybody help me understand this?

Temple Run memory info

Gonsalez answered 6/11, 2014 at 9:44 Comment(4)
possible duplicate of How do I discover memory usage of my application in Android?Wildfire
It is not a duplicate, also doesn't deserve closing.Accepter
it is a duplicate #17922277Quickly
I think its a different question as all other questions that people are pointing to are for older versions of Andorid and contains different parameters in the output.Gonsalez
T
13

Since columns and rows presented may vary for different versions of 'dumpsys', I'll try to provide some generic overview here...

Every application in Android runs in different process that is running instance of its own Dalvik VM.

  • Native Heap row represents memory used by the process itself (Ex: Native C mallocs).
  • Dalvik Heap is memory allocated by Dalvik VM (Ex: Variables in your Java Android code).
  • Dalvik Other is memory used for JIT and GC.

Android may share pages of memory among several processes (Think code of common frameworks). Clean memory is one that hasn't changed since it was allocated or loaded from storage (Code of your application). Dirty memory is space used for computations. Android does not have swap mechanism so Dirty memory is also RAM that will be freed when app exits.

  • Private Dirty is unshared dirty memory (guess you figured that).
  • Private Clean is unshared clean memory (and that).
  • PSS Proportional Set Size: Is a tricky measurement where all private pages contribute 100% of their size and shared memory contribute 'size/(num of processes shared)'. This way if you sum up all PSS for all processes you'll get total memory used.
  • Swapped Dirty No idea. I have question regarding this:Android dumpsys meminfo "Swapped Dirty" coloumn meaning?

Further reading: https://developer.android.com/tools/debugging/debugging-memory.html

Terryterrye answered 21/6, 2015 at 11:8 Comment(3)
This is sounds great .Thank you ! Clean memory is one that hasn't changed since it was allocated or loaded from storage (Code of your application). Dirty memory is space used for computations. Android does not have swap mechanism so Dirty memory is also RAM that will be freed when app exits.Jos
I think the reason is Anroid use ZRAM.Jos
“Swapped Dirty No idea.” I think the conception about dirty that explant by author is create. But,I'm not total agree with "android does not has swap mechanism ". As I know,Andriod has it's swap mechanism but not like PC in which swapped out pages to the disk. As Android use ZRAM,android swapped out pages to the RAM rather than to the disk intent to inprove pages swap performance,just like IOS!Jos

© 2022 - 2024 — McMap. All rights reserved.