Saturday, February 11, 2017

linux - possibility of swap space has larger data in it than in my physical memory

Quoting the Deployment Guide from centos.org that is,



Swap space in Linux is used when the amount of physical memory (RAM) is full.



And that Wikipedia also said that,



the term "swap" [is used] to describe both the act of moving memory pages between RAM and disk, and the region of a disk the pages are stored on.



Now, how come that at certain instances, swap space has larger data in it than in my physical memory? I believe that when the system requires more memory than is physically available, the kernel swaps out less used pages and gives memory to the current application (process) that needs the memory immediately. So the swap space must not have data stored larger than RAM.


This is where I'm coming from, please refer to the screenshot provided below.


enter image description here

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...