Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question

migrated from stackoverflow.com Nov 1 '12 at 12:31

This question came from our site for professional and enthusiast programmers.

so what is your question? –  John3136 Nov 1 '12 at 5:36
it is for serverfault or superuser –  eicto Nov 1 '12 at 5:37
@John3136: it is stated, "how come that at certain instances, swap space has larger data in it than in my physical memory?" –  chrismsawi Nov 1 '12 at 5:38
Your discussion of swap space is pretty much correct, so it is fair to assume that if swap has more data than physical, it is because you have allocated more data than you have physical. Without knowing anything about your code we can't tell! –  John3136 Nov 1 '12 at 5:40
There's nothing wrong with swap consumption being more than physical memory consumption. When an application, which resides in physical memory, quits, physical memory consumption is reduced, but swap consumption remains the same. –  Wu Yongzheng Nov 1 '12 at 6:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.