[vbox-dev] Docs on how page fusion works?

Alexey Eromenko al4321 at gmail.com
Mon Apr 16 08:23:51 PDT 2012

> What kind if obstacles would I face if I tried to implemented the
> same behavior (Scan processes) for Linux guests? I plan on scanning every
> process then check the memory maps from /proc/<pid>/maps. If the permissions
> are set to r only or rx then I'll register the pages with the host. This
> wouldn't cover the process it self, but a major portion of
> the wasted memory.
> Sounds simple (everything does these days) and I plan to work it. However, I
> just need an expert to give me the go-ahead since this is all new to me.

I think before undertaking such a massive effort, it pays off to
compare existing (Open-Source) technologies: Linux KSM vs. VBox

Why ?
KSM *avoids* the need of developing guest-side drivers altogether.
With KSM all mem dedup logic is done host-side-only, so all legacy and
future OSes work out-of-the-box.
VBox PageFusion requires GuestAdditions, which means developing and
testing (!) drivers for lots of guest OSes and OS versions.
Developing KSM-equivalent for VBox may pay off better than extending
VBox PageFusion to Linux guests (this will require writing new Linux
kernel drivers).
KSM itself is Linux-host-only, so cannot be used directly. (While VBox
PageFusion is Windows-guest-only ATM)
KSM-like system will require only host-side development and testing.

What needs to be considered ? (KSM-like approach vs. VBox PageFusion approach)
1. performance - how much CPU usage does it takes ?
2. speed convergence [related to 1.] - how much time does it take to
find 1 GiB of RAM and dedup it ?
3. efficiency - how many pages were actually shared ?
4. any other advantages/disadvantages of both approaches.

Disclaimer: I have NOT tested either solution. Just my 2 cents.
-Alexey Eromenko "Technologov"

More information about the vbox-dev mailing list