Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 374
Mayank Avatar asked Nov 06 '14 09:11

Mayank


People also ask

What is Dumpsys Meminfo?

A good place to get started investigating memory usage of a process is dumpsys meminfo which gives a high-level overview of how much of the various types of memory are being used by a process.

What is Dumpsys in ADB?

dumpsys is a tool that runs on Android devices and provides information about system services. You can call dumpsys from the command line using the Android Debug Bridge (ADB) to get diagnostic output for all system services running on a connected device.

What are adb shell commands?

Android Shell Commands. ADB is Android Debug Bridge which is a command line utility included with Google's Android SDK. It provides a terminal interface to control your Android device connected to a computer using a USB. ADB can be used to run shell commands, transfer files, install/uninstall apps, reboot and more.


1 Answers

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

like image 62
gheni4 Avatar answered Oct 11 '22 16:10

gheni4