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

Alexey Eromenko al4321 at gmail.com
Fri Apr 13 22:41:30 GMT 2012


> The guest additions service scans the guest for modules (user/kernel) and
> registers each module with the hypervisor on the host. Then notifies the
> hypervisor to check if the pages are shared with other VMs. What I don't
> understand is what happens when the hypervisor decides that two pages are
> the same? And what happens if one of these pages change *after* it was
> already "merged" with other similar pages.

AFAIK if two pages are the same, only one is stored in RAM, with 2
references from 2 VMs (or 2 references from same 1 VM, deduplicating
mem inside 1 VM).
If one VM changes page, it just copied to new location, so now VBox
stops deduping this page.
This is how KSM works, and how I expect PageFusion to work.

> And ,sorry to ask this, is KSM utilized when it is enabled on the host?

Of course not.
VBox is cross-platform technology, while KSM is Linux only, so KSM is
useless for VBox.
One advantage of KSM, is that it doesn't depend on any guest drivers,
and all logic is done host-side. VBox PageFusing requires GA,
Guest-OS-specific drivers.
But I didn't done any benchmarking to compare the efficiency of both approaches.
-- 
-Alexey Eromenko "Technologov"




More information about the vbox-dev mailing list