Rik van Riel wrote:
Jeremy Fitzhardinge wrote:
Rik van Riel wrote:I'll give you a hint: Windows zeroes out freed pages.
Jeremy Fitzhardinge wrote:Well, they're research projects, so nobody said that they're necessarily useful results ;). I think the rationale is that, in general, there aren't all that many sharable pages, and asize from zero-pages, the bulk of them are the result of IO.
That said, people have been looking at tracking block IO to work out when it might be useful to try and share pages between guests under Xen.Tracking block IO seems like a bass-ackwards way to figure
out what the contents of a memory page are.
Right: "aside from zero-pages". If you exclude zero-pages from your count of shared pages, the amount of sharing drops a lot.
I keep hear this argument from Microsoft but even in the hardest test condition, how would you make the librarys and the kernel wont be identical among the guests?.The algorithm was changed quite a bit. Izik is planning to resubmit it
It should also be possible to hook up arch_free_page() so
freed pages in Linux guests become sharable.
Furthermore, every guest with the same OS version will be
running the same system daemons, same glibc, etc. This
means sharable pages from not just disk IO (probably from
different disks anyway),
Why? If you're starting a bunch of cookie-cutter guests, then you're probably starting them from the same template image or COW block devices. (Also, if you're wearing the cost of physical IO anyway, then additional cost of hashing is relatively small.)
but also in the BSS and possibly
even on the heap.
Well, maybe. Modern systems generally randomize memory layouts, so even if they're semantically the same, the pointers will all have different values.
Other research into "sharing" mostly-similar pages is more promising for that kind of case.
Eventually. It starts out with hashing the first 128 (IIRC)
bytes of page content and comparing the hashes. If that
matches, it will do content comparison.
any day now.
Content comparison is done in the background on the host.
I suspect (but have not checked) that it is somehow hooked
up to the page reclaim code on the host.
Yeah, that's the straightforward approach; there's about a research project/year doing a Xen implementation, but they never seem to get very good results aside from very artificial test conditions.