Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>My understanding is as follows.<br> And I agree these numbers are hard to understand and showing inconsistent values.</p> <ul> <li><p>MemTotal</p> <pre><code>= MemFree + Active + Inactive + Slab + PageTables + VmallocUsed + X (X : alloc_pages() (get_free_pages(), etc)) </code></pre> <p>But recent kernel's vmallocused value could be wrong. This is because it counts VM_xxx regions like VM_IOREMAP, VM_MAP,... other than VM_ALLOC area. </p> <p>VM_IOREMAP region can be mapping memory which can be outside of kernel's memory management, so the formula above can be not precise, or completely wrong.</p> <p>You can either do:</p> <ul> <li>Check /proc/vmallocinfo to sort out all the entries and filter by yourself, </li> <li>Modify fs/proc/mmu.c: get_vmalloc_info() to count regions only when if(vma->flags &amp; VM_ALLOC)</li> </ul></li> <li><p>Active + Inactive</p> <pre><code> = Buffers + Cached + SwapCached + AnonPages </code></pre></li> <li><p>AnonPages</p> <pre><code> = /proc/*/task/*/smaps anonymous area all sum (anonymous: no name|[heap]|/dev/zero|/dev/shm/*|[stack]) </code></pre> <p>Although I haven't been able to match these numbers. See <a href="https://stackoverflow.com/questions/6885107/want-to-make-smaps-output-anonymous-region-sum-and-proc-meminfo-anonpages-to-mat">here</a> and help me if you have any clue.</p></li> <li><p>Total PageCache</p> <pre><code> = Buffers + Cached + SwapCached </code></pre></li> <li><p>Slab</p> <pre><code> = SReclaimable + SUnreclaim </code></pre></li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload