Android dumpsys meminfo "Swapped Dirty" coloumn meaning?
Asked Answered
L

1

3

There are many questions asked regarding output of the "adb shell dumpsys meminfo" like this one: adb shell dumpsys meminfo - What is the meaning of each cell of its output? And now we have this nice article describing types of memory allocations: https://developer.android.com/tools/debugging/debugging-memory.html

And yet, there is no mentioning of "Swapped Dirty" type of memory allocation. What is this beast? AFAIK, Android does not swap dirty pages and yet sometimes I'll get non zero value in that column:

                  Pss  Private  Private  Swapped     Heap     Heap     Heap
                Total    Dirty    Clean    Dirty     Size    Alloc     Free
               ------   ------   ------   ------   ------   ------   ------
 Native Heap     3861     3844        0     2024     7128     6801      326
 Dalvik Heap     7073     6996        0     5408    45111    31778    13333
Lewie answered 16/6, 2015 at 15:52 Comment(0)
L
4

Some Android devices do use swap, but they swap to RAM rather than flash. Linux has a feature called ZRAM that compressed pages and then swaps them to a special RAM area, and decompresses them again when needed.

So the pages listed in "Swapped Dirty" are likely in ZRAM.

Ladanum answered 16/12, 2015 at 9:20 Comment(3)
Thanks a lot! Now I see here: source.android.com/devices/tech/config/low-ram.html that android can be configured to support zRAM. Although I not sure whether it really was my case or how to test it - marking as "answered". I guess this column is reserved for this kind of functionality.Lewie
if you have ZRAM enabled, the lowest lines of 'dumpsys meminfo' typically shows it: ZRAM: 3,024K physical used for 9,224K in swap ( 520,908K total swap)Ladanum
So the pages listed in "Swapped Dirty" are likely in ZRAM. Is that means that pages swapped out always dirty in android?Because I see the column "SwapPss Dirty" but not see some thing like "SwapPss clean" columnsLadykiller

© 2022 - 2024 — McMap. All rights reserved.