In defence of swap -- common misconceptions

Click for: original source

Chris Down lengthy post about swap and how it is a useful tool to allow equality of reclamation of memory pages, but its purpose is frequently misunderstood, leading to its negative perception across the industry.

There are different types of memory in Linux, and each type has its own properties. Understanding the nuances of these is key to understanding why swap is important.

Article provides answers on common questions:

  • What is the nature of swap
  • What happens with / without swap
    • Under no / low memory contention
    • Under moderate / high memory contention
    • Under temporary spikes in memory usage
  • How to go about tuning

And remember disabling swap does not prevent disk I/O from becoming a problem under memory contention, it simply shifts the disk I/O thrashing from anonymous pages to file pages. Great read!

[Read More]

Tags cloud programming