3 ms·
Not a lot of technical specificity around "memory compression". Edit: Ok, I stand corrected, somebody's done some research and found the code. Windows 8 does
by asveikau 13y ago
Not a lot of technical specificity around "memory compression". Edit: Ok, I stand corrected, somebody's done some research and found the code.
Windows 8 does a similar-sounding trick. At some timer interrupts they de-dupe pages and make them copy-on-write when they are identical. I seem to recall also reading that some VM products (VMware?) do this - so if you have a few instances of the same OS, only unique pages end up getting stored.
From the presentation I wonder if they're doing this, or if they might be putting the pages through a compression algorithm. (I hear "compression" and I think this, but it seems like that would make page faults needlessly costly.)
- solarexplorer 13y agoFrom the pdf linked in another post below: They use WKdm, a very fast compression. http://www.opensource.apple.com/source/xnu/xnu-1456.1.26/iokit/Kernel/WKdm.h http://www.opensource.apple.com/source/xnu/xnu-1456.1.26/iok... http://static.usenix.org/event/usenix01/cfp/wilson/wilson_html/node6.html http://static.usenix.org/event/usenix01/cfp/wilson/wilson_ht...
- deleted 13y ago[deleted]
- deleted 13y ago[deleted]
- deleted 13y ago[deleted]
- DiabloD3 13y agoGoogle added this to the Linux kernel quite some time ago for Android. Basically, it inserts a step before the "move to swap" step where it compresses the page. This a) allows Linux to write a compressed page to swap which allows both faster writes but also faster reads, b) allows you to use more memory before hitting swap. Major distros are considering enabling this functionality in their kernels by default. What you're describing sounds like samepage detection, which Linux also has thanks to Google and Android.
- asveikau 13y agoI guess what it costs you in CPU is easily regained by what it saves you in I/O.
- calinet6 13y agoYes, it would seem to be more efficient all around. One of those "why didn't I think of that?" things that sounds really simple and nice in hindsight.
- sciurus 13y agoAre you sure Google gets the credit for this? Memory compression still hasn't been merged into mainline linux; right now it's looking like zswap will make it into 3.11. I think zswap was developed by IBM. I think kernel samepage merging was developed by Red Hat. https://lwn.net/Articles/551401/ https://lwn.net/Articles/551401/ https://lwn.net/Articles/545244/ https://lwn.net/Articles/545244/ https://lwn.net/Articles/330589/ https://lwn.net/Articles/330589/