On 05/15/14 18:23, Navid Zamani wrote:
> Hello. I wonder if Qubes offers memory deduplication for VM instances,
> to save RAM.
>
No. Although, IIRC, Xen has a thing called tmem that offered this
mechanism, albeit only for Linux PV guests (which is the reason we
didn't use it).
> I planned on designing a similar system, but my plan went something like
> this: (Simplified)
>
> START VM:
> boot template instance.
> Instance mounts generic required modules read-only for disk
> deduplication and updateability.
> /Pause instance./
> Optional: Write instance image to disk and allow unloading from RAM.
> *Make sure deduplication with other VMs happens in memory too.*
>
> START BINARY:
> *Clone associated template VM with memory deduplication.* (Takes zero
> time and memory.)
> /Unpause new VM instance./
> Mount binary’s image inside the instance.
> Execute binary from its image inside the instance.
>
> This would make it possible to use barely any RAM at all, and still
> allow writing with copy-on-write.
>
> Especially in cases where the Dom0 OS participates in the memory
> deduplication, both for RAM and disk.
> And it would work even better when using a large swap space in Dom0 to
> allow more templates to exist.
>
I don't quite follow your description, please consider describing it in
a more clear way. Specifically indicate who does what and who is who.
E.g. what does it mean "instance mounts"? Instance of a VM or a
Template? How does it "mount"? Does the template exposed a block device
to the "instance"? Etc.
> As far as I can tell from the infos on the website, Qubes seems to
> only do disk deduplication, and hence takes quite a lot of RAM.
>
> Is it possible to add that, or does it already exist?
>
>
joanna.