Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Operating Systems Linux

Anatomy of Linux Kernel Shared Memory 93

An anonymous reader sends in an IBM DeveloperWorks backgrounder on Kernel Shared Memory in the 2.6.32 Linux kernel. KSM allows the hypervisor to increase the number of concurrent virtual machines by consolidating identical memory pages. The article covers the ideas behind KSM (such as storage de-duplication), its implementation, and how you manage it.
This discussion has been archived. No new comments can be posted.

Anatomy of Linux Kernel Shared Memory

Comments Filter:
  • Re:First Post (Score:2, Informative)

    by Anonymous Coward on Saturday April 17, 2010 @05:15PM (#31883702)

    VMWare? Fuck, this has been around for decades in the case of OS/360.

  • Re:First Post (Score:5, Informative)

    by Anonymous Coward on Saturday April 17, 2010 @05:27PM (#31883766)

    From the article:
    "Going further

    Linux is not alone in using page sharing to improve memory efficiency, but it is unique in its implementation as an operating system feature. VMware's ESX server hypervisor provides this feature under the name Transparent Page Sharing (TPS), while XEN calls it Memory CoW. But whatever the name or implementation, the feature provides better memory utilization, allowing the operating system (or hypervisor, in the case of KVM) to over-commit memory to support greater numbers of applications or VMs. You can find KSM—and many other interesting features—in the latest 2.6.32 Linux kernel."

  • by abigor ( 540274 ) on Saturday April 17, 2010 @05:41PM (#31883828)

    OS X's kernel is open source (BSD license) and very well documented.

  • Re:First Post (Score:3, Informative)

    by nabsltd ( 1313397 ) on Sunday April 18, 2010 @10:00AM (#31886800)

    So any new technology for memory de-duping is impressive because, traditionally, it just ain't done. Which directly contradicts the content of your original post.

    For those who are still confused, the big difference between the various shared library-type schemes and memory de-dupilication is passive vs. active.

    Shared libraries (or executables) take advantage of the fact that when you load an program multiple times, the same bits are obviously being loaded each time and so it's just a reference count increment.

    For memory de-duplication, during idle times, the hypervisor creates hashes of all the used memory pages and if any duplicates are found they are replaced with the same sort of reference count as in the shared library approach. This would allow me to do something like copy the "vi" command to my home directory and rename it "edit", but the system will figure out that it's the same pages as the real "vi", so those pages will only be in memory once for all users.

    As far as I know, only hypervisors use the active memory de-duplication approach...no regular OS does what I suggested in my "vi" example.

Lots of folks confuse bad management with destiny. -- Frank Hubbard

Working...