[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] 答复: Help:Can libvirt restor e several xen snapshots more faster at same time?



On 11/14/2017 08:22 AM, Michal Privoznik wrote:
On 11/14/2017 03:34 AM, Chenjia (C) wrote:
Dear libvirt expert:
	Thanks for your reply.
	May be our description is not suitable, in last message,'snapshot' means the domain state file which 'virsh save ' generate.

	Our project detailed steps are as follows:
	1) create 40 xen guestOS by 'vrish create xen*.xml'
	2) save 40 guest OS to domain state file by 'virsh save' cmd
	3) Start multiple processes, each process cycle to do the following job:
		a)virsh restore the domain state file

'virsh restore' has --bypass-cache option which basically enables
O_DIRECT. That can save you couple of seconds.

As Chenjia already discovered, the Xen driver does not support that option, although should be easy to provide.

		b)do same job in guest OS in 20 seconds
		c)virsh destroy the guest OS

	We need higher performance on the project , so our question is these as last message:
	1)	each our xen state file is almost same except IP address(Win7 OS with 1G memory), does there have some way to reduce the 40 state file space?

I don't think so. I mean, I don't know about Xen that much, but for
instance in QEMU, the saved file contains memory for the guest (among
with the internal state of hypervisor). In general, no guest have the
same content of the memory. Also, you only *think* that the guests are
the same. There is a lot of subtle differences (e.g. internal kernel
state, RNG, network stack, stack randomization, etc.). So having some
shared base image is not really a way to go.

The same applies for Xen. There is currently no way to share any content from the saved state files.

But for saving some disk
space you can enable compression for the saved images (possibly not
implemented in Xen driver).

Yep, not yet implemented in the Xen driver.

	2)	Do you have some suggestion to improve the performance of restore as much as  xen state file at same time?

See my replies above. But I'll let Jim reply as he knows more about Xen
than me.

Xen is the same as qemu wrt save/restore. I'm not aware of any way to identify a page about to be restored is already in memory. We'd need a KSM-type service that could manage save and restore, writing shared pages to a common image and only restoring those once. But again, I'm not aware of such service, which seems non-trivial to create.

Regards,
Jim


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]