Add a new FAQ entry about the memory states displayed by top.
(answer from a John Dyson newgroup post) PR: docs/38117
This commit is contained in:
parent
8c4d32e232
commit
c2f098f25f
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=16797
1 changed files with 61 additions and 0 deletions
|
@ -7276,6 +7276,67 @@ define(`confDELIVERY_MODE',`deferred')dnl</programlisting>
|
|||
accessing tens of thousands of tiny files.</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<qandaentry>
|
||||
<question id="top-memory-states">
|
||||
<para>What do the various memory states displayed by
|
||||
<command>top</command> mean?</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<itemizedlist>
|
||||
<listitem><para><literal>Active</literal>: pages recently
|
||||
statistically used.</para></listitem>
|
||||
|
||||
<listitem><para><literal>Inactive</literal>: pages
|
||||
recently statistically unused.</para></listitem>
|
||||
|
||||
<listitem><para><literal>Cache</literal>: (most often)
|
||||
pages that have percolated from inactive to a status
|
||||
where they maintain their data, but can often be
|
||||
immediately reused (either with their old association,
|
||||
or reused with a new association.) There can be certain
|
||||
immediate transition from active to 'cache' state if the
|
||||
page is known to be clean (unmodified), but that
|
||||
transition is a matter of policy, depending upon the
|
||||
algorithm choice of the VM system
|
||||
maintainer.</para></listitem>
|
||||
|
||||
<listitem><para><literal>Free</literal>: pages without
|
||||
data content, and can be immediately used in certain
|
||||
circumstances where cache pages might be ineligible.
|
||||
Free pages can be reused at interrupt or process
|
||||
state.</para></listitem>
|
||||
|
||||
<listitem><para><literal>Wired</literal>: pages that are
|
||||
fixed into memory, usually for kernel purposes, but also
|
||||
sometimes for special use in
|
||||
processes.</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>Pages are most often written to disk (sort of a VM
|
||||
sync) when they are in the 'inactive' state, but 'active'
|
||||
pages can also be synced also (but requires the
|
||||
availability of certain CPU features.) This depends upon
|
||||
the CPU tracking of the 'modified' bit being available,
|
||||
and in certain situations there can be an advantage for a
|
||||
block of VM pages to be synced, whether they are active or
|
||||
inactive. In most common cases, it is best to think of
|
||||
the 'inactive' queue to be a queue of relatively unused
|
||||
pages that might or might not be in the process of being
|
||||
written to disk. 'Cached' pages are already 'synced', not
|
||||
mapped, but available for immediate process use with their
|
||||
old association or with a new association. Free pages are
|
||||
available at interrupt level, but cached or free pages can
|
||||
be used at process state for reuse. Cache pages aren't
|
||||
adequately locked to be available at interrupt
|
||||
level.</para>
|
||||
|
||||
<para>There are some other flags (e.g. Busy flag or busy
|
||||
count) that might modify some of the rules that I
|
||||
described.</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
</qandaset>
|
||||
</chapter>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue