-2

It looks like joke: swapfile on "ramdysk" in 64bits system?

I look into file: /proc/meminfo and made some investigation. Look for line: SwapCached: nnnnn kB . One is what I don't understand. What for linux kernel caches swap? What for caching this? Isn't better idea leaving page as active?

Another, what is difference between swapping and paging? I never found exactly explanation about it. Where can I see counters?

Thanks for any explanation.

3 Answers 3

3

Red Hat explains it like this:

"SwapCache: Memory that once was swapped out, is swapped back in but still also is in the swapfile (if memory is needed it doesn't need to be swapped out AGAIN because it is already in the swapfile. This saves I/O)"

3

I don't think SwapCached means what you think it does. From the documentation

SwapCache: Memory that once was swapped out, is swapped back in but still also is in the swapfile (if memory is needed it doesn't need to be swapped out AGAIN because it is already in the swapfile. This saves I/O)

Also note that SwapCached doesn't count as swap even though it's in the swapfile.

Cached: Memory in the pagecache (diskcache) minus SwapCache

0

I see better article than redhat's one: http://www.westnet.com/~gsmith/content/linux-pdflush.htm Thank you neutrinus and lain for swap cache explanation. It is sense. Another sense is, last swapped out page has the highest chance reverting to active state (saving I/O).

I don't thank for minus signer, who doesn't explain me difference between paging and swapping. I didn't find clear documentation for this.

1
  • 2
    It wasn't my downvote, but mouse over the down arrow; the popup says "This question does not show any research effort; it is unclear or not useful". Downvotes without comment may be presumed to be for at least one of those reasons. Given that you were able to answer your own question and write the answer up in 24 minutes, the downvoter might've had a point about the lack of research.
    – MadHatter
    Apr 4, 2014 at 11:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .