Shane: My understanding is that the swap-cache is merely a different
"state"
Shane: of pages in the page-cache.

That's correct. Anonymous pages (=those that do not have a file backing
e.g. belong to an executable file
or shared library) that are considered not frequently used get a swap slot
assigned before paging them
out. At this point in time they are considered swap cache. Now the page
gets written out and eventually
removed from memory due to demand for other content. Once the page gets
accessed again, we read
it and consider it swap cache: if it needs to be removed from memory again,
but has not changed since
reading from disk, we can save the I/O to write it out and just recycle the
memory page.
Once swap space is 50% full Linux frees swap slots on paging in. In this
case, those pages are considered
anonymous again (not swap cache). By doing so, Linux avoids the potential
problem that swap space runs
full by potentially having more page-out I/O to the swap target
(performance degradation).

with kind regards
Carsten Otte
IBM Linux Technology Center / Boeblingen lab
--
omnis enim res, quae dando non deficit, dum habetur et non datur, nondum
habetur, quomodo habenda est

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/

Reply via email to