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

Chenjia (C) chenjia09 at huawei.com
Wed Nov 15 09:36:02 UTC 2017


Dear libvirt expert:
	Thanks for your reply.
	if  we use ' virsh restore file --bypass-cache', we got the error message: 'unsupported flags (0x1) in function libxlDomainRestoreFlags'.

	By the way , May be our goal is not  make it clear to you, add argument:'--bypass-cache'  means ' avoid file system cache when restoring', it means if we restore one state file for the second time , it will be more slower than normal , because IO is slower than cache, am I  right?  In our project , our goal is restore more faster, if we add this argument ,we will get a even worse result, and this is not our goal. 

	Best regards from Beijing.

-----邮件原件-----
发件人: Michal Privoznik [mailto:mprivozn at redhat.com] 
发送时间: 2017年11月14日 23:22
收件人: Chenjia (C) <chenjia09 at huawei.com>; Jim Fehlig <jfehlig at suse.com>; libvir-list at redhat.com
抄送: HUANG SHENGQIANG <huang.shengqiang at huawei.com>; Yaoshaomin <yaoshaomin at huawei.com>
主题: Re: [libvirt] 答复: Help:Can libvirt restore several xen snapshots more faster at same time?

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.

> 		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. But for saving some disk space you can enable compression for the saved images (possibly not implemented in 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.

Michal




More information about the libvir-list mailing list