Jump to content

Swap never used?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
Off

Off

    Learning Programmer

  • Members
  • PipPipPip
  • 83 posts
Why is my swap memory usage always at 0? I know in Windows the swap file is used extensively.

"free" command results:
             total       used       free     shared    buffers     cached
Mem:       2070076     822924    1247152          0      31864     279628
-/+ buffers/cache:     511432    1558644
Swap:      1015800          0    1015800


Notice the swap = 0 under used? Why?

#2
Prog

Prog

    Learning Programmer

  • Members
  • PipPipPip
  • 98 posts
My swap is the same way. I don't think that the swap is used until all physical memory is used. This is because the swap space is so slow.

#3
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts

Prog said:

My swap is the same way. I don't think that the swap is used until all physical memory is used. This is because the swap space is so slow.

You are correct. When an application exceeds your current amount of physical memory, it can write to a temporary buffer on the hard drive. Moreover, since swap is stored on the hard drive it is a lot slower - considering the average read speed of a hard drive is around 10ms, and the average read speed of RAM is 10ns.

#4
rumen

rumen

    Programmer

  • Members
  • PipPipPipPip
  • 107 posts
I think the swap is the virtual memory used when you run out of your physical memory. Also, the swap size should be twice your real RAM. Like if you have 1GB of RAM, your swap should be 2 GB of Ram.